/* PauseIA — Journal des rencontres
   Lightweight, friendly stylesheet. No build step, no dependencies. */

:root {
  --bg:        #f4f6f8;
  --surface:   #ffffff;
  --ink:       #1c2733;
  --muted:     #67788a;
  --line:      #e2e8f0;
  --brand:     #0f766e;   /* teal */
  --brand-ink: #0b5a54;
  --brand-soft:#d8f0ed;
  --danger:    #b42318;
  --danger-bg: #fef3f2;
  --ok:        #027a48;
  --ok-bg:     #ecfdf3;
  --radius:    12px;
  --shadow:    0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header / footer ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 1rem; }
.site-header nav a { color: var(--muted); font-weight: 500; }
.site-header nav a:hover { color: var(--ink); text-decoration: none; }

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: .85rem;
}

.container { max-width: 960px; margin: 0 auto; padding: 1.5rem; }

/* ---------- Headings ---------- */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
h1 { font-size: 1.6rem; margin: 0; }
.head-actions { display: flex; gap: .5rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .75rem; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #f0f3f6; text-decoration: none; }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eceff2; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Flash messages ---------- */
.flashes { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.flash {
  padding: .7rem .9rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: .92rem;
}
.flash-error   { background: var(--danger-bg); color: var(--danger); border-color: #fecdca; }
.flash-success { background: var(--ok-bg);     color: var(--ok);     border-color: #abefc6; }

/* ---------- Search ---------- */
.search { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.search input[type="search"] {
  flex: 1;
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--surface);
}

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.meetings { width: 100%; border-collapse: collapse; }
table.meetings thead th {
  text-align: left;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  background: #fafbfc;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
}
table.meetings tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.meetings tbody tr:last-child td { border-bottom: 0; }
table.meetings tbody tr { cursor: pointer; transition: background .1s; }
table.meetings tbody tr:hover { background: var(--brand-soft); }
.nowrap { white-space: nowrap; }
.summary-cell {
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.count { margin-top: .75rem; font-size: .85rem; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: .15rem .55rem;
  margin: .1rem .15rem .1rem 0;
  background: var(--brand-soft);
  color: var(--brand-ink);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Follow-up ("relance") badges ---------- */
.due {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.due-overdue { background: var(--danger-bg); color: var(--danger); }
.due-soon    { background: #fff4e5;          color: #b54708; }
.due-ok      { background: var(--ok-bg);     color: var(--ok); }

/* ---------- Calendar ---------- */
.cal-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.cal-title { font-size: 1.15rem; min-width: 9rem; text-align: center; }
.cal-legend { display: flex; gap: .4rem; margin-left: auto; }

table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.calendar thead th {
  text-align: center;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  background: #fafbfc;
  padding: .5rem;
  border-bottom: 1px solid var(--line);
}
table.calendar td {
  height: 90px;
  width: 14.28%;
  vertical-align: top;
  border: 1px solid var(--line);
  padding: .25rem;
}
.cal-daynum { font-size: .8rem; color: var(--muted); text-align: right; padding: .1rem .15rem; }
.cal-out { background: #fafbfc; }
.cal-out .cal-daynum { opacity: .45; }
.cal-today { background: var(--brand-soft); }
.cal-today .cal-daynum { color: var(--brand-ink); font-weight: 700; }

.cal-ev {
  display: block;
  margin: .12rem 0;
  padding: .12rem .4rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.cal-ev:hover { text-decoration: none; filter: brightness(.96); }
.cal-meeting  { background: var(--brand-soft); color: var(--brand-ink); }
.cal-followup { background: #fff4e5;           color: #b54708; }

/* ---------- Cards & forms ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.form .field { margin-bottom: 1.1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.field > label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.field input[type="text"],
.field input[type="date"],
.field input[type="password"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.req { color: var(--danger); }
.hint { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); }
.actions { display: flex; gap: .6rem; margin-top: .5rem; }
.prose { white-space: pre-wrap; margin: 0; }

/* ---------- Checklist (person picker) ---------- */
.checklist {
  display: grid;
  gap: .35rem;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .6rem .75rem;
  background: #fafbfc;
}
.check { display: flex; align-items: center; gap: .55rem; font-weight: 400; cursor: pointer; }
.check input { width: auto; }

/* ---------- People list (on detail page) ---------- */
.people-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.people-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty p { color: var(--muted); margin-top: 0; }

/* ---------- Auth ---------- */
.auth-card {
  max-width: 380px;
  margin: 3rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: .25rem; }
.auth-card label { display: block; font-weight: 600; margin: 1rem 0 .35rem; }
.auth-card input {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 1rem;
}
.auth-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
