/* ============================================
   MON QG · STYLES
   Palette : sauge / miel / lavande / rose / terracotta / sable
   Inspiration : Jodi Graham
   ============================================ */

:root {
  --sauge: #E1F5EE;
  --sauge-deep: #8FC4B0;
  --sauge-dark: #5A9C82;
  --miel: #FAEEDA;
  --miel-deep: #D4A85F;
  --lavande: #EEEDFE;
  --lavande-deep: #A6A0DC;
  --rose: #FBEAF0;
  --rose-deep: #DC8DA9;
  --terracotta: #FAECE7;
  --terracotta-deep: #C77A5C;
  --sable: #F1EFE8;
  --sable-deep: #B5AC8E;
  --ink: #2A2A28;
  --ink-soft: #5C5A55;
  --ink-faint: #908C84;
  --check-done: #8FC4B0;
  --shadow-sm: 0 2px 8px rgba(42,42,40,0.04);
  --shadow-md: 0 4px 18px -6px rgba(42,42,40,0.08);
  --shadow-lg: 0 12px 36px -10px rgba(42,42,40,0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--sable);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 300;
  background-image:
    radial-gradient(circle at 15% 8%, rgba(225,245,238,0.5) 0%, transparent 35%),
    radial-gradient(circle at 85% 50%, rgba(238,237,254,0.4) 0%, transparent 45%),
    radial-gradient(circle at 50% 95%, rgba(251,234,240,0.3) 0%, transparent 40%);
  min-height: 100vh;
}

.serif { font-family: 'Fraunces', serif; }
.script { font-family: 'Caveat', cursive; }
.hidden { display: none !important; }

/* ============================================
   ÉCRAN DE CHARGEMENT
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--sable);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
}
.loading-content { text-align: center; }
.loading-emoji {
  font-size: 48px;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}
.loading-text {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-soft);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* ============================================
   ÉCRAN AUTH (connexion / inscription)
   ============================================ */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.auth-emoji { font-size: 36px; margin-bottom: 12px; }
.auth-title {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.auth-sub {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 28px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--sable);
  padding: 4px;
  border-radius: 99px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
}
.auth-tab.active { background: var(--ink); color: white; }
.auth-form { text-align: left; }
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--sable);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: var(--sable);
  transition: all 0.2s ease;
  color: var(--ink);
}
.auth-field input:focus {
  outline: none;
  border-color: var(--terracotta-deep);
  background: white;
}
.auth-error {
  background: var(--rose);
  color: var(--terracotta-deep);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin: 0 0 14px;
  display: none;
}
.auth-error.show { display: block; }
.auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-submit:hover { background: var(--terracotta-deep); }
.auth-submit:disabled { opacity: 0.6; cursor: wait; }
.auth-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.5;
}

/* ============================================
   NAVIGATION TOP
   ============================================ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241,239,232,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.brand:hover .brand-name { color: var(--terracotta-deep); }
.brand-emoji { font-size: 20px; }
.brand-name { transition: color 0.2s ease; }
.breadcrumb {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb .crumb-sep { margin: 0 8px; color: var(--ink-faint); }
.breadcrumb .crumb-link { cursor: pointer; transition: color 0.2s ease; }
.breadcrumb .crumb-link:hover { color: var(--terracotta-deep); }
.topnav-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: var(--ink-soft);
}
.icon-btn:hover { background: var(--terracotta); color: var(--terracotta-deep); }

/* ============================================
   CONTENEUR DE PAGES
   ============================================ */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 100px;
}
.page { animation: fadeIn 0.4s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HEAD POÉTIQUE (titre de page)
   ============================================ */
.page-head {
  text-align: center;
  padding: 24px 16px 36px;
}
.page-head .label {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 400;
}
.page-head h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 760px;
  margin: 0 auto 14px;
}
.page-head h1 em { font-style: italic; color: var(--terracotta-deep); font-weight: 300; }
.page-head .sub {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--ink-soft);
  transform: rotate(-1deg);
  display: inline-block;
}

/* ============================================
   CHAMPS ÉDITABLES
   ============================================ */
[contenteditable="true"] {
  outline: none;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 6px;
  border: 1.5px dashed transparent;
  transition: all 0.2s ease;
  cursor: text;
  position: relative;
}
[contenteditable="true"]:hover {
  border-color: rgba(199,122,92,0.3);
  background: rgba(255,255,255,0.5);
}
[contenteditable="true"]:focus {
  border-color: var(--terracotta-deep);
  background: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

/* ============================================
   PAGE ACCUEIL : "MES ESPACES"
   ============================================ */
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.space-card {
  background: white;
  border-radius: 22px;
  padding: 32px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
}
.space-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--terracotta-deep);
}
.space-card.coming-soon {
  background: rgba(255,255,255,0.5);
  cursor: not-allowed;
  opacity: 0.6;
}
.space-card.coming-soon:hover {
  transform: none;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
.space-emoji { font-size: 40px; margin-bottom: 12px; }
.space-name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.space-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 14px;
}
.space-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}
.space-tag.active { background: var(--sauge); color: var(--sauge-dark); }
.space-tag.soon { background: var(--lavande); color: var(--lavande-deep); }

/* ============================================
   ESPACE PETITS FRIPONS : NAVIGATION ONGLETS
   ============================================ */
.section-tabs {
  display: flex;
  gap: 6px;
  background: white;
  padding: 6px;
  border-radius: 99px;
  margin: 0 auto 28px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.section-tab {
  padding: 9px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.section-tab:hover { color: var(--ink); }
.section-tab.active { background: var(--ink); color: white; }

/* ============================================
   PAGE VISION
   ============================================ */
.scene-main {
  background: white;
  border-radius: 16px;
  padding: 40px 44px 36px;
  margin-bottom: 28px;
  box-shadow: 0 6px 0 rgba(0,0,0,0.04), 0 20px 50px -10px rgba(42,42,40,0.14);
  position: relative;
  transform: rotate(-0.4deg);
}
.scene-main::before {
  content: '❄';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(0.4deg);
  background: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--lavande-deep);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.scene-date {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--terracotta-deep);
  text-align: center;
  margin-bottom: 6px;
}
.scene-place {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 28px;
}
.scene-text {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  font-weight: 300;
  max-width: 580px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin: 56px 0 28px;
}
.section-head .num {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--terracotta-deep);
  display: block;
  margin-bottom: 4px;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.section-head h2 em { font-style: italic; color: var(--terracotta-deep); font-weight: 300; }

.timeline { display: flex; flex-direction: column; gap: 14px; }
.scene-card {
  background: white;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 2px 14px -4px rgba(42,42,40,0.08);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 22px;
  align-items: center;
}
.scene-card:nth-child(odd) { transform: rotate(-0.15deg); }
.scene-card:nth-child(even) { transform: rotate(0.15deg); }
.scene-when {
  text-align: center;
  padding: 12px 6px;
  border-radius: 12px;
}
.scene-card:nth-child(1) .scene-when { background: var(--rose); }
.scene-card:nth-child(2) .scene-when { background: var(--sauge); }
.scene-card:nth-child(3) .scene-when { background: var(--miel); }
.scene-card:nth-child(4) .scene-when { background: var(--terracotta); }
.scene-card:nth-child(5) .scene-when { background: var(--lavande); }
.scene-card:nth-child(6) .scene-when { background: var(--sable); border: 1px dashed var(--sable-deep); }
.scene-emoji { font-size: 22px; display: block; margin-bottom: 4px; }
.scene-month {
  font-family: 'Caveat', cursive;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.1;
}
.scene-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.mantra {
  background: white;
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
  margin: 48px 0 24px;
  position: relative;
  overflow: hidden;
}
.mantra::before, .mantra::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: 0.4;
}
.mantra::before { background: var(--sauge); top: -70px; left: -50px; }
.mantra::after { background: var(--rose); bottom: -70px; right: -50px; }
.mantra-text {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}
.mantra-text em { font-style: italic; color: var(--terracotta-deep); }
.mantra-author {
  margin-top: 16px;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--ink-soft);
}

/* ============================================
   PAGE PLAN D'ACTION : SÉLECTEUR DE MOIS
   ============================================ */
.month-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  margin: 0 auto 28px;
  background: white;
  border-radius: 99px;
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}
.month-pill {
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  position: relative;
}
.month-pill:hover { color: var(--ink); }
.month-pill.active { background: var(--ink); color: white; }
.month-pill .month-progress-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--check-done);
  margin-right: 5px;
  vertical-align: middle;
}
.month-pill:not(.active) .month-progress-dot { background: var(--sable-deep); }

/* PROGRESSION GLOBALE */
.month-progress {
  background: white;
  border-radius: 22px;
  padding: 26px 32px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow-md);
}
.mp-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 8px;
  font-weight: 500;
}
.mp-bar-wrap {
  height: 14px;
  background: var(--sable);
  border-radius: 99px;
  overflow: hidden;
}
.mp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sauge-deep), var(--miel-deep), var(--terracotta-deep));
  border-radius: 99px;
  width: 0%;
  transition: width 0.6s ease;
}
.mp-stat {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.mp-stat .of {
  color: var(--ink-faint);
  font-size: 16px;
  font-weight: 300;
  margin-left: 4px;
}

/* OBJECTIFS */
.obj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.obj-card {
  background: white;
  border-radius: 18px;
  padding: 22px 22px 24px;
  position: relative;
}
.obj-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  border-radius: 18px 18px 0 0;
}
.obj-card:nth-child(1)::before { background: var(--sauge-deep); }
.obj-card:nth-child(2)::before { background: var(--lavande-deep); }
.obj-card:nth-child(3)::before { background: var(--rose-deep); }
.obj-card:nth-child(4)::before { background: var(--miel-deep); }
.obj-icon { font-size: 22px; margin-bottom: 8px; }
.obj-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 14px;
}
.obj-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
  font-size: 13px;
}
.obj-row:last-child { border-bottom: none; }
.obj-row-label { color: var(--ink-soft); }
.obj-actual {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--terracotta-deep);
  min-width: 50px;
  text-align: right;
}
.obj-target {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-faint);
  min-width: 60px;
  text-align: right;
}
.obj-target::before { content: '/ '; }

/* SEMAINES */
.weeks-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}
.week-card {
  background: white;
  border-radius: 22px;
  padding: 24px 26px;
  position: relative;
  box-shadow: var(--shadow-md);
}
.week-card::before {
  content: '';
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 4px;
  border-radius: 0 0 4px 4px;
}
.weeks-stack .week-card:nth-child(1)::before { background: var(--sauge-deep); }
.weeks-stack .week-card:nth-child(2)::before { background: var(--miel-deep); }
.weeks-stack .week-card:nth-child(3)::before { background: var(--lavande-deep); }
.weeks-stack .week-card:nth-child(4)::before { background: var(--rose-deep); }
.weeks-stack .week-card:nth-child(5)::before { background: var(--terracotta-deep); }
.week-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sable);
  gap: 16px;
}
.week-num {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 4px;
  font-weight: 500;
}
.week-title {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.week-sub {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 13px;
  font-family: 'Fraunces', serif;
  font-weight: 300;
}
.week-meta { text-align: right; flex-shrink: 0; }
.week-time {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
}
.week-time-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.tasks { display: flex; flex-direction: column; gap: 7px; }
.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: var(--sable);
  border-radius: 11px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.task:hover {
  background: white;
  border-color: var(--sable-deep);
}
.task-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--sable-deep);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 0.2s ease;
  cursor: pointer;
}
.task.done .task-check {
  background: var(--check-done);
  border-color: var(--check-done);
}
.task.done .task-check::after {
  content: '✓';
  color: white;
  font-weight: 700;
  font-size: 13px;
}
.task.done .task-text { text-decoration: line-through; color: var(--ink-faint); }
.task-text { flex: 1; font-size: 14px; line-height: 1.45; }
.task-time {
  font-size: 11px;
  color: var(--ink-faint);
  background: white;
  padding: 3px 9px;
  border-radius: 99px;
  flex-shrink: 0;
  font-weight: 500;
}
.task.done .task-time { opacity: 0.5; }

.week-progress {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wp-label {
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wp-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--sable);
  border-radius: 99px;
  overflow: hidden;
}
.wp-bar {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s ease;
  background: var(--terracotta-deep);
}
.wp-percent {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 13px;
  min-width: 36px;
  text-align: right;
}

/* NOTES */
.notes-card {
  background: var(--miel);
  border-radius: 22px;
  padding: 26px 32px;
  margin-bottom: 28px;
  position: relative;
}
.notes-card::before {
  content: '✿';
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 24px;
  color: var(--miel-deep);
  opacity: 0.5;
}
.notes-title {
  font-family: 'Caveat', cursive;
  font-size: 26px;
  margin-bottom: 12px;
  color: var(--ink);
}
.notes-content {
  font-family: 'Caveat', cursive;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  min-height: 100px;
}

/* MOIS VIDE (placeholder) */
.empty-month {
  background: white;
  border-radius: 22px;
  padding: 64px 40px;
  text-align: center;
  margin-top: 24px;
}
.empty-month-emoji { font-size: 48px; margin-bottom: 16px; }
.empty-month-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}
.empty-month-text {
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 20px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.empty-month-btn {
  background: var(--ink);
  color: white;
  padding: 11px 22px;
  border-radius: 99px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.empty-month-btn:hover { background: var(--terracotta-deep); }

/* PAGE STRATÉGIE / TUTOS — placeholder */
.placeholder-page {
  background: white;
  border-radius: 22px;
  padding: 48px 32px;
  text-align: center;
  max-width: 640px;
  margin: 32px auto;
}
.placeholder-emoji { font-size: 40px; margin-bottom: 14px; }
.placeholder-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
}
.placeholder-text {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(-12px);
  transition: all 0.3s ease;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.error { background: var(--terracotta-deep); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 760px) {
  .topnav { padding: 12px 16px; flex-wrap: wrap; }
  .breadcrumb { order: 3; flex-basis: 100%; text-align: left; padding-top: 4px; }
  .auth-card { padding: 36px 24px; }
  .month-progress { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .week-header { flex-direction: column; align-items: flex-start; }
  .week-meta { text-align: left; }
  .scene-card { grid-template-columns: 1fr; gap: 12px; }
  .scene-when { padding: 14px; }
  .scene-main { padding: 28px 22px; }
  .toast { top: 72px; right: 12px; left: 12px; text-align: center; }
}

/* ============================================
   PANNEAU LATÉRAL DES TUTORIELS
   ============================================ */
.task-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 42, 40, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.task-panel-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.task-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 560px;
  max-width: 100vw;
  background: var(--sable);
  z-index: 201;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  box-shadow: -10px 0 40px -8px rgba(42,42,40,0.15);
}
.task-panel.show { transform: translateX(0); }
.tp-header {
  position: sticky;
  top: 0;
  background: rgba(241,239,232,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}
.tp-back {
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.tp-back:hover { background: white; color: var(--ink); }
.tp-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.tp-close:hover { background: var(--rose); color: var(--terracotta-deep); }

.tp-body { padding: 24px 28px 80px; }

.tp-title-block { margin-bottom: 22px; }
.tp-task-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 8px;
}
.tp-task-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-faint);
}
.tp-meta-pill {
  background: white;
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 500;
}

.tp-section {
  background: white;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.tp-section-title {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.005em;
}
.tp-section-emoji { font-size: 16px; }
.tp-section-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}
.tp-section-content p + p { margin-top: 8px; }
.tp-section-content a {
  color: var(--terracotta-deep);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

/* Étapes cochables */
.tp-steps { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tp-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--sable);
  border-radius: 10px;
  transition: all 0.2s ease;
}
.tp-step:hover { background: var(--miel); }
.tp-step-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--sable-deep);
  background: white;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.tp-step.done .tp-step-check {
  background: var(--check-done);
  border-color: var(--check-done);
}
.tp-step.done .tp-step-check::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.tp-step-num {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--terracotta-deep);
  min-width: 18px;
}
.tp-step-text {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.55;
}
.tp-step.done .tp-step-text { text-decoration: line-through; color: var(--ink-faint); }

/* Liens */
.tp-links { list-style: none; margin-top: 6px; }
.tp-links li { padding: 4px 0; font-size: 13.5px; }
.tp-links a::before { content: '→ '; color: var(--terracotta-deep); }

/* Notes perso */
.tp-notes {
  background: var(--miel);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 14px;
  position: relative;
}
.tp-notes::before {
  content: '✿';
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 18px;
  color: var(--miel-deep);
  opacity: 0.5;
}
.tp-notes-title {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--ink);
}
.tp-notes-content {
  font-family: 'Caveat', cursive;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  min-height: 50px;
}

/* Action principale */
.tp-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--sable) 70%, transparent);
  padding: 18px 28px 18px;
  margin: 0 -28px -80px;
}
.tp-action-btn {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tp-action-btn:hover { background: var(--terracotta-deep); }
.tp-action-btn.done {
  background: var(--check-done);
  cursor: default;
}

.tp-empty {
  background: white;
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 14px;
}
.tp-empty-emoji { font-size: 32px; margin-bottom: 10px; }
.tp-empty-title {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}
.tp-empty-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

/* ============================================
   MINUTEUR DE TÂCHE
   ============================================ */
.task-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 500;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.task-timer:hover {
  border-color: var(--terracotta-deep);
  color: var(--terracotta-deep);
}
.task-timer.running {
  background: var(--rose);
  color: var(--terracotta-deep);
  animation: pulseTimer 2s ease-in-out infinite;
}
.task-timer.over-time { background: var(--rose); color: var(--terracotta-deep); }
.task-timer.over-time-warning { background: var(--miel); color: var(--miel-deep); }
.task-timer.completed-good { background: var(--sauge); color: var(--sauge-dark); }
.task-timer.completed-warn { background: var(--miel); color: var(--miel-deep); }
.task-timer.completed-bad { background: var(--rose); color: var(--terracotta-deep); }

@keyframes pulseTimer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.tt-icon { font-size: 10px; }
.tt-time { font-family: 'Fraunces', serif; font-weight: 500; font-size: 12px; }

/* Bloc temps détaillé dans le panneau */
.tp-timer-block {
  background: white;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.tp-timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.tp-timer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  font-weight: 500;
}
.tp-timer-display {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.tp-timer-display.running { color: var(--terracotta-deep); }
.tp-timer-display.over-time-warning { color: var(--miel-deep); }
.tp-timer-display.over-time { color: var(--terracotta-deep); }
.tp-timer-actions {
  display: flex;
  gap: 8px;
}
.tp-timer-btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tp-timer-btn.primary {
  background: var(--ink);
  color: white;
}
.tp-timer-btn.primary:hover { background: var(--terracotta-deep); }
.tp-timer-btn.secondary {
  background: var(--sable);
  color: var(--ink);
}
.tp-timer-btn.secondary:hover { background: var(--sable-deep); color: white; }
.tp-timer-edit {
  font-size: 11px;
  color: var(--ink-faint);
  cursor: pointer;
  margin-top: 8px;
  text-align: center;
  transition: color 0.2s ease;
}
.tp-timer-edit:hover { color: var(--terracotta-deep); }

/* ============================================
   STATS TEMPS DU MOIS
   ============================================ */
.time-stats {
  background: white;
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}
.ts-item { text-align: center; }
.ts-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 6px;
}
.ts-value {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ts-detail {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 4px;
}
.ts-precision-good { color: var(--sauge-dark); }
.ts-precision-warn { color: var(--miel-deep); }
.ts-precision-bad { color: var(--terracotta-deep); }

/* Responsive panneau */
@media (max-width: 760px) {
  .task-panel { width: 100vw; }
  .tp-body { padding: 20px 18px 60px; }
  .tp-actions { padding: 14px 18px; margin: 0 -18px -60px; }
  .time-stats { grid-template-columns: 1fr; gap: 12px; }
  .tp-task-title { font-size: 20px; }
  .tp-timer-display { font-size: 26px; }
}

/* Tâche : bouton timer aligné à droite */
.task {
  position: relative;
}
.task-text {
  cursor: pointer;
}
.task-text:hover { color: var(--terracotta-deep); }
