* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, sans-serif; }
body { background: #f4f6f8; color: #1a1a2e; }

header {
  background: #1a1a2e; color: #fff;
  padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
header a { color: #8ecae6; }

.tabs {
  display: flex; gap: 4px;
  background: #fff; padding: 8px 24px;
  border-bottom: 1px solid #e0e0e0;
  overflow-x: auto;
}
.tab {
  border: none;
  background: none;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #1a1a2e;
  font-weight: 500;
}
.tab.active { background: #1a1a2e; color: #fff; }
.tab:hover:not(.active) { background: #f0f0f0; }

/* SOUS-MENU (regroupe Congés / Calendrier / Samedis) */
.tab-group { position: relative; flex-shrink: 0; }
.tab-group-toggle {
  border: none; background: none; padding: 10px 16px; cursor: pointer;
  border-radius: 8px; font-size: 14px; white-space: nowrap; color: #1a1a2e; font-weight: 500;
}
.tab-group-toggle.active { background: #1a1a2e; color: #fff; }
.tab-group-toggle:hover:not(.active) { background: #f0f0f0; }
.tab-dropdown {
  display: none; flex-direction: column; gap: 2px;
  background: #fff; border-radius: 10px; padding: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); min-width: 170px; z-index: 50;
}
.tab-dropdown.open { display: flex; }
.tab-dropdown .tab { text-align: left; width: 100%; }

main { max-width: 900px; margin: 24px auto; padding: 0 16px; }

.panel { display: none; }
.panel.active { display: block; }

/* Onglets Planning et Clientes : sortent du conteneur centré pour utiliser toute la largeur */
#planning.panel, #clients.panel {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.card {
  background: #fff; border-radius: 12px;
  padding: 20px; margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.card h2 { font-size: 16px; margin-bottom: 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

input, select, button {
  padding: 10px; border: 1px solid #ddd;
  border-radius: 8px; font-size: 14px;
}
button { background: #2a9d8f; color: #fff; border: none; cursor: pointer; }
button:hover { opacity: .9; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid #eee; font-size: 14px; }

.badge { padding: 3px 8px; border-radius: 20px; font-size: 12px; }

.stats { display: flex; gap: 24px; margin-top: 8px; }
.stats div { text-align: center; }
.stats b { font-size: 28px; display: block; }
.stats span { font-size: 12px; color: #666; }
.stats .hl b { color: #2a9d8f; }

.row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #eee;
}
.row button { padding: 4px 8px; }

.muted { color: #888; font-size: 13px; }
.error { color: #e63946; }
.msg { margin-top: 10px; font-size: 14px; }
.msg.success { color: #2a9d8f; }
.msg.error { color: #e63946; }
.profile-info p { padding: 6px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.profile-info p:last-child { border-bottom: none; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 320px; display: flex; flex-direction: column; gap: 12px; text-align: center; }

/* CALENDRIER ÉQUIPE */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-nav button { background: #f0f0f0; color: #1a1a2e; padding: 6px 14px; }
.cal-nav h2 { font-size: 16px; text-transform: capitalize; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: #888; padding: 4px 0; }
.cal-cell { min-height: 62px; border: 1px solid #eee; border-radius: 8px; padding: 4px; }
.cal-cell.empty { border: none; }
.cal-cell.today { border-color: #2a9d8f; background: #f0faf8; }
.cal-cell.saturday { background: #fafaf5; }
.cal-daynum { font-size: 12px; color: #666; }
.cal-badges { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.cal-badge {
  width: 20px; height: 20px; border-radius: 50%;
  color: #fff; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee; align-items: center; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sat-counter { margin-left: auto; color: #666; }

/* ANNONCES */
.announce-card { padding: 16px; }
.announce-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.announce-content { margin-top: 8px; font-size: 14px; color: #333; line-height: 1.5; }

/* SAMEDIS */
.badge.pending { background: #fff3cd; color: #856404; }

/* BILAN / FORMULAIRE */
.q-block { margin-bottom: 18px; }
.q-block:last-child { margin-bottom: 0; }
.q-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.q-rating { display: flex; gap: 14px; flex-wrap: wrap; }
.q-rating label { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; cursor: pointer; }
.q-options { display: flex; flex-direction: column; gap: 6px; }
.q-opt { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; cursor: pointer; }
.q-opt input[type="text"] { padding: 4px 8px; font-size: 13px; }

.bilan-entry { margin-bottom: 12px; border: 1px solid #eee; border-radius: 8px; padding: 10px 14px; }
.bilan-entry summary { cursor: pointer; font-size: 14px; padding: 4px 0; }
.bilan-section { margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.bilan-section h4 { font-size: 13px; color: #2a9d8f; margin-bottom: 8px; }
.bilan-qa { margin-bottom: 8px; font-size: 13px; }
.bilan-q { color: #666; }
.bilan-a { font-weight: 500; margin-top: 2px; }

/* COMPÉTENCES */
#skillsBody details.card { padding: 14px 20px; }
#skillsBody summary { cursor: pointer; font-size: 15px; font-weight: 600; padding: 4px 0; }
.skill-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.skill-row:first-of-type { margin-top: 12px; }
.skill-scales { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 6px; }
.skill-scale { display: flex; flex-direction: column; gap: 4px; }
.skill-validate { margin-left: 8px; display: inline-flex; gap: 4px; align-items: center; }
.skill-validate input { padding: 4px 6px; }
.skill-validate button { padding: 4px 8px; font-size: 12px; }
