/* ============================================================
   QURAN HIFZ PLANNER — style.css
   Thèmes : floral (défaut) + islamic arabesque (beige/vert)
   ============================================================ */

/* ── Google Font ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ══════════════════════════════════════════════════════════
   VARIABLES PAR THÈME
   ══════════════════════════════════════════════════════════ */

/* Thème Floral Girly (défaut) */
[data-theme="floral"], :root {
  --primary:    #9b4f68;
  --primary2:   #d89aaa;
  --primary-lt: #fff0f4;
  --primary-md: #f8dce4;
  --bg:         #fffafd;
  --surface:    #ffffff;
  --ink:        #452c34;
  --muted:      #7b6269;
  --line:       #ead1d8;
  --green:      #6d9b83;
  --shadow:     0 10px 30px rgba(117,65,82,.10);
  --radius-lg:  22px;
  --radius-md:  15px;
  --radius-sm:  10px;
  /* Auth blobs */
  --blob1: #f8c8d8;
  --blob2: #f0d4e8;
  --blob3: #fde8f0;
  /* Motif */
  --pattern: none;
}

/* Thème Islamic Arabesque (beige + vert) */
[data-theme="islamic"] {
  --primary:    #2d6a4f;
  --primary2:   #52b788;
  --primary-lt: #eef7f2;
  --primary-md: #d8ede2;
  --bg:         #f5f0e6;
  --surface:    #faf7f0;
  --ink:        #1b3a2d;
  --muted:      #5a7566;
  --line:       #c9ddd0;
  --green:      #40916c;
  --shadow:     0 10px 30px rgba(45,106,79,.12);
  --radius-lg:  22px;
  --radius-md:  15px;
  --radius-sm:  10px;
  --blob1: #c3e6d0;
  --blob2: #d4e8c2;
  --blob3: #e8f4ec;
  /* Motif arabesque SVG en data-URI */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%232d6a4f' stroke-width='0.5' opacity='0.08'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3Cpath d='M30 18 L42 30 L30 42 L18 30 Z'/%3E%3Ccircle cx='30' cy='30' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="islamic"] body {
  background-image: var(--pattern);
}

/* ══════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Tajawal', 'Segoe UI', 'Tahoma', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  transition: background-color .4s, color .3s;
}

button, input, textarea { font: inherit; outline: none; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════
   HEADER / TOPBAR
   ══════════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 0 5%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .3s, border-color .3s;
}

[data-theme="islamic"] .topbar {
  background: rgba(245,240,230,.92);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-icon  { font-size: 22px; color: var(--primary); }
.topbar-title { font-size: 18px; font-weight: 800; color: var(--primary); white-space: nowrap; }

.topbar-nav { display: flex; gap: 4px; }
.nav-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
.nav-btn:hover { background: var(--primary-lt); color: var(--primary); transform: translateY(-1px); }
.nav-btn.active { background: var(--primary); color: #fff; }

.topbar-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-badge {
  background: var(--primary-lt);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.btn-logout {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
}
.btn-logout:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.hamburger {
  display: none;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 5%;
  position: sticky;
  top: 64px;
  z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-btn { text-align: right; justify-content: flex-start; }
.logout-mob { color: #c0392b !important; }

/* ══════════════════════════════════════════════════════════
   VUES (Home / Planner / Settings)
   ══════════════════════════════════════════════════════════ */
.app-main { min-height: calc(100vh - 64px - 72px); }
.view { display: none; }
.view.active { display: block; }
.container { width: min(1250px, 92%); margin: 28px auto 60px; }

/* ── Boutons génériques ─────────────────────────────────── */
.btn {
  border: 0; border-radius: var(--radius-sm);
  padding: 10px 18px; cursor: pointer; font-weight: 700;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.btn.primary  { background: var(--primary); color: #fff; }
.btn.secondary{ background: var(--surface); color: var(--primary); border: 1px solid var(--line); }
.btn.large    { padding: 13px 26px; font-size: 16px; }
.btn.full     { width: 100%; margin-top: 7px; text-align: center; }

/* ══════════════════════════════════════════════════════════
   VUE HOME
   ══════════════════════════════════════════════════════════ */
.hero {
  display: flex; gap: 28px;
  justify-content: space-between; align-items: center;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-lt), var(--bg));
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.hero-text { max-width: 680px; }
.pill {
  display: inline-block;
  background: var(--primary-md);
  color: var(--primary);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
h1 { font-size: 32px; color: var(--primary); margin: 8px 0; line-height: 1.3; }
h2 { font-size: 22px; color: var(--primary); }
h3 { font-size: 17px; color: var(--primary); margin-bottom: 14px; }
.hero p { color: var(--muted); line-height: 1.8; margin-top: 6px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.hero-stat { text-align: center; min-width: 170px; }
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.progress-ring {
  --p: 0;
  width: 125px; height: 125px;
  border-radius: 50%; margin: auto;
  display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p)*1%), var(--primary-md) 0);
  position: relative;
}
.progress-ring::after {
  content: ""; position: absolute; inset: 10px;
  background: var(--bg); border-radius: 50%;
}
.progress-ring span { position: relative; z-index: 1; font-size: 22px; font-weight: 800; color: var(--primary); }
#progressText { font-size: 12px; color: var(--muted); margin-top: 8px; }

.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 20px 0;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 18px;
  box-shadow: var(--shadow); text-align: center;
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card span { font-size: 22px; display: block; }
.stat-card b { display: block; font-size: 26px; color: var(--primary); margin: 6px 0; }
.stat-card small { color: var(--muted); font-size: 12px; }

.home-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* ── Original plan (Home view) — image change selon le thème ────────── */
.original-plan { margin-top: 34px; }
.original-plan-img {
  display: none;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
[data-theme="floral"]  .theme-img-floral  { display: block; }
[data-theme="islamic"] .theme-img-islamic { display: block; }

/* ══════════════════════════════════════════════════════════
   VUE PLANNER
   ══════════════════════════════════════════════════════════ */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; }
.main-column, .side-column { min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 14px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.month-nav { display: flex; gap: 7px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--primary); font-size: 22px; cursor: pointer;
  transition: .2s;
}
.icon-btn:hover { background: var(--primary); color: #fff; }

.calendar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow); }
.weekdays, .calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.weekdays div { text-align: center; color: var(--muted); font-size: 11px; padding: 7px 2px; font-weight: 600; }

.day {
  min-height: 110px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface);
  cursor: pointer; padding: 8px; position: relative;
  transition: .15s;
}
.day:hover { border-color: var(--primary2); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.day.other { opacity: .35; }
.day.selected { outline: 2px solid var(--primary); background: var(--primary-lt); }
.day.today { box-shadow: inset 0 0 0 2px var(--primary2); }
.day-number { font-weight: 800; color: var(--primary); font-size: 13px; }
.day-type { font-size: 9px; color: var(--muted); margin-top: 4px; }
.mini-task { font-size: 9px; margin-top: 4px; line-height: 1.4; color: var(--ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); position: absolute; left: 8px; top: 10px; }
.dot.done { background: var(--green); }

.day-panel {
  margin-top: 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow);
}
.empty-state { text-align: center; color: var(--muted); padding: 24px; }
.task-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.task-date { font-size: 12px; color: var(--muted); }
.task-title { font-size: 24px; color: var(--primary); font-weight: 800; margin: 3px 0; }
.task-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 15px; }
.task {
  border: 1px solid var(--line); border-radius: 13px;
  padding: 14px; background: var(--primary-lt);
  display: flex; gap: 10px; align-items: flex-start;
}
.task input { width: 20px; height: 20px; accent-color: var(--primary); margin-top: 2px; }
.task strong { display: block; font-size: 14px; color: var(--ink); }
.task span { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 3px; }
.note {
  margin-top: 14px; width: 100%;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; min-height: 70px; resize: vertical;
  background: var(--surface); color: var(--ink);
}

/* Sidebar */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 17px; padding: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.routine div {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px;
}
.routine div:last-child { border-bottom: 0; }
.routine span { color: var(--muted); text-align: left; }
.routine .fix { background: #fff7e9; margin: 0 -8px; padding: 8px; border-radius: 7px; }
.routine .rest { background: var(--primary-lt); margin: 0 -8px; padding: 8px; border-radius: 7px; }
.weekly-total { margin-top: 10px; padding: 9px; background: var(--primary-lt); border-radius: 9px; font-size: 11px; text-align: center; }
.tips { margin: 0; padding-right: 18px; color: var(--muted); line-height: 1.9; font-size: 11px; }
.year-item { padding: 9px; border-bottom: 1px solid var(--line); }
.year-item:last-child { border-bottom: 0; }
.year-item b { color: var(--primary); font-size: 11px; }
.year-item span { display: block; color: var(--muted); font-size: 9px; direction: ltr; text-align: right; }
.small { color: var(--muted); font-size: 11px; line-height: 1.6; }


/* ══════════════════════════════════════════════════════════
   VUE SETTINGS
   ══════════════════════════════════════════════════════════ */
.settings-container { max-width: 860px; }
.settings-header { margin-bottom: 28px; }
.settings-header h2 { font-size: 28px; color: var(--primary); }
.settings-header p  { color: var(--muted); margin-top: 5px; }
.settings-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.settings-section-title { font-size: 18px; color: var(--primary); margin-bottom: 6px; }
.settings-desc { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

/* Grille de thèmes */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.theme-card {
  border: 2px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer;
  transition: border-color .25s, transform .2s, box-shadow .2s;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.theme-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-md); }

/* Préview Floral */
.theme-preview { height: 100px; padding: 10px; position: relative; }
.floral-preview { background: linear-gradient(135deg, #fff0f4, #fffafd); }
.islamic-preview { background: linear-gradient(135deg, #eef7f2, #f5f0e6); }

.tp-bar {
  height: 14px; border-radius: 6px; margin-bottom: 8px;
}
.floral-preview .tp-bar { background: #9b4f68; }
.islamic-preview .tp-bar { background: #2d6a4f; }

.tp-card {
  height: 28px; border-radius: 7px;
}
.floral-preview .tp-card { background: rgba(155,79,104,.15); }
.islamic-preview .tp-card { background: rgba(45,106,79,.15); }

.tp-card.sm {
  height: 18px; width: 60%; margin-top: 6px;
}

.theme-info {
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.theme-name { display: block; font-weight: 800; color: var(--ink); font-size: 14px; }
.theme-desc { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.theme-active-badge {
  display: inline-block; margin-top: 6px;
  background: var(--primary); color: #fff;
  padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}

/* Compte */
.account-info { margin-bottom: 16px; }
.account-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.account-row:last-child { border-bottom: 0; }
.account-row span { color: var(--muted); }
.account-row strong { color: var(--ink); font-weight: 700; }
.danger-btn { border: 1px solid #e57373 !important; color: #c0392b !important; }
.danger-btn:hover { background: #c0392b !important; color: #fff !important; }

/* ── Plan configuration form ─────────────────────────────── */
.plan-form { display: flex; flex-direction: column; gap: 18px; }

.plan-row { display: flex; flex-direction: column; gap: 6px; }
.plan-row label { font-size: 13px; font-weight: 700; color: var(--ink); }
.plan-row input[type="date"],
.plan-row select {
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s;
  max-width: 320px;
}
.plan-row input[type="date"]:focus,
.plan-row select:focus { border-color: var(--primary); outline: none; }

/* Range slider */
.plan-row input[type="range"] {
  -webkit-appearance: none;
  width: 100%; max-width: 400px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary-md);
  outline: none;
  accent-color: var(--primary);
}
.plan-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.range-marks {
  display: flex; justify-content: space-between;
  max-width: 400px; padding: 0 2px;
}
.range-marks span { font-size: 10px; color: var(--muted); }

/* Deux colonnes */
.plan-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Aperçu du plan */
.plan-preview {
  background: var(--primary-lt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  min-height: 80px;
}
.plan-error { color: #c0392b; font-weight: 700; font-size: 13px; }
.plan-summary {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px;
}
.ps-item {
  text-align: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 6px;
}
.ps-item b { display: block; font-size: 18px; color: var(--primary); font-weight: 900; }
.ps-item span { font-size: 10px; color: var(--muted); margin-top: 2px; display: block; }
.ps-complete b { color: var(--green) !important; }

.plan-week-preview { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.pw-day {
  border-radius: 8px; padding: 8px 4px; text-align: center;
  font-size: 10px; border: 1px solid transparent;
}
.pw-day.pw-new  { background: var(--primary-lt); border-color: var(--primary2); }
.pw-day.pw-fix  { background: #fff7e9; border-color: #f0c040; }
.pw-day.pw-rest { background: var(--primary-lt); border-color: var(--green); }
.pw-name { display: block; font-weight: 800; color: var(--ink); margin-bottom: 4px; font-size: 9px; }
.pw-task { display: block; color: var(--muted); font-size: 9px; line-height: 1.3; }

.plan-save-btn { align-self: flex-start; padding: 12px 28px; font-size: 15px; }

@media (max-width: 650px) {
  .plan-cols   { grid-template-columns: 1fr; }
  .plan-summary{ grid-template-columns: repeat(2,1fr); }
  .plan-week-preview { grid-template-columns: repeat(4,1fr); }
  .plan-save-btn { width: 100%; align-self: stretch; }
}

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 20px 5%;
}
.footer-inner {
  max-width: 1250px; margin: auto;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.footer-logo { font-size: 22px; color: var(--primary2); }
.footer-text { text-align: center; }
.footer-text p { color: var(--muted); font-size: 13px; font-weight: 600; }
.footer-copy { font-size: 12px; margin-top: 2px; }
.footer-copy a { color: var(--primary); font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--ink); color: #fff;
  padding: 11px 22px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: .3s; z-index: 200; font-size: 13px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════════════
   PAGE LOGIN / AUTH
   ══════════════════════════════════════════════════════════ */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }

[data-theme="floral"].auth-page,
.auth-page { background: linear-gradient(135deg, #ffe0ec 0%, #fff5fb 50%, #ffe8f0 100%); }

.auth-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.auth-blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .55;
  animation: floatBlob 8s ease-in-out infinite alternate;
}
.b1 { width: 400px; height: 400px; background: var(--blob1, #f8c8d8); top: -100px; right: -80px; animation-duration: 9s; }
.b2 { width: 320px; height: 320px; background: var(--blob2, #f0d4e8); bottom: -80px; left: -60px; animation-duration: 11s; animation-delay: -3s; }
.b3 { width: 250px; height: 250px; background: var(--blob3, #fde8f0); top: 40%; left: 55%; animation-duration: 7s; animation-delay: -5s; }

@keyframes floatBlob {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

.auth-wrapper { position: relative; z-index: 1; width: 100%; max-width: 460px; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 20px; }

.auth-brand { text-align: center; }
.auth-brand-icon { font-size: 48px; color: var(--primary, #9b4f68); line-height: 1; }
.auth-brand-title { font-size: 24px; font-weight: 900; color: var(--primary, #9b4f68); margin: 8px 0 4px; }
.auth-brand-sub { color: var(--muted, #7b6269); font-size: 14px; }

.auth-card {
  width: 100%;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(155,79,104,.15);
}

.auth-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: rgba(155,79,104,.08); padding: 4px; border-radius: 12px; }
.auth-tab {
  flex: 1; border: none; background: transparent;
  color: var(--muted, #7b6269); padding: 9px; border-radius: 9px;
  font-weight: 700; cursor: pointer; transition: .2s; font-size: 14px;
}
.auth-tab.active { background: var(--primary, #9b4f68); color: #fff; }

.auth-msg {
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
  margin-bottom: 14px; font-weight: 600;
}
.auth-msg.error   { background: #fff0f0; color: #c0392b; border: 1px solid #f5c6cb; }
.auth-msg.success { background: #f0fff4; color: #27ae60; border: 1px solid #b2dfdb; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label { font-size: 13px; font-weight: 700; color: var(--ink, #452c34); }
.field-wrap {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line, #ead1d8); border-radius: 10px;
  background: rgba(255,255,255,.9); padding: 0 12px;
  transition: border-color .2s, box-shadow .2s;
}
.field-wrap:focus-within { border-color: var(--primary, #9b4f68); box-shadow: 0 0 0 3px var(--primary-md, #f8dce4); }
.field-icon { font-size: 16px; flex-shrink: 0; }
.field-wrap input {
  flex: 1; border: none; background: transparent;
  padding: 11px 0; font-size: 14px; color: var(--ink, #452c34);
}
.toggle-pass { border: none; background: transparent; cursor: pointer; font-size: 16px; padding: 4px; color: var(--muted, #7b6269); }
.field-hint { font-size: 11px; color: var(--muted, #7b6269); }

.btn-auth {
  width: 100%; padding: 13px;
  background: var(--primary, #9b4f68); color: #fff;
  border: none; border-radius: 12px; font-size: 16px; font-weight: 800;
  cursor: pointer; margin-top: 4px;
  transition: transform .15s, box-shadow .15s;
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(155,79,104,.4); }
.btn-auth:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.auth-switch { text-align: center; font-size: 13px; color: var(--muted, #7b6269); }
.auth-switch a { color: var(--primary, #9b4f68); font-weight: 700; }

/* Mot de passe oublié / réinitialisation */
.auth-forgot { margin-top: -6px; }
.auth-forgot a { font-size: 12px; color: var(--primary, #9b4f68); font-weight: 700; text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }
.auth-form-title { font-size: 18px; font-weight: 800; color: var(--primary, #9b4f68); margin: 0; }
.auth-form-desc { font-size: 13px; color: var(--muted, #7b6269); line-height: 1.7; margin: 0 0 4px; }
.btn-auth-link { display: block; text-align: center; text-decoration: none; box-sizing: border-box; }

.auth-footer { text-align: center; font-size: 12px; color: var(--muted, #7b6269); }
.auth-footer a { color: var(--primary, #9b4f68); font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .topbar-nav  { display: none; }
  .topbar-user { display: none; }
  .hamburger   { display: block; }
  .layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .hero { flex-direction: column; text-align: center; }
  .hero-actions { justify-content: center; }
  .theme-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .container { width: 96%; }
  .topbar { padding: 0 3%; }
  .topbar-title { font-size: 15px; }
  h1 { font-size: 26px; }
  .hero { padding: 18px; }
  .day { min-height: 85px; padding: 5px; }
  .mini-task { display: none; }
  .weekdays { gap: 2px; } .calendar { gap: 2px; }
  .day { border-radius: 7px; }
  .task-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .auth-card { padding: 22px 18px; }
}
