/* ==========================================================
   LE TERRAIN - reunions.css - V2.0
   Design unifié : pages publiques + superviseur
   Palette : dark rgb(0,47,63) / light rgb(153,207,22)
   ========================================================== */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --dark:   rgb(0,47,63);
  --light:  rgb(153,207,22);
  --bg:     #f6f7f8;
  --text:   #0b1b22;
  --muted:  rgba(11,27,34,0.72);
  --card:   #ffffff;
  --line:   #e7ecef;
  --shadow: 0 10px 26px rgba(0,0,0,0.10);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── Header (commun) ────────────────────────────────────────── */
header {
  background: var(--dark);
  color: #fff;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Pages publiques */
header .title {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 14px;
  line-height: 1.2;
}

header .subtitle {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 3px;
}

/* Superviseur */
.header { background: var(--dark); }
.brand  { font-weight: 900; font-size: 14px; letter-spacing: 0.2px; color: #fff; }

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-info {
  font-size: 12px;
  color: rgba(255,255,255,0.80);
}

/* Boutons dans le header */
.a-btn {
  display: inline-block;
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 12px;
  background: var(--light);
  color: #0d1a00;
  transition: filter 0.15s;
}

.a-btn:hover { filter: brightness(0.93); }

.a-btn.ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.30);
}

/* ── Layout ─────────────────────────────────────────────────── */
main {
  max-width: 980px;
  margin: 18px auto;
  padding: 0 14px 18px;
}

/* Wrap superviseur */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

/* ── Navigation onglets (superviseur) ───────────────────────── */
.menu {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--line);
  margin-bottom: 16px;
}

.tab {
  display: inline-block;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px 10px 0 0;
  font-weight: 800;
  font-size: 13px;
  color: rgba(0,0,0,0.55);
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -2px;
  transition: background 0.12s, color 0.12s;
}

.tab:hover { background: rgba(0,0,0,0.04); color: var(--dark); }

.tab.active {
  background: #fff;
  color: var(--dark);
  border-color: var(--line);
  border-bottom-color: #fff;
}

/* Sous-onglets */
.subtabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }

.subtab {
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--dark);
  font-weight: 800;
  font-size: 12px;
  transition: background 0.12s;
}

.subtab.active {
  background: rgba(153,207,22,0.18);
  border-color: rgba(153,207,22,0.40);
}

/* ── Card ───────────────────────────────────────────────────── */
/* Card superviseur (pleine largeur, block) */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
  display: block;
}

.card h1 {
  font-size: 17px;
  margin: 0 0 12px;
  color: var(--dark);
}

/* Card créneaux (pages publiques, flex) */
.card-slot {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin: 12px 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── Bandeau notice (pages publiques) ───────────────────────── */
.notice {
  background: linear-gradient(90deg, rgba(153,207,22,0.18), rgba(0,47,63,0.08));
  border: 1px solid rgba(153,207,22,0.35);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.notice strong { display: block; color: var(--dark); font-size: 13px; margin-bottom: 2px; }
.notice span   { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* ── Info bloc (pages publiques) ────────────────────────────── */
.info { min-width: 0; }
.label { font-weight: 800; color: var(--dark); font-size: 15px; margin-bottom: 3px; }
.dt    { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

.stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(153,207,22,0.22);
  color: #122500;
  border: 1px solid rgba(153,207,22,0.38);
}

.badge.full   { background: rgba(220,0,0,0.08); border-color: rgba(220,0,0,0.20); color: #7a0000; }
.badge.urgent { background: rgba(255,160,0,0.13); border-color: rgba(255,160,0,0.30); color: #5a3a00; }

/* Pills (superviseur) */
.pill      { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; background: rgba(0,0,0,0.04); }
.pill.ok   { background: rgba(153,207,22,0.22); }
.pill.bad  { background: rgba(255,0,0,0.10); }
.pill.warn { background: rgba(255,165,0,0.14); }

/* ── Boutons ─────────────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
  background: var(--light);
  color: #0d1a00;
  font-size: 14px;
  min-width: 130px;
  box-shadow: 0 8px 18px rgba(153,207,22,0.25);
  transition: filter 0.15s;
}

.btn:hover    { filter: brightness(0.96); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.btn-mini {
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
  background: var(--light);
  color: #0d1a00;
  font-size: 12px;
  transition: filter 0.15s;
}

.btn-mini:hover    { filter: brightness(0.96); }
.btn-mini:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-mini.secondary { background: rgba(0,0,0,0.06); color: #111; }

/* ── Tableaux ───────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid rgba(0,0,0,0.08); text-align: left; vertical-align: top; }
.table th { color: rgba(0,0,0,0.75); font-size: 12px; font-weight: 700; }

/* ── Formulaires ────────────────────────────────────────────── */
.formline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }

.field { min-width: 200px; flex: 1; }
.field.small { min-width: 120px; flex: 0; }

.field label { display: block; font-size: 12px; margin: 0 0 6px; color: rgba(0,0,0,0.70); font-weight: 700; }

.field input,
.field select {
  width: 100%;
  padding: 10px;
  border: 1px solid #d7dde3;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
.field select:focus { border-color: var(--dark); }

/* ── Alertes ────────────────────────────────────────────────── */
.alert { margin: 12px 0; padding: 12px 14px; border-radius: 12px; font-size: 13px; }
.alert.error   { background: rgba(255,0,0,0.08);   border: 1px solid rgba(255,0,0,0.18);   color: #7a0000; }
.alert.success { background: rgba(153,207,22,0.20); border: 1px solid rgba(153,207,22,0.40); color: #1a3300; }
.alert.info    { background: rgba(0,80,160,0.07);   border: 1px solid rgba(0,80,160,0.18);  color: #002c66; }

/* ── Utilitaires ─────────────────────────────────────────────── */
.muted       { color: rgba(0,0,0,0.60); font-size: 12px; }
.nowrap      { white-space: nowrap; }
.placeholder { padding: 20px; text-align: center; color: rgba(0,0,0,0.45); font-size: 13px; background: rgba(0,0,0,0.025); border-radius: 10px; margin-top: 10px; }

/* ── Import CSV ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed rgba(0,47,63,0.25);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(0,0,0,0.018);
  margin: 14px 0;
}

.upload-zone:hover,
.upload-zone.drag     { border-color: rgba(153,207,22,0.7); background: rgba(153,207,22,0.07); }
.upload-zone input[type=file] { display: none; }
.upload-zone .uz-icon  { font-size: 30px; display: block; margin-bottom: 8px; }
.upload-zone .uz-label { font-weight: 800; font-size: 14px; color: var(--dark); }
.upload-zone .uz-hint  { font-size: 12px; color: rgba(0,0,0,0.50); margin-top: 4px; display: block; }

.import-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.import-result  { margin-top: 14px; }
.import-result .stat      { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; margin: 3px 4px 3px 0; background: rgba(0,0,0,0.05); }
.import-result .stat.ok   { background: rgba(153,207,22,0.22); color: #122500; }
.import-result .stat.bad  { background: rgba(255,0,0,0.10);    color: #7a0000; }
.import-result .stat.warn { background: rgba(255,160,0,0.14);  color: #5a3a00; }
.import-result .stat.neu  { background: rgba(0,0,0,0.06);      color: #333; }

/* ── Invitations ────────────────────────────────────────────── */
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.inv-box  { background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.08); border-radius: 14px; padding: 16px; }
.inv-box h3 { margin: 0 0 8px; font-size: 14px; color: var(--dark); }
.inv-box p  { margin: 0 0 12px; font-size: 12px; color: rgba(0,0,0,0.60); line-height: 1.45; }

/* Historique */
.hist-toggle { font-size: 12px; color: var(--dark); cursor: pointer; text-decoration: underline; margin-bottom: 6px; display: inline-block; }

/* ── Créneaux (superviseur) ──────────────────────────────────── */
.creneau-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.creneau-card.inactive { opacity: 0.55; }
.creneau-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* Progress bar */
.progress-wrap { width: 110px; height: 8px; background: rgba(0,0,0,0.08); border-radius: 999px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: 999px; background: var(--light); transition: width 0.3s; }
.progress-bar.full   { background: rgba(220,0,0,0.55); }
.progress-bar.urgent { background: rgba(255,160,0,0.75); }

/* ── Modales ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  overflow: hidden;
}

.modal-h { background: var(--dark); color: #fff; padding: 14px 16px; font-weight: 900; display: flex; align-items: center; justify-content: space-between; }
.modal-b { padding: 16px; font-size: 14px; }
.modal-f { padding: 14px 16px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid rgba(0,0,0,0.08); }

.xbtn { background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 10px; padding: 6px 10px; cursor: pointer; font-weight: 900; }
.btn2 { border: none; border-radius: 12px; padding: 10px 14px; font-weight: 900; cursor: pointer; background: var(--light); color: #0d1a00; }
.btn2.secondary { background: rgba(0,0,0,0.06); color: #111; }

/* ── Countdown ───────────────────────────────────────────────── */
.countdown {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--dark);
  background: rgba(0,47,63,0.07);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  margin-top: 18px;
  padding: 14px 0 8px;
  text-align: center;
  color: rgba(11,27,34,0.55);
  font-size: 12px;
}

footer .line {
  height: 3px;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dark), var(--light));
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .card-slot { flex-direction: column; align-items: stretch; }
  .btn       { width: 100%; }
  .inv-grid  { grid-template-columns: 1fr; }
  .menu      { gap: 2px; }
  .tab       { padding: 8px 10px; font-size: 12px; }
}
