@import url("../checkboxes.css");

/* =========================================================
   GLOBAL
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
}

:root {
  --accent-green: #22c55e;
  --text-primary: #e6e6e6;
}

body {
  background:
    radial-gradient(circle at 20% 10%, rgba(34,197,94,0.12), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(99,102,241,0.10), transparent 45%),
    radial-gradient(circle at top, #0b1020, #05070f);
  color: #e6e6e6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

body.light-mode {
  background:
    radial-gradient(circle at 20% 10%, rgba(22,163,74,0.08), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(99,102,241,0.06), transparent 45%),
    linear-gradient(to bottom, #f8f9fa, #f0f1f3);
  color: #1a202c;
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #22c55e, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 15px;
}

.nav-btn {
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: inline-block;
}

.nav-btn:hover {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: #22c55e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.2);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
  color: #22c55e;
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

/* THEME TOGGLE */
.nav-theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  transform: rotate(20deg) scale(1.1);
}

body.light-mode .theme-toggle {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: #16a34a;
}

body.light-mode .theme-toggle:hover {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.2);
}

/* =========================================================
   APP FRAME
========================================================= */
.app {
  display: flex;
  height: calc(100vh - 70px);
  width: 100%;
}

/* =========================================================
   SIDEBAR (GLASS + DEPTH)
========================================================= */
.sidebar {
  width: 290px;
  min-width: 290px;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 10px 0 40px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(59,130,246,0.12), transparent 60%);
  pointer-events: none;
}

/* TITLE */
.sidebar h2 {
  font-size: 22px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 0.6px;
  position: relative;
  z-index: 1;
}

/* SEARCH */
.sidebar input {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(15, 23, 42, 0.85);
  color: white;
  outline: none;
  transition: 0.25s ease;
  position: relative;
  z-index: 1;
}

.sidebar input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.25);
}

/* MENU */
.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu button {
  background: rgba(17, 28, 51, 0.9);
  border: 1px solid rgba(255,255,255,0.05);
  color: #cbd5e1;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: all 0.2s ease;
}

.menu button:hover {
  background: rgba(34, 197, 94, 0.15);
  transform: translateX(5px);
  color: #fff;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
}

/* HINT */
.hint {
  margin-top: auto;
  font-size: 12px;
  color: #94a3b8;
  padding: 12px;
  border-left: 3px solid #22c55e;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.08);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* =========================================================
   MAIN AREA
========================================================= */
.main {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.5), rgba(5, 7, 15, 0.3));
}

/* SCROLLBAR */
.main::-webkit-scrollbar {
  width: 8px;
}

.main::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.4);
  border-radius: 10px;
}

.main::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.6);
}

.main::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================================================
   PANEL
========================================================= */
.panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(34, 197, 94, 0.15);
  padding: 22px;
  border-radius: 14px;
  margin-bottom: 25px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.panel h2 {
  font-size: 18px;
  color: #22c55e;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

/* INPUTS */
.panel input,
.panel select {
  width: 100%;
  padding: 12px 14px;
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 23, 42, 0.8);
  color: white;
  outline: none;
  transition: 0.25s ease;
}

.panel input:focus,
.panel select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

/* TOGGLES */
.toggles {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
  font-size: 13px;
  color: #94a3b8;
}

.toggles label {
  cursor: pointer;
  transition: 0.2s;
}

.toggles label:hover {
  color: #e2e8f0;
}

/* ADD BUTTON */
.panel button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: black;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  letter-spacing: 0.4px;
}

.panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.25);
}

/* =========================================================
   LIST GRID
========================================================= */
.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

/* =========================================================
   ZONE CARD (HIGH-END CARD STYLE)
========================================================= */
.zone {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 14px;
  padding: 18px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* LIGHT GLOW LAYER */
.zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left,
    rgba(34, 197, 94, 0.15),
    transparent 60%);
  opacity: 0;
  transition: 0.3s ease;
  pointer-events: none;
}

/* SOFT GRID NOISE LAYER */
.zone::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.03;
  pointer-events: none;
}

.zone:hover {
  transform: translateY(-5px);
  border-color: #22c55e;
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.2);
}

.zone:hover::before {
  opacity: 1;
}

/* TITLE */
.zone h3 {
  font-size: 16px;
  margin-bottom: 14px;
  color: #22c55e;
  letter-spacing: 0.3px;
  font-weight: 600;
}

/* ROW */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  color: #cbd5e1;
}

.row span {
  pointer-events: none;
}

/* CHECKBOX */
.row input {
  transform: scale(1.2);
  cursor: pointer;
}

/* =========================================================
   DELETE BUTTON (GAME STYLE WARNING)
========================================================= */
.delete-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid #ef4444;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
  z-index: 2;
}

.delete-btn:hover {
  transform: translateY(-2px);
  background: #ef4444;
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.delete-btn:active {
  transform: translateY(0);
}

/* =========================================================
   GLOBAL MICRO POLISH
========================================================= */
button {
  user-select: none;
}

/* =========================================================
   LIGHT MODE STYLES
========================================================= */
body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-btn {
  background: rgba(249, 250, 251, 0.8);
  color: #334155;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .nav-btn:hover {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: #16a34a;
}

body.light-mode .nav-btn.active {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(20, 184, 166, 0.1));
  color: #16a34a;
  border-color: #16a34a;
}

body.light-mode .sidebar {
  background: rgba(255, 255, 255, 0.85);
  border-right-color: rgba(0, 0, 0, 0.08);
  box-shadow: 5px 0 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .sidebar h2 {
  color: #16a34a;
}

body.light-mode .sidebar input {
  background: rgba(249, 250, 251, 0.9);
  color: #1a202c;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .sidebar input:focus {
  border-color: #16a34a;
}

body.light-mode .menu button {
  background: rgba(249, 250, 251, 0.9);
  color: #334155;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .menu button:hover {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

body.light-mode .hint {
  background: rgba(22, 163, 74, 0.08);
  border-left-color: #16a34a;
  color: #4b5563;
}

body.light-mode .main {
  background: linear-gradient(180deg, rgba(248, 249, 250, 0.5), rgba(240, 241, 243, 0.3));
}

body.light-mode .panel {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(22, 163, 74, 0.15);
}

body.light-mode .panel h2 {
  color: #16a34a;
}

body.light-mode .panel input,
body.light-mode .panel select {
  background: rgba(249, 250, 251, 0.9);
  color: #1a202c;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .toggles label {
  color: #475569;
}

body.light-mode .panel button {
  background: linear-gradient(135deg, #16a34a, #14b8a6);
  color: white;
}

body.light-mode .zone {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(22, 163, 74, 0.15);
}

body.light-mode .zone h3 {
  color: #16a34a;
}

body.light-mode .zone .row {
  color: #475569;
}

body.light-mode .delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid #dc2626;
}

body.light-mode .delete-btn:hover {
  background: #dc2626;
  color: white;
}

.home-btn {
  min-width: 45px;
  text-align: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 10px;
  padding: 16px;
}

.summary-card strong {
  display: block;
  color: #22c55e;
  font-size: 26px;
}

.summary-card span {
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #94a3b8;
}

.toolbar button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  cursor: pointer;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.pill,
.priority {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.75);
}

.priority-haute {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.priority-basse {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.45);
}

.progress-line {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 7px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  margin-bottom: 12px;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #14b8a6);
}

.note-field {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.8);
  color: #e6e6e6;
  padding: 10px 12px;
}

.is-done {
  border-color: rgba(34, 197, 94, 0.55);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 24px;
  color: #94a3b8;
  text-align: center;
}

body.light-mode .summary-card,
body.light-mode .toolbar button {
  background: rgba(255, 255, 255, 0.75);
}

body.light-mode .note-field {
  background: rgba(249, 250, 251, 0.9);
  color: #1a202c;
  border-color: rgba(0, 0, 0, 0.08);
}


::selection {
  background: rgba(59,130,246,0.35);
}

/* =========================================================
   THEME REFINEMENT
========================================================= */
body {
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.08), transparent 300px),
    #05070f;
}

body.light-mode {
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.08), transparent 300px),
    #f6f8fb;
}

.navbar {
  background: rgba(5, 7, 15, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(15, 23, 42, 0.12);
}

.main {
  background: rgba(5, 7, 15, 0.38);
}

body.light-mode .main {
  background: rgba(246, 248, 251, 0.72);
}

.sidebar,
.panel,
.zone,
.summary-card {
  background: rgba(10, 16, 30, 0.84);
  border-color: rgba(34, 197, 94, 0.2);
}

body.light-mode .sidebar,
body.light-mode .panel,
body.light-mode .zone,
body.light-mode .summary-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.theme-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 21px;
  line-height: 1;
  background: #0b1220;
  border-color: rgba(34, 197, 94, 0.42);
}

body.light-mode .theme-toggle {
  background: #ffffff;
  border-color: rgba(22, 163, 74, 0.38);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

body.light-mode .pill,
body.light-mode .priority,
body.light-mode .toolbar button {
  background: #ffffff;
  color: #334155;
  border-color: rgba(15, 23, 42, 0.12);
}
