* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --purple: #a855f7;
  --purple-light: #c084fc;
  --purple-dim: #7c3aed;
  --pink: #ec4899;
  --bg: #0d0814;
  --bg2: #130d1f;
  --bg3: #1a1030;
  --text: #f0e8ff;
  --muted: #7c6a9a;
  --glow: 0 0 20px rgba(168, 85, 247, 0.4);
  --glow-strong: 0 0 40px rgba(168, 85, 247, 0.6);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
}

body::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

/* ─────────────── LOCK SCREEN ─────────────── */
#lock-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at center, #1a0830 0%, #0d0814 70%);
  z-index: 100;
}

#lock-screen p.label {
  font-size: 0.7rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

input#code {
  background: transparent;
  border: none;
  border-bottom: 1px solid #3b2060;
  color: #fff;
  font-size: 1.5rem;
  letter-spacing: 8px;
  text-align: center;
  width: 160px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.3s, text-shadow 0.3s;
}

input#code:focus {
  border-bottom-color: var(--purple);
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
}

.error {
  color: #f472b6;
  font-size: 0.7rem;
  letter-spacing: 2px;
  margin-top: 16px;
  min-height: 1em;
  text-transform: uppercase;
}

/* ─────────────── APP ─────────────── */
#app { display: none; }

/* ─────────────── NAV ─────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.4rem 2rem;
  background: linear-gradient(to bottom, rgba(13,8,20,0.97), transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(168, 85, 247, 0.08);
}

nav button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s, text-shadow 0.3s;
}

nav button.active,
nav button:hover {
  color: var(--purple-light);
  border-bottom-color: var(--purple-light);
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.6);
}

/* ─────────────── PAGES ─────────────── */
.page { display: none; min-height: 100vh; padding-top: 70px; }
.page.active { display: block; }

/* ─────────────── HOME PAGE ─────────────── */
#page-home {
  position: relative;
  display: none;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

#page-home.active { display: flex; }

.home-hero {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 2rem 2rem 1rem;
}

.home-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    #0d0814;
}

.home-bg::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  top: 50%; left: 30%;
  transform: translate(-50%, -50%);
  animation: pulse 6s ease-in-out infinite;
}

.home-bg::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
  top: 30%; right: 20%;
  animation: pulse 8s ease-in-out 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50%       { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

.particles { position: absolute; inset: 0; pointer-events: none; }

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatUp linear infinite;
  filter: blur(0.5px);
}

@keyframes floatUp {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-100vh) scale(0.3); opacity: 0; }
}

.home-content { position: relative; z-index: 2; padding: 2rem; }

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--purple-light);
  text-shadow: 0 0 14px rgba(192, 132, 252, 0.7);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}

h1.hero {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
  text-shadow: 0 0 60px rgba(168, 85, 247, 0.3);
}

h1.hero em {
  font-style: italic;
  background: linear-gradient(135deg, var(--purple-light), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8));
}

.divider {
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, var(--purple), transparent);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  margin: 32px auto;
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 1px;
  font-weight: 300;
  max-width: 360px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 1s ease 1.2s forwards;
}

.corner-date {
  position: absolute;
  bottom: 2rem; right: 2.5rem;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: #3b2060;
  text-transform: uppercase;
  z-index: 2;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Home widgets ── */
.home-widgets {
  width: 100%;
  max-width: 700px;
  padding: 0 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.today-widget {
  background: var(--bg2);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 24px;
  padding: 1.8rem 2rem;
  position: relative;
  overflow: hidden;
}

.today-widget::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.today-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.today-label {
  font-size: 0.65rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--purple-light);
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
}

.today-date-text {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #e8d8ff;
  font-style: italic;
}

.today-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.today-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.today-stat-num {
  font-size: 2.4rem;
  font-weight: 300;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.today-stat-label {
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.today-sep {
  width: 1px;
  height: 44px;
  background: rgba(168, 85, 247, 0.2);
  flex-shrink: 0;
}

/* Je pense à toi */
.pensee-section {
  background: var(--bg2);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 24px;
  padding: 1.8rem 2rem;
  position: relative;
  overflow: hidden;
}

.pensee-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at bottom left, rgba(236, 72, 153, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.pensee-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: #fff;
  text-align: center;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.pensee-cards {
  display: flex;
  gap: 1rem;
}

.pensee-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.08);
  background: rgba(168, 85, 247, 0.03);
}

.pensee-card:last-child {
  border-color: rgba(236, 72, 153, 0.08);
  background: rgba(236, 72, 153, 0.03);
}

.pensee-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

.pensee-adam {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: var(--purple-light);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.2);
}

.pensee-bora {
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f9a8d4;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.2);
}

.pensee-name {
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.pensee-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.pensee-btn:hover {
  background: rgba(168, 85, 247, 0.22);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.4);
  transform: scale(1.06);
}

.pensee-btn:active { transform: scale(0.9); }

.pensee-btn-bora {
  border-color: rgba(236, 72, 153, 0.3);
  background: rgba(236, 72, 153, 0.1);
}

.pensee-btn-bora:hover {
  background: rgba(236, 72, 153, 0.22);
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.4);
}

.pensee-heart { font-size: 1.6rem; display: block; pointer-events: none; }

@keyframes heartPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.pensee-btn.just-sent { animation: heartPop 0.45s ease; }

.pensee-last {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  min-height: 2.4em;
  line-height: 1.5;
}

/* ─────────────── SHARED PAGE STYLES ─────────────── */
.page-header { text-align: center; padding: 4rem 2rem 3rem; }

.page-header .tag {
  font-size: 0.68rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--purple-light);
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
  display: block;
  margin-bottom: 12px;
}

.page-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #fff;
}

.page-header h2 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--purple-light), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.6));
}

.page-header p { margin-top: 12px; color: var(--muted); font-size: 0.88rem; letter-spacing: 1px; }

/* ─────────────── BUCKET LIST ─────────────── */
.bucket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.bucket-item {
  background: var(--bg2);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}

.bucket-item:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.15), inset 0 0 20px rgba(168, 85, 247, 0.04);
  transform: translateY(-3px);
}

.bucket-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.bucket-text h3 { font-size: 0.95rem; font-weight: 500; color: #e8d8ff; margin-bottom: 4px; }
.bucket-text p { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

/* ─────────────── MEMORIES ─────────────── */
.timeline { max-width: 680px; margin: 0 auto; padding: 0 2rem 4rem; position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.3) 10%, rgba(168, 85, 247, 0.3) 90%, transparent);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
  transform: translateX(-50%);
}

.memory { display: flex; gap: 2rem; margin-bottom: 3rem; position: relative; }
.memory:nth-child(odd) { flex-direction: row; }
.memory:nth-child(even) { flex-direction: row-reverse; }

.memory-date { width: 50%; text-align: right; padding-right: 2rem; padding-top: 6px; }
.memory:nth-child(even) .memory-date { text-align: left; padding-right: 0; padding-left: 2rem; }

.memory-date span {
  font-size: 0.68rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--purple-light); text-shadow: 0 0 8px rgba(192, 132, 252, 0.5);
}

.memory-dot {
  position: absolute; left: 50%; top: 10px;
  width: 10px; height: 10px;
  background: var(--purple); border-radius: 50%;
  transform: translateX(-50%); flex-shrink: 0;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.9), 0 0 4px rgba(168, 85, 247, 1);
}

.memory-card {
  width: 50%; background: var(--bg2);
  border: 1px solid rgba(168, 85, 247, 0.15); border-radius: 16px;
  padding: 1.2rem 1.4rem; padding-left: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.memory-card:hover { border-color: rgba(168, 85, 247, 0.35); box-shadow: 0 0 20px rgba(168, 85, 247, 0.12); }
.memory:nth-child(even) .memory-card { padding-left: 1.4rem; padding-right: 2rem; }
.memory-card h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 400; color: #e8d8ff; margin-bottom: 6px; }
.memory-card p { font-size: 0.8rem; color: var(--muted); line-height: 1.7; }

/* ─────────────── GALLERY ─────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem; max-width: 1000px; margin: 0 auto; padding: 0 2rem 4rem;
}

.gallery-item {
  border-radius: 16px; overflow: hidden; aspect-ratio: 3/4;
  background: var(--bg2); border: 1px solid rgba(168, 85, 247, 0.12);
  position: relative; cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover { transform: scale(1.02); box-shadow: 0 0 30px rgba(168, 85, 247, 0.25); }
.gallery-item:nth-child(3n+2) { aspect-ratio: 4/3; }

.gallery-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
}

.gallery-placeholder .ph-icon { font-size: 2rem; opacity: 0.25; }
.gallery-placeholder .ph-label { font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; color: #3b2060; }

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.3);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-size: 2rem;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover { color: #fff; }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--purple-light);
  font-size: 1.4rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(13,8,20,0.92), transparent);
  padding: 1.5rem 1rem 1rem; opacity: 0; transition: opacity 0.3s;
}

.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-caption p { font-size: 0.78rem; color: #c084fc; letter-spacing: 1px; }

/* ─────────────── CALENDAR ─────────────── */
.cal-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.cal-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.cal-switch-btn {
  padding: 10px 32px;
  border-radius: 50px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  background: transparent;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}

.cal-switch-btn.active-moi {
  background: rgba(168, 85, 247, 0.18);
  border-color: var(--purple);
  color: var(--purple-light);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.25);
}

.cal-switch-btn.active-bora {
  background: rgba(236, 72, 153, 0.15);
  border-color: var(--pink);
  color: #f9a8d4;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.25);
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.cal-nav button {
  background: none;
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--purple-light);
  font-size: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.cal-nav button:hover {
  background: rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.cal-nav h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #fff;
  min-width: 240px;
  text-align: center;
}

/* Week header row */
.week-header {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg2);
}

.week-header-spacer { /* empty top-left corner */ }

.week-header-cell {
  text-align: center;
  padding: 6px 4px 10px;
}

.week-header-cell .wh-day {
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.week-header-cell .wh-num {
  font-size: 1.15rem;
  font-weight: 300;
  color: #e0d0ff;
  margin-top: 4px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  margin: 4px auto 0;
  border-radius: 50%;
}

.week-header-cell.today .wh-num {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.7);
}

.week-header-cell.today-bora .wh-num {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.7);
}

/* Scrollable time grid */
.week-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 68vh;
  border: 1px solid rgba(168, 85, 247, 0.1);
  border-radius: 12px;
}

.week-grid {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
  position: relative;
}

.time-labels { position: relative; background: var(--bg); }

.time-label {
  position: absolute;
  right: 8px;
  font-size: 0.6rem;
  color: #4a3a6a;
  letter-spacing: 1px;
  transform: translateY(-50%);
  white-space: nowrap;
  user-select: none;
}

.day-col {
  position: relative;
  border-left: 1px solid rgba(168, 85, 247, 0.07);
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s;
}

.day-col:hover { background: rgba(168, 85, 247, 0.02); }

.hour-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(168, 85, 247, 0.07);
  pointer-events: none;
}

.hour-line.half {
  background: rgba(168, 85, 247, 0.03);
}

/* Events */
.week-event {
  position: absolute;
  left: 3px; right: 3px;
  border-radius: 7px;
  padding: 4px 7px;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  z-index: 5;
}

.week-event:hover { filter: brightness(1.15); transform: scaleX(0.97); }

.week-event.moi {
  background: rgba(124, 58, 237, 0.45);
  border-left: 3px solid var(--purple);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

.week-event.bora {
  background: rgba(190, 24, 93, 0.35);
  border-left: 3px solid var(--pink);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.2);
}

.week-event-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-event-time {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.55);
  margin-top: 1px;
}

/* Current time line */
.time-now-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--purple);
  box-shadow: 0 0 6px rgba(168,85,247,0.9);
  z-index: 10;
  pointer-events: none;
}

.time-now-line::before {
  content: '';
  position: absolute;
  left: -4px; top: -4px;
  width: 10px; height: 10px;
  background: var(--purple);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(168,85,247,1);
}

/* Modal time row */
.modal-time-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.modal-time-row label {
  flex: 1;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.modal-time-row input[type="time"] {
  width: 100%;
  background: rgba(168, 85, 247, 0.07);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 8px 10px;
  outline: none;
  margin-top: 4px;
  transition: border-color 0.2s;
  color-scheme: dark;
}

.modal-time-row input[type="time"]:focus { border-color: var(--purple); }
.modal.bora-modal .modal-time-row input[type="time"]:focus { border-color: var(--pink); }

/* ─────────────── MODAL ─────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.2);
}

.modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #fff;
  margin-bottom: 1.5rem;
}

.modal h3 em { font-style: italic; color: var(--purple-light); }

.modal.bora-modal { border-color: rgba(236, 72, 153, 0.3); box-shadow: 0 0 60px rgba(236, 72, 153, 0.15); }
.modal.bora-modal h3 em { color: #f9a8d4; }
.modal.bora-modal input[type="text"]:focus { border-color: var(--pink); }

.modal input[type="text"] {
  width: 100%;
  background: rgba(168, 85, 247, 0.07);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 1rem;
}

.modal input[type="text"]:focus { border-color: var(--purple); }
.modal input[type="text"]::placeholder { color: var(--muted); }

.btn-add.bora-btn { background: linear-gradient(135deg, #be185d, var(--pink)); box-shadow: 0 0 20px rgba(236, 72, 153, 0.3); }
.btn-add.bora-btn:hover { box-shadow: 0 0 30px rgba(236, 72, 153, 0.5); }

.modal-actions { display: flex; gap: 8px; }

.btn-cancel {
  flex: 1; padding: 10px;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-cancel:hover { border-color: #444; }

.btn-add {
  flex: 2; padding: 10px;
  background: linear-gradient(135deg, var(--purple-dim), var(--purple));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  transition: box-shadow 0.2s, opacity 0.2s;
}

.btn-add:hover { box-shadow: 0 0 30px rgba(168, 85, 247, 0.5); }
.btn-add:disabled { opacity: 0.5; cursor: default; }

.cal-loading {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 2px;
  padding: 3rem;
}

/* ─────────────── COUNTDOWNS ─────────────── */
.countdowns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.countdown-card {
  background: var(--bg2);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.countdown-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.countdown-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.15);
}

.countdown-card.cd-pink::before {
  background: radial-gradient(ellipse at top, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
}

.countdown-card.cd-pink {
  border-color: rgba(236, 72, 153, 0.2);
}

.countdown-card.cd-pink:hover {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 30px rgba(236, 72, 153, 0.15);
}

/* "Ensemble depuis" counts up — green-ish glow */
.countdown-card.cd-up::before {
  background: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
}

.countdown-card.cd-up .cd-num {
  color: var(--purple-light);
  text-shadow: 0 0 20px rgba(192, 132, 252, 0.6);
}

.cd-emoji {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.cd-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #e8d8ff;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.cd-timer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin-bottom: 1.2rem;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

.cd-num {
  font-size: 2.2rem;
  font-weight: 300;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  letter-spacing: -1px;
}

.countdown-card.cd-pink .cd-num {
  text-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

.cd-sub {
  font-size: 0.55rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.cd-sep {
  font-size: 1.6rem;
  font-weight: 200;
  color: var(--muted);
  padding-bottom: 18px;
  user-select: none;
}

.cd-date {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.cd-done {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--purple-light);
  font-style: italic;
  text-shadow: 0 0 14px rgba(192, 132, 252, 0.6);
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE
═══════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Nav: horizontal scroll ── */
  nav {
    justify-content: flex-start;
    gap: 0;
    padding: 0 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav button {
    flex-shrink: 0;
    padding: 1.1rem 0.9rem;
    font-size: 0.62rem;
    letter-spacing: 2px;
  }

  /* ── Pages ── */
  .page { padding-top: 56px; }

  /* ── Home ── */
  .home-content { padding: 1.2rem; }
  .subtitle { font-size: 0.85rem; }
  .corner-date { display: none; }
  .home-widgets { padding: 0 1.2rem 3rem; gap: 1rem; }
  .today-widget, .pensee-section { padding: 1.4rem 1.2rem; border-radius: 20px; }
  .today-stat-num { font-size: 2rem; }
  .pensee-cards { gap: 0.7rem; }
  .pensee-card { padding: 0.8rem; }
  .pensee-btn { width: 52px; height: 52px; }
  .pensee-heart { font-size: 1.4rem; }

  /* ── Page headers ── */
  .page-header { padding: 2.5rem 1.2rem 1.8rem; }
  .page-header h2 { font-size: clamp(1.8rem, 7vw, 3rem); }

  /* ── Bucket list ── */
  .bucket-grid {
    grid-template-columns: 1fr;
    padding: 0 1.2rem 3rem;
    gap: 0.9rem;
  }

  /* ── Timeline: stack vertically, line on left ── */
  .timeline {
    padding: 0 1.2rem 3rem;
    max-width: 100%;
  }
  .timeline::before {
    left: 6px;
    transform: none;
  }
  .memory {
    flex-direction: column !important;
    padding-left: 28px;
    gap: 0.4rem;
    margin-bottom: 2rem;
  }
  .memory-date {
    width: 100% !important;
    text-align: left !important;
    padding: 0 !important;
  }
  .memory-dot {
    left: 2px;
    transform: none;
    top: 4px;
  }
  .memory-card {
    width: 100% !important;
    padding: 1rem 1.2rem !important;
  }

  /* ── Gallery ── */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 0.8rem 3rem;
    gap: 0.6rem;
  }
  /* Reset the every-3rd-child wider ratio on mobile */
  .gallery-item:nth-child(3n+2) { aspect-ratio: 3/4; }

  /* ── Calendar ── */
  .cal-wrap { padding: 0 0.6rem 3rem; }
  .cal-nav { gap: 1rem; }
  .cal-nav h3 { font-size: 0.85rem; min-width: 160px; }
  .cal-nav button { width: 30px; height: 30px; font-size: 0.85rem; }

  /* Week view: fixed min-width so days don't crush, scroll horizontally */
  .week-header {
    grid-template-columns: 44px repeat(7, minmax(72px, 1fr));
    min-width: 560px;
  }
  .week-scroll {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 58vh;
  }
  .week-grid {
    grid-template-columns: 44px repeat(7, minmax(72px, 1fr));
    min-width: 560px;
  }
  .week-event-time { display: none; }

  /* ── Countdowns ── */
  .countdowns-grid {
    grid-template-columns: 1fr;
    padding: 0 1.2rem 3rem;
    gap: 1rem;
  }
  .cd-num { font-size: 1.8rem; }
  .cd-unit { min-width: 42px; }

  /* ── Modal ── */
  .modal-overlay { align-items: flex-end; }
  .modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 1.8rem 1.4rem;
  }
  .modal-time-row { flex-direction: column; gap: 12px; }

  /* ── Lightbox ── */
  .lightbox-prev { left: 0.4rem; width: 36px; height: 36px; font-size: 1rem; }
  .lightbox-next { right: 0.4rem; width: 36px; height: 36px; font-size: 1rem; }
  .lightbox img { border-radius: 8px; }
}

/* Extra small phones */
@media (max-width: 390px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .cd-num { font-size: 1.5rem; }
  .cd-sep { font-size: 1.2rem; }
}
