@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Caveat:wght@600&display=swap');

:root {
  --black: #1C1C1E;
  --blue: #2FABE0;
  --yellow: #FFCE2E;
  --bg: #F4F5F7;
  --white: #ffffff;
  --border: #E9E9EC;
  --muted: #8B8B93;
  --danger: #D64545;
  --success: #2E9E5B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--black);
}

a { color: inherit; text-decoration: none; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.brand { display: flex; flex-direction: column; align-items: center; padding: 6px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.brand svg { width: 64px; height: auto; }
.brand .wordmark { font-size: 19px; font-weight: 600; margin-top: 6px; letter-spacing: 0.2px; }
.brand .wordmark .two { color: var(--blue); }
.brand .tagline { font-family: "Caveat", cursive; font-size: 15px; color: var(--black); margin-top: -2px; }

.profile-box { position: relative; margin-bottom: 14px; }
.profile-summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; border: 1px solid var(--border);
}
.profile-summary::-webkit-details-marker { display: none; }
.profile-summary:hover { background: var(--bg); }
.profile-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--yellow);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.profile-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.profile-role { font-size: 11px; color: var(--muted); }
.profile-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--white);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  z-index: 20; overflow: hidden;
}
.profile-menu a { display: block; padding: 10px 14px; font-size: 13px; }
.profile-menu a:hover { background: var(--bg); }
.profile-menu a.danger { color: var(--danger); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--black);
  font-size: 13.5px;
  font-weight: 500;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--black); color: var(--white); }

.main { flex: 1; padding: 26px 34px; min-width: 0; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.topbar h1 { font-size: 21px; font-weight: 600; margin: 0; }

.bell { position: relative; font-size: 18px; }
.badge-count {
  position: absolute; top: -6px; right: -8px; background: var(--danger); color: white;
  font-size: 10px; padding: 1px 5px; border-radius: 10px;
}

.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: 1.3fr 1fr; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 1px 3px rgba(20,20,20,0.03); }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }

.kpi-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.kpi-value { font-size: 23px; font-weight: 600; }
.kpi-value.blue { color: var(--blue); }
.kpi-value.yellow-text { color: #8A6D00; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 6px; border-bottom: 1px solid var(--border); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 10px 6px; border-bottom: 1px solid #f2f2f4; }
tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge.blue { background: #E6F5FC; color: #0D6690; }
.badge.yellow { background: #FFF6D9; color: #8A6D00; }
.badge.gray { background: #EFEFF1; color: #56565C; }
.badge.green { background: #E4F5EA; color: #1E7A44; }
.badge.red { background: #FBE7E7; color: #A72D2D; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--black); background: var(--black);
  color: var(--white); padding: 8px 14px; border-radius: 10px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn:hover { opacity: 0.85; }
.btn.secondary { background: var(--white); color: var(--black); }
.btn.accent { background: var(--blue); border-color: var(--blue); }
.btn.danger-ghost { background: var(--white); color: var(--danger); border-color: #f0d3d3; padding: 4px 8px; font-size: 12px; }

.form-row { margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 12px; color: var(--muted); }
input, select, textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px; font-family: inherit;
  background: var(--white); color: var(--black);
}
textarea { resize: vertical; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pillbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pillbar a { padding: 6px 14px; border-radius: 20px; font-size: 12px; border: 1px solid var(--border); }
.pillbar a.active { background: var(--black); color: var(--white); border-color: var(--black); }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.flash.success { background: #E4F5EA; color: #1E7A44; }
.flash.error { background: #FBE7E7; color: #A72D2D; }

.progress-track { height: 6px; background: #EFEFF1; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); }

.section-title { font-size: 13px; font-weight: 600; margin: 20px 0 10px; }
.muted { color: var(--muted); font-size: 12px; }
.link-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f2f2f4; gap: 10px; }
.link-row:last-child { border-bottom: none; }

.checkbox-list { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-list label { display: flex; align-items: center; gap: 5px; font-size: 12px; border: 1px solid var(--border); padding: 5px 10px; border-radius: 20px; }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 40px; width: 380px; text-align: center; box-shadow: 0 4px 24px rgba(20,20,20,0.05); }
.login-card svg { width: 90px; height: auto; margin-bottom: 8px; }
.login-card .wordmark { font-size: 26px; font-weight: 600; }
.login-card .wordmark .two { color: var(--blue); }
.login-card .tagline { font-family: "Caveat", cursive; font-size: 20px; margin-bottom: 22px; }

.bucket-section { margin-bottom: 18px; }
.bucket-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bucket-header .dot { width: 9px; height: 9px; border-radius: 50%; }
.bucket-header h4 { font-size: 13px; font-weight: 600; margin: 0; }
.bucket-header .count { font-size: 12px; color: var(--muted); }

.paiement-form { display: flex; gap: 6px; align-items: center; }
.paiement-form input { width: 90px; padding: 5px 8px; }
.paiement-form .btn { padding: 5px 10px; font-size: 12px; }

.cal-wrap { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cal-cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; min-height: 34px; font-size: 11px; }
.cal-head { background: var(--bg); font-weight: 600; text-align: center; padding: 8px 4px; font-size: 12px; }
.cal-head .d { font-size: 15px; }
.cal-hour { background: var(--bg); color: var(--muted); text-align: right; padding: 4px 6px; font-size: 11px; }
.cal-entry { background: #E6F5FC; color: #0D6690; border-radius: 6px; padding: 3px 5px; margin-bottom: 2px; font-size: 10.5px; line-height: 1.3; }
.cal-entry.conge { background: #FFF6D9; color: #8A6D00; }
.cal-allday { background: #FFF6D9; color: #8A6D00; border-radius: 6px; padding: 2px 6px; margin: 2px 0; font-size: 10.5px; display: inline-block; }
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

.profile-avatar-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.cal-drop.drop-hover { background: #E6F5FC; }
.cal-entry, .cal-allday { cursor: grab; display: block; }
.cal-entry.dragging, .cal-allday.dragging { opacity: 0.4; }

.gantt-wrap { overflow-x: auto; }
.gantt-scale { position: relative; height: 20px; margin-left: 160px; }
.gantt-month-label { position: absolute; top: 0; font-size: 11px; color: var(--muted); font-weight: 500; }
.gantt-row { display: flex; align-items: center; border-bottom: 1px solid var(--border); padding: 10px 0; }
.gantt-label { width: 150px; flex-shrink: 0; font-size: 13px; font-weight: 500; }
.gantt-timeline { position: relative; height: 34px; background: #FAFAFB; border-radius: 6px; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #D64545; }
.gantt-bar {
  position: absolute; top: 4px; height: 26px; border-radius: 6px; color: white; font-size: 11px;
  display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap; cursor: grab;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.gantt-bar-label { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gantt-resize { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }

.kanban-board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; }
.kanban-col { min-width: 230px; max-width: 230px; background: #FAFAFB; border-radius: 12px; padding: 10px; flex-shrink: 0; }
.kanban-col.drop-hover { background: #E6F5FC; }
.kanban-col-header { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; display:flex; justify-content:space-between; }
.kanban-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px;
  cursor: grab; font-size: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.kanban-card.dragging { opacity: 0.4; }
.kanban-card .cat-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; }
.kanban-card .amounts { display:flex; justify-content:space-between; margin-top:6px; font-size:11px; color: var(--muted); }

.todo-item { display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px solid #f2f2f4; gap:8px; }
.todo-item:last-child { border-bottom:none; }
.todo-item.fait .todo-label { text-decoration: line-through; color: var(--muted); }

.recap-hero {
  background: linear-gradient(135deg, #17171A 0%, #232326 60%, #1C1C1E 100%);
  border-radius: 20px; padding: 28px 32px; color: white; margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px;
}
.recap-hero .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #FFCE2E; font-weight: 600; margin-bottom: 6px; }
.recap-hero h2 { font-size: 24px; font-weight: 600; margin: 0 0 4px; color: white; }
.recap-hero .client-name { font-size: 14px; color: #BFC0C6; }
.recap-hero input[type=text] { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: white; font-size: 20px; font-weight: 600; padding: 6px 10px; }
.recap-hero input[type=date] { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: white; }

.save-pill {
  display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 20px; padding: 6px 14px; font-size: 12px; color: #D9DADF;
}
.save-dot { width: 8px; height: 8px; border-radius: 50%; background: #2FE07A; animation: pulseDot 1.8s infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.4; transform: scale(0.75);} }

.recap-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.recap-card { background: var(--white); border-radius: 18px; padding: 0; overflow: hidden; box-shadow: 0 4px 18px rgba(20,20,20,0.06); border: 1px solid var(--border); }
.recap-card-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-size: 14px; font-weight: 600; }
.recap-card-header .icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; }
.recap-card.points .recap-card-header .icon { background: var(--blue); }
.recap-card.decisions .recap-card-header .icon { background: #2FE07A; }
.recap-card.etapes .recap-card-header .icon { background: var(--yellow); color: #5A4400; }
.recap-card textarea {
  width: 100%; border: none; padding: 4px 20px 22px; font-size: 15px; line-height: 1.7; font-family: "Poppins", sans-serif;
  resize: vertical; min-height: 160px; background: transparent;
}
.recap-card textarea:focus { outline: none; background: #FAFBFF; }
.recap-card.decisions, .recap-card.etapes { margin-bottom: 18px; }
.recap-actions { display: flex; gap: 10px; margin-top: 6px; }

/* -- Passe de design general -- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.main { animation: fadeInUp 0.35s ease-out; }

.card { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.card:hover { box-shadow: 0 6px 20px rgba(20,20,20,0.07); }

.btn { transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease; }
.btn.accent { box-shadow: 0 3px 10px rgba(47,171,224,0.28); }
.btn.accent:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(47,171,224,0.36); opacity: 1; }
.btn:active { transform: translateY(0) scale(0.98); }

.nav-item { transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease; }
.nav-item:hover { padding-left: 16px; }
.nav-item.active { box-shadow: 0 3px 10px rgba(0,0,0,0.18); }

.link-row { transition: background 0.15s ease; border-radius: 8px; }
.link-row:hover { background: #FAFAFB; padding-left: 6px; padding-right: 6px; }

table tr { transition: background 0.12s ease; }
table tr:hover td { background: #FAFAFB; }

.kanban-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20,20,20,0.1); }

.gantt-bar { transition: box-shadow 0.15s ease; }
.gantt-bar:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.25); }

.bell { transition: transform 0.15s ease; display: inline-block; }
.bell:hover { transform: rotate(-12deg); }

.kpi-value { transition: color 0.2s ease; }

.login-wrap {
  background:
    radial-gradient(circle at 15% 20%, rgba(47,171,224,0.16), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255,206,46,0.18), transparent 45%),
    var(--bg);
}
.login-card { box-shadow: 0 20px 50px rgba(20,20,20,0.10); animation: fadeInUp 0.4s ease-out; }
.login-card button.btn.accent { box-shadow: 0 6px 18px rgba(47,171,224,0.35); }

.profile-summary { transition: background 0.15s ease, border-color 0.15s ease; }
.profile-menu { animation: fadeInUp 0.15s ease-out; }

::selection { background: #FFCE2E; color: #1C1C1E; }

.todo-item[draggable="true"] { cursor: grab; }
.todo-item.dragging { opacity: 0.4; }
.drag-handle { color: var(--muted); font-size: 14px; cursor: grab; margin-right: 4px; user-select: none; }

.danger-text { color: var(--danger, #c0392b); font-weight: 600; }

.postit-wall { display: flex; flex-wrap: wrap; gap: 22px; padding: 10px 0; }
.postit { width: 190px; min-height: 150px; padding: 14px; box-shadow: 3px 4px 10px rgba(0,0,0,0.15); display: flex; flex-direction: column; justify-content: space-between; font-family: inherit; }
.postit-content { font-size: 13px; white-space: pre-wrap; word-break: break-word; color: #33301f; }
.postit-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; }
.postit-delete { background: none; border: none; cursor: pointer; font-size: 16px; color: #33301f; opacity: 0.6; }
.postit-delete:hover { opacity: 1; }

.editorial-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.editorial-day { background: var(--white, #fff); border-radius: 8px; padding: 6px; min-height: 110px; border: 1px solid #eee; }
.editorial-day-header { font-weight: 600; font-size: 12px; margin-bottom: 6px; color: var(--muted, #888); }
.editorial-pub { border-radius: 6px; padding: 5px 7px; margin-bottom: 5px; position: relative; }
.editorial-pub form { position: absolute; top: 2px; right: 4px; }

.cat-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.faq-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.faq-item { border: 1px solid #eee; border-radius: 8px; padding: 10px 14px; }
.faq-item summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 500; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { margin-bottom: 10px; }
.faq-body { padding-top: 4px; }
