/* ============================================================
   Layout — mobile-first, centered on larger screens (Mac/tablette)
   ============================================================ */
html, body {
  height: 100%;
  background: linear-gradient(180deg, #F3E3E9 0%, #FBEFF1 40%, #FFF8F8 100%);
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

#phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(201, 79, 124, 0.12);
}

@media (min-width: 480px) {
  body { padding: 24px 0; }
  #phone {
    min-height: 844px;
    border-radius: 36px;
    margin-top: 12px;
  }
}

.view { display: flex; flex-direction: column; flex: 1; position: relative; }
.view.hidden { display: none; }
.hidden { display: none !important; }

/* ============================================================
   Desktop layout (Mac, grand écran) — deux cartes côte à côte
   au lieu de la colonne téléphone étroite
   ============================================================ */
@media (min-width: 900px) {
  body { padding: 40px 0; align-items: center; }
  #phone {
    max-width: 980px;
    min-height: auto;
    border-radius: 40px;
    margin-top: 0;
  }
  .app-header { padding: 34px 40px 8px; }
  .header-text h1 { font-size: 34px; }
  .today-label { font-size: 15px; }
  .fairy-deco { width: 130px; margin-top: -26px; }
  .branch-deco { width: 150px; }

  .view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 22px;
  }
  .view .app-header { grid-column: 1 / -1; }
  .view .spacer { display: none; }
  .view .bottom-nav {
    grid-column: 1 / -1;
    max-width: 420px;
    width: 100%;
    margin: 30px auto 30px;
  }

  #view-accueil .progress-card { grid-column: 1; margin-top: 14px; align-self: start; }
  #view-calendrier .paper-card { grid-column: 1; }
  #view-accueil .today-card { grid-column: 2; margin-top: 14px; }
  #view-calendrier .calendar-card { grid-column: 1; margin-top: 8px; align-self: start; }
  #view-calendrier .today-card { grid-column: 2; margin-top: 8px; }
  #view-vrac .vrac-card { grid-column: 1 / -1; margin-top: 14px; max-width: 640px; margin-left: auto; margin-right: auto; }
  #view-projets .vrac-card { grid-column: 1 / -1; margin-top: 14px; max-width: 640px; margin-left: auto; margin-right: auto; }

  .card { padding: 26px 26px 28px; }
  .card-head h2 { font-size: 22px; }
  .task-title { font-size: 15px; }
  .cal-day { font-size: 14px; }
}

/* ============================================================
   Header
   ============================================================ */
.app-header {
  position: relative;
  padding: 24px 20px 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.header-text { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; position: relative; }
.header-text h1 { font-size: 26px; color: var(--texte-principal); }
.spark { font-size: 18px; }
.today-label { font-size: 13px; color: var(--texte-secondaire); font-weight: 500; text-transform: capitalize; }
.branch-deco { width: 118px; margin: 6px 0 -6px -4px; }
.fairy-deco { width: 100px; margin-top: -18px; }
.fairy-deco.fairy-cal { position: absolute; top: -14px; right: 14px; width: 84px; z-index: 3; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  position: relative;
  margin: 8px 18px 0;
  padding: 18px 18px 20px;
  border-radius: var(--radius-card);
  background: #FFFFFF;
  border: 1px solid var(--carte-bordure);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-head h2 { font-size: 19px; color: var(--texte-principal); }

.progress-card {
  background: linear-gradient(180deg, var(--rose-poudre) 0%, var(--bg) 100%);
  border-color: var(--carte-bordure-forte);
  gap: 12px;
  z-index: 1;
}
.progress-card .card-head { padding-right: 54px; }
.progress-label { font-size: 12px; font-weight: 600; color: var(--framboise); }
.path-wrap { position: relative; height: 64px; }
#path-svg { position: absolute; top: 4px; left: 0; }
.star-deco { position: absolute; top: 6px; left: 84px; width: 16px; }
.hint { font-size: 12px; color: var(--texte-secondaire); }
.corner-deco { position: absolute; top: -20px; right: -20px; width: 108px; z-index: 3; }
.corner-deco.corner-cal { top: auto; bottom: -20px; left: -20px; right: auto; transform: scaleX(-1); }

.today-card { margin-top: 14px; }
.butterfly-deco { position: absolute; top: -14px; left: 58%; width: 38px; z-index: 3; }
.heart-deco { position: absolute; left: 8px; bottom: 6px; width: 26px; opacity: 0.9; z-index: 2; }
.cat-deco { position: absolute; right: -4px; bottom: -10px; width: 84px; z-index: 1; pointer-events: none; }
/* Dans le vrac, la liste grandit vers le bas : on épingle le chat en haut
   pour qu'il ne recouvre jamais le bouton "ranger" des dernières tâches */
.vrac-card .cat-deco { top: -10px; right: -6px; bottom: auto; width: 56px; z-index: 0; }

/* ============================================================
   Task list
   ============================================================ */
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.task-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--rose-fleur);
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.task-item.done .task-check {
  background: var(--rose-principal);
  border-color: var(--rose-principal);
}
.task-item.done .task-check svg { display: block; }
.task-check svg { display: none; }
.task-item:active .task-check { transform: scale(0.9); }
.task-title {
  flex-grow: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--texte-principal);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.task-item.done .task-title {
  color: var(--texte-eteint);
  text-decoration: line-through;
  font-weight: 500;
}
.task-item.reward .task-check { animation: pop 0.35s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.task-empty { font-size: 13px; color: var(--texte-secondaire); font-style: italic; padding: 4px 0 2px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
  margin-top: 4px;
  align-self: flex-start;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  background: var(--rose-principal);
  color: #FFFFFF;
  font-weight: 600; font-size: 14px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.12s ease;
}
.btn-primary:active { transform: scale(0.96); }

.btn-secondary {
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  background: var(--rose-poudre);
  color: var(--framboise);
  font-weight: 600; font-size: 14px;
  border: none;
  cursor: pointer;
}

/* ============================================================
   Vrac
   ============================================================ */
.vrac-quick-add {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
#vrac-input {
  flex-grow: 1;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 18px;
  border: 1px solid var(--rose-fleur);
  background: var(--bg);
  color: var(--texte-principal);
  outline: none;
}
#vrac-input:focus { border-color: var(--rose-principal); }
.vrac-add-btn {
  width: 40px; height: 40px; margin-top: 0; flex-shrink: 0;
  border: none;
}
.vrac-list { margin-top: 4px; }
.vrac-item { gap: 8px; }
.vrac-item .task-title { cursor: pointer; }
.vrac-assign-btn {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--rose-poudre);
  background: var(--rose-poudre);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.vrac-assign-btn:active { transform: scale(0.92); }

.assign-sheet { max-height: 85vh; overflow-y: auto; }
.assign-task-title {
  margin: -6px 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--texte-principal);
}
.assign-quick-row { display: flex; gap: 10px; }
.assign-quick-row .btn-secondary { flex: 1; }

.assign-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--rose-poudre);
}
.assign-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--texte-secondaire);
}
.assign-day-row { display: flex; gap: 10px; }
#assign-date-input, #assign-time-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--rose-fleur);
  background: var(--bg);
  color: var(--texte-principal);
  outline: none;
}
.assign-full-btn { align-self: stretch; justify-content: center; }

.assign-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.assign-pill {
  padding: 8px 14px;
  border-radius: 16px;
  border: 1px solid var(--rose-fleur);
  background: var(--rose-poudre);
  color: var(--framboise);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.assign-pill:active { transform: scale(0.95); }

.assign-bottom-actions { justify-content: space-between; }

.assign-pill-small {
  padding: 6px 11px;
  font-size: 11.5px;
}

/* ============================================================
   Ranger une tâche — panneau rapide + mini-calendrier
   ============================================================ */
.assign-quick-panel { display: flex; flex-direction: column; gap: 10px; }
.assign-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.assign-quick-grid .btn-secondary { width: 100%; }

.assign-calendar-panel { display: flex; flex-direction: column; gap: 8px; }
.assign-back-link {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--framboise);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
}

.mini-cal { display: flex; flex-direction: column; gap: 8px; }
.mini-cal-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
#mini-cal-label {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 500;
  min-width: 130px;
  text-align: center;
  text-transform: capitalize;
}
.mini-cal-month-check {
  display: flex; align-items: center; gap: 8px;
  align-self: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--framboise);
  cursor: pointer;
}
.mini-cal-month-check input { width: 16px; height: 16px; accent-color: var(--rose-principal); }

.mini-cal-weekdays {
  display: grid;
  grid-template-columns: 20px repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--texte-secondaire);
}
.mini-cal-grid {
  display: grid;
  grid-template-columns: 20px repeat(7, 1fr);
  row-gap: 6px;
  align-items: center;
}
.mini-cal-week-check {
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.mini-cal-week-check input { width: 15px; height: 15px; accent-color: var(--rose-principal); cursor: pointer; }
.mini-cal-day {
  aspect-ratio: 1 / 1;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--texte-principal);
  cursor: pointer;
}
.mini-cal-day:active { background: var(--rose-poudre); }
.mini-cal-day.other-month { color: #E3C9D4; }
.mini-cal-day.is-today { background: var(--rose-principal); color: #FFFFFF; font-weight: 700; }

/* Semaine → cocher un jour précis (utilisé dans le détail d'une semaine) */
.week-day-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.week-day-check {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px 5px;
  border-radius: 14px;
  background: var(--rose-poudre);
  cursor: pointer;
}
.week-day-check input { width: 14px; height: 14px; accent-color: var(--rose-principal); cursor: pointer; }
.week-day-check-letter { font-size: 10px; font-weight: 700; color: var(--framboise); text-transform: uppercase; }
.week-day-check-num { font-size: 11px; font-weight: 600; color: var(--texte-principal); }

/* ============================================================
   Calendrier hebdo visuel (colonnes = jours, lignes = plages horaires)
   ============================================================ */
.week-grid {
  display: grid;
  grid-template-columns: 24px repeat(7, 1fr);
  gap: 3px;
}
.week-grid-head {
  border: none;
  border-radius: 9px;
  background: var(--rose-poudre);
  color: var(--framboise);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0;
  padding: 4px 0;
  cursor: pointer;
}
.week-grid-head span:last-child { font-size: 11px; }
.week-grid-head.is-today { background: var(--rose-principal); color: #FFFFFF; }
.week-grid-row-label {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.week-grid-cell {
  min-height: 34px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--rose-poudre);
  padding: 2px;
  display: flex; flex-direction: column; gap: 2px;
  cursor: pointer;
  overflow: hidden;
}
.week-grid-cell.is-today { border-color: var(--rose-principal); border-width: 1.5px; }
.week-grid-chip {
  font-size: 7.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--framboise);
  background: var(--rose-poudre);
  border-radius: 4px;
  padding: 1px 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.week-grid-chip.done { text-decoration: line-through; color: var(--texte-eteint); opacity: 0.75; }
.week-grid-hint { font-size: 11px; color: var(--texte-secondaire); font-style: italic; text-align: center; margin: 2px 0 0; }

/* ============================================================
   Fiche jour ("day sheet") — plages horaires + rituel du soir
   ============================================================ */
.day-sheet-band { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--rose-poudre); }
.day-sheet-item { gap: 8px; }
.day-sheet-tomorrow-btn {
  flex-shrink: 0;
  border: 1px solid var(--rose-poudre);
  background: #FFFFFF;
  color: var(--framboise);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 12px;
  padding: 5px 9px;
  cursor: pointer;
  white-space: nowrap;
}
.day-sheet-tomorrow-btn:active { transform: scale(0.94); }
.day-sheet-tomorrow-pill { background: #FFFFFF; }

.day-sheet-journal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--rose-poudre);
}
.day-sheet-journal-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--texte-principal);
}
.day-sheet-journal textarea {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--rose-fleur);
  background: var(--bg);
  color: var(--texte-principal);
  outline: none;
  resize: vertical;
}
.day-sheet-journal textarea:focus { border-color: var(--rose-principal); }

/* ============================================================
   Projets
   ============================================================ */

/* Widget "Mes projets" sur l'Accueil */
.accueil-projects-widget { display: flex; flex-direction: column; gap: 10px; }
.project-widget-row {
  display: flex; flex-direction: column; gap: 5px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--rose-poudre);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
}
.project-widget-row:active { transform: scale(0.98); }
.project-widget-head { display: flex; align-items: center; gap: 6px; }
.project-widget-emoji { font-size: 14px; }
.project-widget-name { flex-grow: 1; font-size: 13.5px; font-weight: 700; color: var(--texte-principal); }
.project-widget-frac { font-size: 11px; font-weight: 700; color: var(--framboise); }
.project-widget-bar, .project-card-bar {
  height: 6px;
  border-radius: 4px;
  background: var(--rose-poudre);
  overflow: hidden;
}
.project-widget-bar-fill, .project-card-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--rose-principal), var(--framboise));
}

/* Liste de cartes projet (vue Projets, actifs + archivés) */
.project-card-list { display: flex; flex-direction: column; gap: 10px; }
.project-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--rose-poudre);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  width: 100%;
}
.project-card:active { transform: scale(0.98); }
.project-card-head { display: flex; align-items: center; gap: 8px; }
.project-card-emoji { font-size: 16px; }
.project-card-name { flex-grow: 1; font-size: 14.5px; font-weight: 700; color: var(--texte-principal); }
.project-card-frac { font-size: 11.5px; color: var(--framboise); font-weight: 600; }

/* Fiche projet (modal) */
.project-sheet { gap: 14px; }
.project-detail-name-input {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 500;
  color: var(--texte-principal);
  border: none;
  outline: none;
  padding: 2px 0;
  background: transparent;
}
.project-detail-progress { font-size: 12.5px; font-weight: 700; color: var(--framboise); margin-top: -8px; }
#project-detail-note {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--rose-fleur);
  background: var(--bg);
  color: var(--texte-principal);
  outline: none;
}
#project-detail-note:focus { border-color: var(--rose-principal); }

.project-steps-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.project-step-block {
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--rose-poudre);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.project-step-block.is-done { border-color: var(--rose-principal); }
.project-step-header { display: flex; align-items: center; gap: 8px; }
.project-step-title { flex-grow: 1; font-size: 13.5px; font-weight: 700; color: var(--texte-principal); }
.project-step-badge { font-size: 10.5px; font-weight: 700; color: var(--framboise); background: var(--rose-poudre); padding: 3px 8px; border-radius: 10px; white-space: nowrap; }
.project-step-delete { background: none; border: none; cursor: pointer; font-size: 13px; opacity: 0.6; flex-shrink: 0; }
.project-step-delete:active { opacity: 1; }
.project-step-tasks { display: flex; flex-direction: column; gap: 8px; }
.project-step-add-row { margin-top: 2px; }
.project-step-add-row input {
  flex-grow: 1;
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--rose-fleur);
  background: #FFFFFF;
  outline: none;
}
.project-step-add-row .project-step-add-btn { width: 32px; height: 32px; }

.project-task-block { display: flex; flex-direction: column; gap: 4px; }
.project-task-item { gap: 6px; }
.project-task-sub-count { font-size: 10.5px; font-weight: 700; color: var(--framboise); flex-shrink: 0; }
.project-task-expand, .project-task-delete {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 12px;
  opacity: 0.55;
  cursor: pointer;
  padding: 2px 4px;
}
.project-task-expand:active, .project-task-delete:active { opacity: 1; }
.project-task-move-row { margin: 0 0 2px 32px; }
.project-task-move-row .assign-pill-small.is-current { background: var(--rose-principal); color: #FFFFFF; }

.project-subtask-wrap { margin: 0 0 6px 32px; display: flex; flex-direction: column; gap: 6px; }
.project-subtask-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.project-subtask-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--texte-principal); }
.project-subtask-item.done { color: var(--texte-eteint); text-decoration: line-through; }
.project-subtask-item .task-check.small-check { width: 16px; height: 16px; }
.project-subtask-item .task-check.small-check svg { width: 9px; height: 9px; }
.project-subtask-item .task-title { flex-grow: 1; cursor: pointer; }
.project-subtask-delete { background: none; border: none; font-size: 11px; opacity: 0.5; cursor: pointer; }
.project-subtask-add-row { display: flex; gap: 6px; }
.project-subtask-add-row input {
  flex-grow: 1;
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--rose-fleur);
  background: #FFFFFF;
  outline: none;
}
.project-subtask-add-btn {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%; border: none;
  background: var(--rose-poudre); color: var(--framboise);
  font-weight: 700; cursor: pointer;
}

.project-detail-danger { display: flex; gap: 10px; padding-top: 10px; border-top: 1px solid var(--rose-poudre); }
.project-detail-danger .btn-secondary { flex: 1; font-size: 12.5px; }
.project-delete-btn { background: #FBE3E3; color: #C4526A; }

/* ============================================================
   Groupes de mois (dans "Ce mois-ci") + détail du mois
   ============================================================ */
.month-group-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 2px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--rose-poudre);
  border: none;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 500;
  color: var(--texte-principal);
  cursor: pointer;
  width: 100%;
  text-align: left;
  list-style: none;
}
.month-group-arrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--framboise);
  white-space: nowrap;
}
.month-group-header:active { transform: scale(0.98); }

.month-detail-sheet { max-height: 85vh; overflow-y: auto; gap: 16px; }
.month-detail-section { display: flex; flex-direction: column; gap: 10px; }
.month-detail-unassigned { display: flex; flex-direction: column; gap: 12px; }
.month-detail-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--rose-poudre);
}
.month-detail-row-title { font-size: 13.5px; font-weight: 600; color: var(--texte-principal); }
.month-detail-assign-btn { align-self: flex-start; font-size: 12.5px; padding: 8px 14px; }
.month-detail-empty { font-size: 12.5px; color: var(--texte-secondaire); font-style: italic; margin: 0; }

.month-detail-weeks { display: flex; flex-direction: column; gap: 14px; }
.month-detail-week-section h4 {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--framboise);
  margin: 0 0 6px;
}
.month-detail-week-section .vrac-list { gap: 8px; }
.month-detail-close-btn { align-self: stretch; justify-content: center; margin-top: 4px; }

.task-title-wrap {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: pointer;
}
.task-bucket-label {
  font-size: 11px;
  color: var(--framboise);
  font-weight: 600;
}
.task-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--texte-secondaire);
  background: var(--rose-poudre);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ============================================================
   Bottom nav
   ============================================================ */
.spacer { flex-grow: 1; }
.bottom-nav {
  position: relative;
  margin: 14px 18px 18px;
  height: 68px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--carte-bordure);
  display: flex; align-items: center; justify-content: space-around;
  backdrop-filter: blur(6px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 600; color: #C6A3B4;
  text-decoration: none;
}
.nav-item.active { color: var(--framboise); font-weight: 700; }
.nav-item.disabled { opacity: 0.45; }
.nav-add {
  width: 56px; height: 56px; margin-top: -24px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: var(--rose-principal);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
}

/* ============================================================
   Calendar
   ============================================================ */
.calendar-card { margin-top: 8px; padding-top: 22px; }
.cal-nav { display: flex; align-items: center; justify-content: center; gap: 18px; }
.cal-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--rose-fleur); background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#cal-nav-label { font-family: var(--font-title); font-size: 16px; font-weight: 500; min-width: 140px; text-align: center; text-transform: capitalize; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; font-weight: 700; color: var(--texte-secondaire);
  margin-top: 6px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
}
.cal-day {
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  border: none; background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--texte-principal);
  font-size: 13px;
  position: relative;
}
.cal-day.other-month { color: #E3C9D4; }
.cal-day .dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.cal-day.has-mood .dot { }
.cal-day.is-today .day-num {
  background: var(--rose-principal);
  color: #FFFFFF;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.day-task-marker {
  position: absolute;
  top: 4px;
  left: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose-principal);
}
.cal-day.is-today::after {
  content: '✦';
  position: absolute;
  top: -2px; right: 10px;
  font-size: 9px;
  color: var(--jaune-champagne);
}
.cal-day.selected .day-num {
  box-shadow: 0 0 0 2px var(--rose-principal);
  border-radius: 50%;
}

/* ============================================================
   Mood picker
   ============================================================ */
.mood-label { font-size: 12px; color: var(--texte-secondaire); font-weight: 600; margin-top: -4px; }
.mood-picker { display: flex; gap: 10px; margin-bottom: 4px; }
.mood-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.mood-swatch:active { transform: scale(0.9); }
.mood-swatch.selected { border-color: var(--texte-principal); }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(99, 51, 76, 0.28);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50;
}
.modal-overlay.hidden { display: none; }
/* La feuille "Ranger cette tâche" peut s'ouvrir par-dessus le détail d'un
   mois/semaine/jour déjà ouvert : elle doit toujours passer au premier plan. */
#assign-modal { z-index: 60; }
.modal-sheet {
  width: 100%; max-width: 430px;
  background: #FFFFFF;
  border-radius: 28px 28px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 -10px 30px rgba(99,51,76,0.18);
}
.modal-sheet h3 { font-size: 18px; color: var(--texte-principal); }
#add-task-input {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid var(--rose-fleur);
  background: var(--bg);
  color: var(--texte-principal);
  outline: none;
}
#add-task-input:focus { border-color: var(--rose-principal); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (min-width: 480px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: 24px; max-width: 380px; }
}


/* ============================================================
   Champs de saisie "rapides" (projets, idées, étapes...) — même
   style doux que le vrac, au lieu du champ brut du navigateur
   ============================================================ */
.vrac-quick-add input {
  flex-grow: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 18px;
  border: 1px solid var(--rose-fleur);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.vrac-quick-add input:focus,
.project-step-add-row input:focus,
.project-subtask-add-row input:focus {
  border-color: var(--rose-principal);
  box-shadow: 0 0 0 3px rgba(247, 183, 206, 0.35);
}
.project-step-add-row input { font-size: 13px; padding: 9px 13px; }

/* ============================================================
   Mon avancement — un chemin par projet
   ============================================================ */
.star-head { position: static; width: 16px; }
.progress-card .card-head { padding-right: 70px; justify-content: flex-start; gap: 8px; }
.progress-projects { display: flex; flex-direction: column; gap: 6px; }
.progress-project {
  display: flex; flex-direction: column; gap: 0;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--rose-poudre);
  border-radius: 18px;
  padding: 9px 12px 4px;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  transition: transform 0.12s ease;
}
.progress-project:active { transform: scale(0.98); }
.progress-project-head { display: flex; align-items: center; gap: 7px; }
.progress-project-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.progress-project-name { flex-grow: 1; font-size: 13.5px; font-weight: 700; color: var(--texte-principal); }
.progress-project-frac { font-size: 11px; font-weight: 700; white-space: nowrap; }
.progress-project-path { width: 100%; height: auto; max-height: 52px; display: block; overflow: visible; }
.progress-empty {
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed var(--rose-fleur);
  border-radius: 18px;
  padding: 14px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--texte-secondaire); text-align: left; cursor: pointer;
}
.progress-empty span { color: var(--framboise); }

/* ============================================================
   Repère projet sur les tâches de l'agenda
   ============================================================ */
.task-title-wrap { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.task-project-tag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700;
  color: var(--texte-secondaire);
  background: var(--proj-soft, var(--rose-poudre));
  padding: 2px 8px 2px 6px;
  border-radius: 10px;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-project-tag::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--proj, var(--rose-principal)); flex-shrink: 0;
}
.task-item.has-project .task-check { border-color: var(--proj); }
.task-item.has-project.done .task-check { background: var(--proj); border-color: var(--proj); }
.month-detail-row.has-project { border-left: 4px solid var(--proj); }
.month-detail-row .task-project-tag { margin-top: -2px; }
.week-grid-chip.has-project { border-left: 3px solid var(--proj); }

/* ============================================================
   Tâche de projet : ligne d'actions visible
   ============================================================ */
.project-task-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 2px 32px; }
.task-action {
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 700;
  color: var(--framboise);
  background: #FFFFFF;
  border: 1px solid var(--rose-fleur);
  border-radius: 12px;
  padding: 4px 10px;
  cursor: pointer;
}
.task-action.is-on { background: var(--rose-poudre); border-color: var(--rose-poudre); }
.task-action:active { transform: scale(0.96); }
.project-task-block { padding-bottom: 4px; }
.project-task-delete { flex-shrink: 0; background: none; border: none; font-size: 12px; opacity: 0.5; cursor: pointer; padding: 2px 4px; }
.project-subtask-wrap {
  margin: 2px 0 4px 32px;
  padding: 8px 10px;
  background: #FFFFFF;
  border-left: 2px solid var(--rose-fleur);
  border-radius: 0 12px 12px 0;
}
.project-subtask-add-row input { font-size: 12.5px; padding: 7px 11px; }
.project-subtask-add-btn { width: 30px; height: 30px; font-size: 16px; }

/* Couleur du projet */
.project-color-row { display: flex; gap: 10px; margin-top: -6px; }
.project-color-swatch {
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--rose-poudre);
  cursor: pointer; padding: 0;
}
.project-color-swatch.selected { box-shadow: 0 0 0 2px var(--texte-principal); }
.project-sheet .project-detail-name-input { border-left: 5px solid var(--proj, var(--rose-principal)); padding-left: 10px; }

/* Note libre — grande, façon page lignée */
.free-note {
  width: 100%;
  min-height: 150px;
  resize: none;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 26px;
  padding: 6px 14px 10px;
  border-radius: 16px;
  border: 1px solid var(--rose-poudre);
  background-color: #FFFDFD;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, var(--rose-poudre) 25px, var(--rose-poudre) 26px);
  background-position: 0 6px;
  background-attachment: local;
  outline: none;
  overflow: hidden;
}
.free-note:focus { border-color: var(--rose-fleur); }

/* Boîte à idées */
.idea-item { cursor: pointer; }
.idea-bulb { font-size: 15px; flex-shrink: 0; }
.idea-open { font-size: 11px; font-weight: 700; color: var(--framboise); white-space: nowrap; }
.idea-items-list { gap: 8px; }
.idea-items-list:empty { display: none; }
.idea-items-list .project-subtask-item { font-size: 13.5px; }

/* ============================================================
   Calendrier — semaine façon agenda papier
   ============================================================ */
.paper-card {
  background: #FFFDFB;
  border-color: var(--carte-bordure-forte);
  padding: 14px 14px 16px;
  gap: 8px;
}
.paper-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paper-title {
  display: flex; flex-direction: column; align-items: center;
  background: none; border: none; cursor: pointer; padding: 0;
}
.paper-title-small { font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--texte-secondaire); letter-spacing: 0.04em; text-transform: uppercase; }
.paper-title-main { font-family: var(--font-title); font-style: italic; font-size: 19px; color: var(--texte-principal); }
.paper-page {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rose-fleur);
  position: relative;
}
/* marge rose comme dans un vrai agenda */
.paper-page::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50px;
  width: 1px; background: var(--rose-fleur); opacity: 0.8;
}
.paper-day {
  display: flex; align-items: stretch; gap: 0;
  min-height: 46px;
  background: none; border: none;
  border-bottom: 1px solid var(--rose-poudre);
  padding: 0; cursor: pointer; text-align: left;
  font-family: var(--font-body);
}
.paper-day:active { background: var(--rose-poudre); }
.paper-day-date {
  width: 50px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 0;
}
.paper-day-name { font-size: 10.5px; font-weight: 700; color: var(--texte-secondaire); text-transform: uppercase; letter-spacing: 0.03em; }
.paper-day-num { font-family: var(--font-title); font-size: 18px; line-height: 1.1; color: var(--texte-principal); }
.paper-day.is-weekend .paper-day-date { background: rgba(252, 225, 232, 0.35); }
.paper-day.is-today .paper-day-num {
  color: #FFFFFF; background: var(--rose-principal);
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.paper-day-tasks { flex-grow: 1; display: flex; flex-wrap: wrap; align-content: center; gap: 4px 10px; padding: 6px 4px 6px 12px; min-width: 0; }
.paper-task {
  font-size: 12.5px; font-weight: 600; color: var(--texte-principal);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.paper-task::before { content: '•'; color: var(--rose-principal); font-weight: 700; }
.paper-task.has-project::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--proj); }
.paper-task.done { color: var(--texte-eteint); text-decoration: line-through; }
.paper-empty { color: var(--rose-poudre); }
.paper-foot {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 4px 2px 62px;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-body);
}
.paper-foot-label { font-size: 11px; font-weight: 700; color: var(--framboise); }
.paper-foot-tasks { display: flex; flex-wrap: wrap; gap: 4px 10px; }

.project-card .project-card-bar-fill { background: var(--proj, var(--rose-principal)); }

/* ============================================================
   Univers Love Mode — décorations (illustrations de Sarah)
   Règle : les images habillent les bords, ne cachent jamais
   un texte ou un bouton, et ne captent jamais le toucher.
   ============================================================ */
.deco { position: absolute; pointer-events: none; user-select: none; -webkit-user-drag: none; z-index: 3; }
img { -webkit-user-drag: none; }

/* Fond : halos pastel + ciel de petites étoiles et pétales */
#phone {
  background:
    radial-gradient(circle at 12% 6%, rgba(247, 183, 206, 0.32), transparent 38%),
    radial-gradient(circle at 92% 30%, rgba(231, 213, 250, 0.45), transparent 34%),
    radial-gradient(circle at 8% 62%, rgba(255, 217, 199, 0.32), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(247, 183, 206, 0.28), transparent 36%),
    var(--bg);
}
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.view { z-index: 1; }
.sky-bit { position: absolute; opacity: 0.45; animation: twinkle 5s ease-in-out infinite; }
.sky-0  { top: 3%;  left: 46%; width: 11px; animation-delay: 0s; }
.sky-1  { top: 13%; left: 4%;  width: 14px; opacity: 0.35; transform: rotate(-30deg); animation: drift 9s ease-in-out infinite; }
.sky-2  { top: 22%; left: 94%; width: 12px; animation-delay: 1.2s; }
.sky-3  { top: 31%; left: 2%;  width: 9px;  animation-delay: 2.1s; }
.sky-4  { top: 41%; left: 95%; width: 15px; opacity: 0.32; animation: drift 11s ease-in-out infinite; }
.sky-5  { top: 50%; left: 3%;  width: 12px; animation-delay: 0.6s; }
.sky-6  { top: 58%; left: 93%; width: 9px;  animation-delay: 3s; }
.sky-7  { top: 67%; left: 1%;  width: 15px; opacity: 0.3; animation: drift 10s ease-in-out infinite; }
.sky-8  { top: 75%; left: 95%; width: 11px; animation-delay: 1.8s; }
.sky-9  { top: 84%; left: 4%;  width: 9px;  animation-delay: 2.6s; }
.sky-10 { top: 91%; left: 90%; width: 13px; opacity: 0.32; animation: drift 12s ease-in-out infinite; }
.sky-11 { top: 97%; left: 40%; width: 10px; animation-delay: 1s; }
@keyframes twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.85); } 50% { opacity: 0.65; transform: scale(1.1); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(-20deg); } 50% { transform: translate(4px, 8px) rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .sky-bit, .h-star-a, .h-star-b { animation: none !important; } }

/* En-têtes : une petite scène par page */
.header-art { position: relative; flex-shrink: 0; display: flex; align-items: flex-start; }
.header-art .fairy-deco { position: relative; z-index: 1; }
.header-art .deco { z-index: 0; }
.h-moon { width: 58px; top: -4px; left: -44px; opacity: 0.95; }
.h-cloud { width: 78px; left: -52px; bottom: -8px; }
.h-rainbow { position: relative !important; width: 112px; margin-top: 2px; }
.h-star-a { width: 15px; top: 4px; right: -4px; z-index: 2 !important; animation: twinkle 3.5s ease-in-out infinite; }
.h-star-b { width: 10px; bottom: 8px; left: -14px; z-index: 2 !important; animation: twinkle 4.5s ease-in-out infinite 1s; }
.branch-deco { width: 112px; }

/* Cartes : les illustrations se posent sur les bords */
.progress-card, .today-card, #view-projets .vrac-card:first-of-type { padding-top: 32px; }
.d-bow-top { width: 50px; left: -12px; top: -22px; transform: rotate(-14deg); z-index: 4; }
.d-corner-tl { width: 52px; left: -14px; top: -20px; transform: rotate(-8deg); }
.today-card .d-corner-tl { left: auto; right: -12px; top: -18px; width: 46px; transform: rotate(10deg); }
.today-card .card-head { padding-right: 34px; }

.vrac-card.ideas-card { padding-bottom: 34px; }
.d-star-tr { width: 26px; right: 18px; top: -14px; animation: twinkle 4s ease-in-out infinite; }
.d-cloud-br { width: 58px; right: -10px; bottom: -14px; opacity: 0.95; }
#view-vrac .vrac-card { padding-bottom: 46px; }
.d-mushroom { width: 60px; right: -6px; bottom: -14px; z-index: 2; }
.d-petals { width: 38px; left: 12px; bottom: -8px; opacity: 0.85; transform: rotate(-12deg); }

.paper-card { padding-top: 20px; }
.d-bookmark { width: 54px; left: -16px; bottom: -22px; transform: rotate(-20deg); z-index: 4; }
.d-paper-flower { width: 30px; right: -8px; top: -12px; }

/* Petites images devant les titres (baguette, ruban, cœur, lune) */
.title-with-art { display: inline-flex; align-items: center; gap: 6px; }
.title-art { height: 28px; width: auto; }
.title-art.small { height: 18px; }

/* Feuilles (fenêtres) : un ornement en haut à droite */
.modal-sheet { position: relative; }
.sheet-art { width: 58px; top: 12px; right: 14px; z-index: 0; opacity: 0.95; }
.sheet-art-wide { width: 84px; }
.modal-sheet > h3, .modal-sheet > .project-detail-name-input, .modal-sheet > .project-detail-progress,
.modal-sheet > .project-color-row, .modal-sheet > .assign-task-title { position: relative; z-index: 1; padding-right: 80px; }
.day-sheet > h3, #week-detail-modal h3 { padding-right: 100px; }

/* Récompense : une pluie d'étoiles et de pétales quand on coche */
.sparkle-bit {
  position: fixed; z-index: 100; pointer-events: none;
  width: 14px; margin: -7px 0 0 -7px;
  animation: sparkle-fly 0.9s ease-out forwards;
}
@keyframes sparkle-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); }
}

@media (min-width: 900px) {
  .h-moon { width: 72px; left: -56px; }
  .h-rainbow { width: 140px; }
  .h-cloud { width: 96px; left: -64px; }
}

/* --- ajustements après vérification visuelle --- */
.branch-deco { width: auto; max-width: 128px; max-height: 58px; object-fit: contain; object-position: left; }
.progress-card, .today-card, #view-projets .vrac-card:first-of-type { padding-top: 26px; }
.fairy-deco.fairy-cal { top: -46px; right: -8px; width: 68px; }
.calendar-card .cal-nav { padding: 0 34px; }
.corner-deco.corner-cal { bottom: -30px; left: -30px; width: 84px; }
#view-vrac .vrac-card { padding-bottom: 60px; }
.d-mushroom { width: 50px; right: -4px; bottom: -18px; }
.idea-bulb-img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.progress-project { position: relative; }
.pp-goal { position: absolute; right: 6px; bottom: 16px; width: 16px; pointer-events: none; animation: twinkle 3.5s ease-in-out infinite; }
#view-projets .vrac-card .d-corner-tl { display: none; }

/* ============================================================
   STYLE « IMAGE DE RÉFÉRENCE » — univers immersif Love Mode
   ============================================================ */
html, body { background: linear-gradient(180deg, #F6D3DF 0%, #FBE4EC 45%, #FDEFF3 100%); }
#phone {
  background:
    radial-gradient(circle at 20% 4%, rgba(255, 255, 255, 0.7), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(247, 183, 206, 0.55), transparent 36%),
    radial-gradient(circle at 10% 48%, rgba(252, 213, 225, 0.7), transparent 38%),
    radial-gradient(circle at 92% 70%, rgba(231, 213, 250, 0.45), transparent 34%),
    radial-gradient(circle at 30% 95%, rgba(247, 183, 206, 0.5), transparent 40%),
    linear-gradient(180deg, #FCE4EC 0%, #FDEEF2 50%, #FCE6EE 100%);
}
.sky-bit { opacity: 0.6; }

/* Guirlandes de fleurs qui grimpent le long des bords */
.garland { position: absolute; opacity: 0.85; pointer-events: none; }
.g-1 { width: 120px; left: -58px; top: 33%; transform: rotate(-70deg); }
.g-2 { width: 88px;  right: -30px; top: 46%; transform: rotate(18deg) scaleX(-1); }
.g-3 { width: 92px;  left: -34px; top: 63%; transform: rotate(-12deg); }
.g-4 { width: 84px;  right: -28px; top: 78%; transform: rotate(-15deg); }
.g-5 { width: 110px; left: -40px; top: 88%; transform: rotate(-30deg); }
.g-6 { width: 60px;  right: 10px; top: 24%; opacity: 0.6; }

/* En-tête = grande scène illustrée, le titre posé dessus */
.app-header.hero {
  position: relative;
  display: block;
  min-height: 214px;
  padding: 30px 22px 0;
}
.hero .header-text { position: relative; z-index: 5; max-width: 62%; padding-top: 0; }
.hero h1 {
  font-size: 31px; font-weight: 600; line-height: 1.08;
  color: #5A2743;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 18px rgba(255, 255, 255, 0.9);
}
.hero .today-label { display: block; margin-top: 6px; color: #7E4A63; font-weight: 600; text-shadow: 0 0 10px rgba(255,255,255,0.9); }
.hero-char { position: absolute; z-index: 1; pointer-events: none; user-select: none; }
.hero-fairy { right: -18px; top: 0; width: 272px; }
.hero-fairy-rest { right: -4px; top: 2px; width: 196px; }
.hero-cat { right: 4px; top: 22px; width: 196px; }
.hero .deco { z-index: 3; }
.hero-fl { bottom: -26px; }
.hero-fl-left { left: -18px; width: 124px; }
.hero-fl-right { right: -14px; width: 118px; }
.hero-bf { width: 34px; left: 58%; top: 92px; z-index: 4 !important; transform: rotate(-12deg); }
.hero-st1 { width: 16px; left: 46%; top: 30px; animation: twinkle 3.5s ease-in-out infinite; }
.hero-st2 { width: 11px; left: 12%; top: 128px; animation: twinkle 4.2s ease-in-out infinite 1s; }
.hero-cal { min-height: 176px; }
.hero-moon { right: 6px; top: 4px; width: 140px; z-index: 1 !important; }
.hero-cloud { right: 92px; top: 96px; width: 104px; z-index: 2 !important; opacity: 0.95; }
.hero-vrac .hero-bf { left: 48%; top: 40px; width: 42px; }
.hero-vrac .hero-fl-left { width: 150px; left: -30px; bottom: -14px; transform: rotate(-8deg); }

/* Les cartes : verre blanc rosé, halo doux, et passent devant la scène */
.view > .card {
  z-index: 2;
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(247, 183, 206, 0.75);
  box-shadow: 0 10px 30px rgba(236, 119, 165, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  margin-top: 14px;
}
.view > .hero + .card { margin-top: -26px; }
.card-head h2, .card h2 { font-weight: 600; color: #5A2743; }
.progress-card {
  background: linear-gradient(180deg, rgba(255, 244, 248, 0.92) 0%, rgba(255, 255, 255, 0.86) 100%);
  padding-top: 18px;
}
.progress-card, .today-card, #view-projets .vrac-card:first-of-type { padding-top: 18px; }
.progress-card .card-head { padding-right: 0; }
.today-card .card-head { padding-right: 0; }

/* Bouquet dans le coin de chaque carte, et place réservée pour lui */
.card-fl { width: 84px; right: -16px; bottom: -20px; z-index: 4; }
.card-fl-left { right: auto; left: -18px; transform: scaleX(-1); }
.card-star { width: 18px; right: 22px; top: -10px; animation: twinkle 4s ease-in-out infinite; }
.today-card, .progress-card, .paper-card, #view-projets .vrac-card, #view-calendrier .today-card { padding-bottom: 40px; }
.calendar-card { padding-bottom: 30px; }
.butterfly-deco { top: 12px; left: auto; right: 64px; width: 30px; transform: rotate(8deg); }
.today-card .today-count { margin-right: 0; }
#view-vrac .vrac-card { padding-bottom: 64px; }
.d-mushroom { right: 64px; bottom: -12px; width: 46px; }
.d-petals { left: 14px; bottom: 6px; }
.vrac-card.ideas-card { padding-bottom: 44px; }
.d-bookmark { left: -12px; bottom: -18px; width: 50px; }

/* Carte citation avec le chat endormi */
.quote-card {
  min-height: 92px;
  padding: 16px 150px 16px 20px !important;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8) !important;
}
.quote-text {
  margin: 0;
  font-family: var(--font-title);
  font-size: 16.5px; line-height: 1.35;
  color: #5A2743;
}
.inline-star { width: 13px; vertical-align: middle; margin-left: 2px; }
.quote-cat { position: absolute; right: -12px; bottom: -22px; width: 158px; z-index: 4; pointer-events: none; }
.quote-bf { width: 28px; right: 120px; top: 10px; transform: rotate(-10deg); }

/* Chat qui fait la fête quand toute la journée est cochée */
.today-cat {
  position: absolute; right: -8px; top: -58px; width: 96px; z-index: 5;
  pointer-events: none; animation: hop 1.6s ease-in-out infinite;
}
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.sheet-art.is-celebrating { width: 96px; top: 6px; right: 6px; }

/* Barre de navigation en verre */
.bottom-nav {
  background: rgba(255, 255, 255, 0.86) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(247, 183, 206, 0.7) !important;
  box-shadow: 0 10px 30px rgba(236, 119, 165, 0.18) !important;
  position: relative; z-index: 6;
}

/* Cartes projet : petit bouquet dans le coin */
.project-card { position: relative; overflow: visible; background: rgba(255, 248, 250, 0.9); }
.project-card::after {
  content: ''; position: absolute; right: -10px; bottom: -12px; width: 44px; height: 44px;
  background: url('../assets/love/flower-cluster.png') center / contain no-repeat;
  pointer-events: none;
}

@media (min-width: 900px) {
  .app-header.hero { min-height: 250px; padding: 38px 44px 0; }
  .hero h1 { font-size: 40px; }
  .hero .header-text { max-width: 50%; }
  .hero-fairy { width: 340px; right: 40px; }
  .hero-fairy-rest { width: 230px; right: 60px; }
  .hero-cat { width: 240px; right: 60px; }
  .hero-moon { width: 170px; right: 60px; }
  .hero-cloud { right: 200px; }
  .view > .hero + .card, .view > .hero ~ .card { margin-top: 14px; }
}
@media (min-width: 900px) {
  #view-accueil .quote-card { grid-column: 1; margin-top: 14px; }
  #view-accueil .today-card { grid-row: span 2; align-self: start; }
}
/* Les fleurs de la scène passent derrière les cartes (elles dépassent seulement) */
.hero .hero-fl { z-index: 1 !important; bottom: -8px; }
.hero-fl-left { width: 132px; left: -26px; }
.hero-fl-right { width: 124px; right: -20px; }
.butterfly-deco { top: -14px; right: 26px; width: 32px; }
.quote-card { padding-right: 140px !important; }

/* ============================================================
   Bouton de décor (Love ⇄ Power)
   ============================================================ */
.theme-toggle {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 7px;
  border-radius: 20px;
  border: 1px solid rgba(201, 79, 124, 0.35);
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  color: #8E1B35; cursor: pointer;
  box-shadow: 0 4px 12px rgba(236, 119, 165, 0.18);
  position: relative; z-index: 6;
}
.theme-toggle:active { transform: scale(0.95); }
.tt-icon { width: 20px; height: 20px; object-fit: contain; }
.tt-to-love { display: none; }
html[data-theme="power"] .tt-to-power { display: none; }
html[data-theme="power"] .tt-to-love { display: inline; }
html[data-theme="power"] img.tt-to-love { display: inline-block; }
.only-power { display: none; }
html[data-theme="power"] .only-power { display: block; }

/* ============================================================
   POWER MODE — noir, cramoisi, or (décor sombre)
   ============================================================ */
html[data-theme="power"] {
  color-scheme: dark;
  --bg: #110608;
  --rose-poudre: #2A1015;
  --rose-fleur: #5C1B26;
  --rose-principal: #C8102E;
  --framboise: #E4B062;
  --texte-principal: #F3E4D6;
  --texte-secondaire: #C9A596;
  --texte-eteint: #7C5B57;
  --carte-bordure: #3B141B;
  --carte-bordure-forte: #6E1E2B;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-btn: 0 6px 18px rgba(200, 16, 46, 0.45);
}
html[data-theme="power"], html[data-theme="power"] body { background: #080304; color: var(--texte-principal); }
html[data-theme="power"] #phone {
  background:
    radial-gradient(circle at 80% 6%, rgba(200, 16, 46, 0.28), transparent 34%),
    radial-gradient(circle at 8% 40%, rgba(140, 10, 30, 0.22), transparent 36%),
    radial-gradient(circle at 92% 72%, rgba(200, 16, 46, 0.18), transparent 34%),
    radial-gradient(circle at 25% 96%, rgba(228, 176, 98, 0.10), transparent 36%),
    linear-gradient(180deg, #150709 0%, #0E0506 55%, #120608 100%);
  box-shadow: 0 0 60px rgba(200, 16, 46, 0.25);
}
html[data-theme="power"] .sky-bit { opacity: 0.8; }
html[data-theme="power"] .garland { opacity: 0.75; }

/* Titres or, textes crème */
html[data-theme="power"] .hero h1,
html[data-theme="power"] .card-head h2, html[data-theme="power"] .card h2,
html[data-theme="power"] .quote-text, html[data-theme="power"] .modal-sheet h3,
html[data-theme="power"] .paper-title-main, html[data-theme="power"] .project-detail-name-input {
  color: #F1D6A0;
}
html[data-theme="power"] .hero h1 { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9), 0 0 24px rgba(200, 16, 46, 0.35); }
html[data-theme="power"] .hero .today-label { color: #E9CDBD; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }

/* Cartes : verre noir, liseré rouge, halo cramoisi */
html[data-theme="power"] .view > .card,
html[data-theme="power"] .progress-card,
html[data-theme="power"] .quote-card,
html[data-theme="power"] .paper-card {
  background: rgba(22, 8, 11, 0.86) !important;
  border: 1px solid rgba(200, 30, 55, 0.42) !important;
  box-shadow: 0 0 0 1px rgba(228, 176, 98, 0.06), 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 22px rgba(200, 16, 46, 0.16) !important;
}

/* Boutons */
html[data-theme="power"] .btn-primary,
html[data-theme="power"] .nav-add {
  background: linear-gradient(180deg, #D7263D 0%, #A30D25 100%);
  border: 1px solid rgba(228, 176, 98, 0.55);
  color: #FFF3E6;
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.45), 0 0 0 3px rgba(228, 176, 98, 0.12);
}
html[data-theme="power"] .btn-secondary { background: #2A1015; color: #E4B062; }
html[data-theme="power"] .project-delete-btn { background: #3A0E16; color: #FF8C9C; }
html[data-theme="power"] .theme-toggle {
  background: rgba(20, 7, 10, 0.8); color: #F1D6A0;
  border-color: rgba(228, 176, 98, 0.45); box-shadow: 0 0 14px rgba(200, 16, 46, 0.3);
}

/* Surfaces claires codées en dur → versions sombres */
html[data-theme="power"] .modal-overlay { background: rgba(0, 0, 0, 0.62); }
html[data-theme="power"] .modal-sheet { background: #16080B; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6); border-top: 1px solid rgba(228, 176, 98, 0.25); }
html[data-theme="power"] .bottom-nav {
  background: rgba(18, 6, 9, 0.9) !important;
  border-color: rgba(200, 30, 55, 0.42) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(200, 16, 46, 0.18) !important;
}
html[data-theme="power"] .nav-item { color: #9C7B72; }
html[data-theme="power"] .nav-item.active { color: #E4B062; }
html[data-theme="power"] input, html[data-theme="power"] textarea,
html[data-theme="power"] .project-step-add-row input, html[data-theme="power"] .project-subtask-add-row input,
html[data-theme="power"] #vrac-input, html[data-theme="power"] #add-task-input, html[data-theme="power"] #assign-date-input,
html[data-theme="power"] #assign-time-input, html[data-theme="power"] #project-detail-note {
  background-color: #1C0A0E;
  border-color: #5C1B26;
}
html[data-theme="power"] .project-detail-name-input { background: transparent; }
html[data-theme="power"] .task-action,
html[data-theme="power"] .project-subtask-wrap,
html[data-theme="power"] .cal-arrow,
html[data-theme="power"] .day-sheet-tomorrow-btn,
html[data-theme="power"] .day-sheet-tomorrow-pill { background: #1C0A0E; }
html[data-theme="power"] .task-action.is-on { background: #3A0E16; border-color: #6E1E2B; }
html[data-theme="power"] .progress-project,
html[data-theme="power"] .progress-empty { background: rgba(40, 12, 16, 0.6); border-color: #3B141B; }
html[data-theme="power"] .project-card { background: rgba(34, 11, 15, 0.9); border-color: #3B141B; }
html[data-theme="power"] .project-card::after { background-image: url('../assets/power/rose-02.png'); }
html[data-theme="power"] .project-step-block,
html[data-theme="power"] .month-detail-row { background: #1A090C; border-color: #3B141B; }
html[data-theme="power"] .cal-day.other-month { color: #5A3A3A; }
html[data-theme="power"] .paper-card { background: rgba(20, 7, 10, 0.9) !important; }
html[data-theme="power"] .paper-day.is-weekend .paper-day-date { background: rgba(200, 16, 46, 0.08); }
html[data-theme="power"] .free-note { background-color: #1A090C; border-color: #3B141B; }
html[data-theme="power"] .task-project-tag { background: rgba(255, 255, 255, 0.07); color: #D9B9A8; }
html[data-theme="power"] .project-color-swatch { border-color: #16080B; }
html[data-theme="power"] .project-color-swatch.selected { box-shadow: 0 0 0 2px #E4B062; }
html[data-theme="power"] .week-grid-cell, html[data-theme="power"] .week-grid-head { background: #1A090C; }
html[data-theme="power"] .week-grid-chip { background: #2A1015; color: var(--texte-principal); }
html[data-theme="power"] ::placeholder { color: #7C5B57 !important; -webkit-text-fill-color: #7C5B57 !important; }

/* Décors propres au Power Mode */
.p-serpent { width: 92px; right: 150px; top: 150px; z-index: 2 !important; transform: rotate(-8deg); }
.p-candle { width: 40px; left: 52%; top: 86px; z-index: 2 !important; }
.p-feather { width: 54px; left: 40%; top: 150px; z-index: 2 !important; transform: rotate(-30deg); opacity: 0.9; }
.p-moon { width: 84px; right: 150px; top: 8px; z-index: 0 !important; }
.p-candle-cal { width: 36px; right: 170px; top: 40px; z-index: 2 !important; }
html[data-theme="power"] .hero-cloud { opacity: 0.8; }
html[data-theme="power"] .hero-moon { width: 110px; }
html[data-theme="power"] .quote-cat { width: 176px; bottom: -14px; }
html, body, #phone, .card, .bottom-nav { transition: background-color 0.4s ease; }
.theme-toggle { align-self: flex-start; width: auto; }
.hero .header-text { display: flex; flex-direction: column; align-items: flex-start; }
html[data-theme="power"] .card-fl { width: 66px; right: -12px; bottom: -18px; }
html[data-theme="power"] .card-fl-left { width: 44px; left: -16px; bottom: -34px; }
html[data-theme="power"] .vrac-card.ideas-card { padding-bottom: 54px; }

/* ============================================================
   Connexion + pastille de synchro
   ============================================================ */
.hero .header-text .theme-toggle, .hero .header-text .sync-pill { display: inline-flex; }
.hero .header-text { flex-direction: row; flex-wrap: wrap; column-gap: 6px; align-items: center; }
.hero .header-text h1, .hero .header-text .today-label { flex-basis: 100%; }
.sync-pill {
  margin-top: 10px;
  align-items: center; gap: 6px;
  padding: 6px 11px;
  border-radius: 20px;
  border: 1px solid rgba(201, 79, 124, 0.3);
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--font-body); font-size: 11.5px; font-weight: 700;
  color: #8E1B35; cursor: pointer; position: relative; z-index: 6;
}
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #C8B0B9; }
.sync-pill[data-status="ok"] .sync-dot { background: #6BBF8A; box-shadow: 0 0 6px rgba(107, 191, 138, 0.8); }
.sync-pill[data-status="syncing"] .sync-dot { background: #F5C451; animation: twinkle 1s ease-in-out infinite; }
.sync-pill[data-status="offline"] .sync-dot, .sync-pill[data-status="error"] .sync-dot { background: #F09A74; }
html[data-theme="power"] .sync-pill { background: rgba(20, 7, 10, 0.8); color: #F1D6A0; border-color: rgba(228, 176, 98, 0.45); }

.sync-info { margin: 0; font-size: 13px; line-height: 1.5; color: var(--texte-secondaire); }
.sync-help { margin: 0; font-size: 12px; color: var(--texte-secondaire); }
.sync-area {
  width: 100%; min-height: 90px; resize: vertical;
  font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  border-radius: 14px; border: 1px solid var(--rose-fleur); background: var(--bg); padding: 10px;
}
#sync-import-box { display: flex; flex-direction: column; gap: 8px; }
#sync-import-box.hidden { display: none; }

.login-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 80% 10%, rgba(247, 183, 206, 0.8), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(231, 213, 250, 0.7), transparent 40%),
    linear-gradient(180deg, #FCE4EC, #FDEFF3);
}
.login-card {
  position: relative; width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 120px 22px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(247, 183, 206, 0.8);
  box-shadow: 0 16px 40px rgba(236, 119, 165, 0.25);
}
.login-char { position: absolute; width: 190px; left: 50%; top: -80px; transform: translateX(-50%); pointer-events: none; }
.login-title { text-align: center; font-size: 26px; font-weight: 600; color: #5A2743; }
.login-sub { margin: 0 0 4px; text-align: center; font-size: 13px; color: var(--texte-secondaire); }
.login-card input {
  font-family: var(--font-body); font-size: 15px;
  padding: 12px 16px; border-radius: 18px;
  border: 1px solid var(--rose-fleur); background: var(--bg); outline: none;
}
.login-card input:focus { border-color: var(--rose-principal); box-shadow: 0 0 0 3px rgba(247, 183, 206, 0.35); }
.login-msg { margin: 0; min-height: 16px; font-size: 12.5px; color: #B03A5B; text-align: center; }
.login-main-btn { align-self: stretch; justify-content: center; }
.login-link { background: none; border: none; font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--framboise); cursor: pointer; padding: 4px; }
.login-skip { font-size: 11.5px; font-weight: 600; color: var(--texte-eteint); }
html[data-theme="power"] .login-overlay {
  background: radial-gradient(circle at 80% 10%, rgba(200, 16, 46, 0.35), transparent 40%), linear-gradient(180deg, #150709, #0B0405);
}
html[data-theme="power"] .login-card { background: rgba(22, 8, 11, 0.92); border-color: rgba(200, 30, 55, 0.5); box-shadow: 0 0 30px rgba(200, 16, 46, 0.25); }
html[data-theme="power"] .login-title { color: #F1D6A0; }
html[data-theme="power"] .login-card input { background: #1C0A0E; }
