@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --sky: linear-gradient(180deg, #1566cc 0%, #1a74d4 18%, #2f99ea 42%, #5cc3f2 68%, #9fe6c8 100%);
  --sky-base: #2f99ea;
  --sky-ink: #ffffff;
  --sky-soft: rgba(255, 255, 255, 0.9);
  --sky-shadow: 0 2px 14px rgba(6, 40, 110, 0.35);
  --ink: #0c2746;
  --soft: #3a5676;
  --accent: #0b5fc0;
  --heading: #0d3f78;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-edge: rgba(255, 255, 255, 0.92);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 45%);
  --shadow: 0 22px 44px -26px rgba(6, 40, 110, 0.55);
  --gel: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.12) 48%, rgba(255, 255, 255, 0) 50%),
    radial-gradient(90% 60% at 50% 118%, rgba(120, 225, 255, 0.55), rgba(120, 225, 255, 0) 70%),
    linear-gradient(180deg, #43a8ff 0%, #0a5ed6 100%);
  --fresh: #2fc06e;
  --code: rgba(10, 112, 188, 0.12);
  --glow-1: #b8a8ff;
  --glow-2: #5fe0f0;
  --glow-3: #9ff0cf;
  --heart: #e2457f;
  --radius: 24px;
  color-scheme: light;
}

/* Nuit : choisie par le bouton, sinon celle de l'ordinateur (script en tête de page). */
:root[data-theme="dark"] {
  --sky: radial-gradient(60% 40% at 85% 0%, rgba(140, 100, 255, 0.3), rgba(140, 100, 255, 0) 70%),
    linear-gradient(180deg, #050f2e 0%, #0a1a48 30%, #112c68 62%, #18387f 84%, #1d4492 100%);
  --sky-base: #0a1a48;
  --sky-soft: rgba(225, 236, 255, 0.86);
  --sky-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  --ink: #e8f1ff;
  --soft: #b4c6e6;
  --accent: #8adbff;
  --heading: #cfe6ff;
  --glass: rgba(18, 36, 92, 0.72);
  --glass-strong: rgba(18, 36, 92, 0.86);
  --glass-edge: rgba(140, 180, 255, 0.3);
  --gloss: linear-gradient(180deg, rgba(150, 190, 255, 0.16) 0%, rgba(150, 190, 255, 0) 45%);
  --shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.7);
  --code: rgba(120, 180, 255, 0.18);
  --heart: #ff8fb6;
  --glow-1: #6c4fd8;
  --glow-2: #1f8fd6;
  --glow-3: #2a6fb0;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--sky-base); scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky);
  background-attachment: fixed;
  color: var(--ink);
  font: 17px/1.6 "Figtree", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ——— Ciel : halos irisés et bulles ——— */

.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45; }
.g1 { width: 46vw; height: 34vw; left: -12vw; top: -8vw; background: var(--glow-1); }
.g2 { width: 40vw; height: 30vw; right: -10vw; top: 30vh; background: var(--glow-2); opacity: 0.35; }
.g3 { width: 50vw; height: 30vw; left: 20vw; bottom: -14vw; background: var(--glow-3); opacity: 0.4; }

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 8%, rgba(255, 255, 255, 0.25) 22%, rgba(255, 255, 255, 0.06) 60%, rgba(160, 230, 255, 0.35) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(10, 60, 140, 0.18);
  animation: rise 22s ease-in-out infinite alternate;
}
.b1 { width: 64px; height: 64px; left: 6%; top: 22%; }
.b2 { width: 28px; height: 28px; left: 12%; top: 64%; animation-duration: 18s; }
.b3 { width: 46px; height: 46px; right: 8%; top: 14%; animation-duration: 26s; }
.b4 { width: 22px; height: 22px; right: 5%; top: 58%; animation-duration: 16s; }
.b5 { width: 36px; height: 36px; left: 48%; top: 86%; animation-duration: 24s; }

@keyframes rise {
  from { transform: translateY(0); }
  to { transform: translateY(-40px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubble { animation: none; }
  .theme-toggle, .theme-toggle svg, .layer, .deck li { transition: none; }
}

/* ——— Barre du haut ——— */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1120px;
  margin: 12px auto 0;
  padding: 8px 10px 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--gloss), var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 800; font-size: 20px; text-decoration: none; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; }
.topbar nav a { padding: 6px 14px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.topbar nav a:hover { background: var(--code); }

/* ——— Boutons ——— */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .topbar a:focus-visible, .footer a:focus-visible { outline: 3px solid #ffd58c; outline-offset: 3px; }
.btn-gel {
  color: #fff;
  background: var(--gel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 26px -12px rgba(10, 94, 214, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(6, 40, 110, 0.4);
}
.btn-glass {
  color: var(--heading);
  background: var(--gloss), var(--glass-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
}
.btn-small { padding: 8px 18px; font-size: 15px; }
.btn-heart { gap: 7px; }
.btn-heart svg, .meta a::before { color: var(--heart); }
.btn-warm {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.1) 48%, rgba(255, 255, 255, 0) 50%),
    radial-gradient(90% 60% at 50% 118%, rgba(255, 200, 150, 0.55), rgba(255, 200, 150, 0) 70%),
    linear-gradient(180deg, #ff7ea6 0%, #c92a64 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 26px -12px rgba(201, 42, 100, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(110, 10, 50, 0.45);
}

/* ——— En-tête ——— */

main { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.hero { text-align: center; padding: 64px 0 24px; color: var(--sky-ink); }
.hero-logo { filter: drop-shadow(0 14px 24px rgba(6, 40, 110, 0.45)); }
.hero h1 { margin: 10px 0 0; font-size: clamp(48px, 8vw, 84px); line-height: 1; font-weight: 800; letter-spacing: -0.03em; text-shadow: var(--sky-shadow); }
.tagline { margin: 14px 0 0; font-size: clamp(22px, 3vw, 30px); font-weight: 700; text-shadow: var(--sky-shadow); }
.lead { max-width: 640px; margin: 12px auto 0; color: var(--sky-soft); font-size: 19px; text-shadow: var(--sky-shadow); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.meta { margin: 16px 0 0; color: var(--sky-soft); font-size: 15px; font-weight: 600; text-shadow: var(--sky-shadow); }
.hero-shot { display: block; margin: 44px auto 0; max-width: 1080px; }
.hero-shot img { display: block; width: 100%; border-radius: 28px; filter: drop-shadow(0 30px 50px rgba(6, 40, 110, 0.4)); }
.hero-shot .shot-dark, :root[data-theme="dark"] .hero-shot .shot-light { display: none; }
:root[data-theme="dark"] .hero-shot .shot-dark { display: block; }

/* ——— Bouton jour / nuit, sur le côté ——— */

.theme-toggle {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  padding: 0;
  border: 1px solid var(--glass-edge);
  border-radius: 50%;
  color: var(--heading);
  background: var(--gloss), var(--glass-strong);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.theme-toggle:hover { transform: scale(1.06); }
.theme-toggle:focus-visible { outline: 3px solid #ffd58c; outline-offset: 3px; }
.theme-toggle svg { grid-area: 1 / 1; transition: opacity 0.3s ease, transform 0.4s ease; }
.theme-toggle .sun { color: #f2a51c; opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-toggle .moon { color: #3b6fd6; }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
/* Quand le contenu touche les bords, le bouton descend dans le coin. */
@media (max-width: 1240px) {
  .theme-toggle { top: auto; bottom: 18px; margin-top: 0; }
}

/* ——— Sections ——— */

.section { padding: 56px 0 8px; }
.section > h2 {
  margin: 0;
  text-align: center;
  color: var(--sky-ink);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: var(--sky-shadow);
}
.section-lead { max-width: 640px; margin: 10px auto 0; text-align: center; color: var(--sky-soft); font-size: 18px; text-shadow: var(--sky-shadow); }

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.modules li, .card, .panel {
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  background: var(--gloss), var(--glass);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--shadow);
}
.modules li { padding: 18px 18px 16px; }
@media (min-width: 1000px) { .modules { grid-template-columns: repeat(5, 1fr); } }
.modules h3 { margin: 10px 0 4px; color: var(--heading); font-size: 18px; }
.modules p { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.5; }

.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 32px; }
.card { padding: 22px 24px; }
.card h3 { margin: 0 0 6px; color: var(--heading); font-size: 20px; }
.card p { margin: 0; color: var(--soft); font-size: 16px; }

kbd, code { padding: 1px 6px; border-radius: 6px; background: var(--code); color: var(--ink); font: 600 0.88em/1.4 "Cascadia Code", Consolas, monospace; }

/* ——— Écrans superposés, comme des fenêtres posées les unes sur les autres ——— */

.stage { position: relative; aspect-ratio: 16 / 10; margin-top: 40px; }
.layer {
  position: absolute;
  margin: 0;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.35s ease, z-index 0s 0.1s;
}
.layer img {
  display: block;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--glass-edge);
  box-shadow: 0 30px 60px -28px rgba(6, 40, 110, 0.65), 0 0 0 5px rgba(255, 255, 255, 0.14);
}
.layer figcaption {
  position: absolute;
  left: 16px;
  top: -14px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--gloss), var(--glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--heading);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.layer-calendar { left: 0; top: 0; width: 52%; z-index: 1; --r: -2.5deg; }
.layer-budget { right: 0; top: 3%; width: 52%; z-index: 2; --r: 2.5deg; }
.layer-notes { left: 1%; top: 45%; width: 46%; z-index: 3; --r: -1.2deg; }
.layer-tasks { left: 23%; top: 25%; width: 60%; z-index: 4; --r: 0deg; }
.layer:hover { z-index: 10; transform: rotate(0deg) scale(1.03); transition: transform 0.35s ease, z-index 0s; }

/* ——— Thèmes en éventail ——— */

.deck {
  display: flex;
  justify-content: center;
  margin: 44px 0 0;
  padding: 30px 0 70px;
  list-style: none;
}
.deck li {
  position: relative;
  flex: 0 0 20%;
  margin-left: -8.6%;
  transform: translateY(var(--y)) rotate(var(--r));
  transform-origin: 50% 120%;
  transition: transform 0.3s ease;
}
.deck li:first-child { margin-left: 0; }
.deck li:nth-child(1) { z-index: 1; --r: -9deg; --y: 34px; }
.deck li:nth-child(2) { z-index: 2; --r: -6.5deg; --y: 17px; }
.deck li:nth-child(3) { z-index: 3; --r: -4deg; --y: 7px; }
.deck li:nth-child(4) { z-index: 4; --r: -1.3deg; --y: 1px; }
.deck li:nth-child(5) { z-index: 4; --r: 1.3deg; --y: 1px; }
.deck li:nth-child(6) { z-index: 3; --r: 4deg; --y: 7px; }
.deck li:nth-child(7) { z-index: 2; --r: 6.5deg; --y: 17px; }
.deck li:nth-child(8) { z-index: 1; --r: 9deg; --y: 34px; }
.deck img {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--glass-edge);
  box-shadow: 0 18px 34px -16px rgba(6, 40, 110, 0.7);
}
.deck span {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--gloss), var(--glass-strong);
  color: var(--heading);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.deck li:nth-child(-n + 4) span { left: 26%; }
.deck li:nth-child(n + 5) span { left: 74%; }
.deck li:hover span { left: 50%; }
.deck li:hover { z-index: 10; transform: translateY(-26px) rotate(0deg) scale(1.45); }

.panel { max-width: 820px; margin: 0 auto; padding: 36px 40px; }
.panel h2 { margin: 0 0 14px; color: var(--heading); font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.02em; }

.checks { margin: 0; padding: 0; list-style: none; }
.checks li { position: relative; padding: 6px 0 6px 38px; font-size: 18px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat,
    linear-gradient(180deg, #5ec84a 0%, #1f8f3a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 10px -4px rgba(31, 143, 58, 0.8);
}
.note { margin: 18px 0 0; padding: 14px 18px; border-radius: 16px; background: var(--code); color: var(--ink); font-size: 16px; }

.download { text-align: center; }
.download img { filter: drop-shadow(0 12px 20px rgba(6, 40, 110, 0.35)); }
.download p { color: var(--soft); }
.download .btn { margin: 10px 0 4px; }
.small { font-size: 14px; }

.meta a { color: var(--sky-ink); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.meta a::before { content: "\2665"; margin-right: 5px; text-decoration: none; display: inline-block; }

.support { text-align: center; }
.support p { color: var(--soft); max-width: 600px; margin: 0 auto; }
.support .btn { gap: 9px; margin: 22px 0 6px; }
.support .small { margin-top: 10px; }
.heart-bubble {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 50% 120%, rgba(255, 210, 160, 0.6), rgba(255, 210, 160, 0) 60%), linear-gradient(180deg, #ff8fb2 0%, #d1336d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 10px 14px -8px rgba(255, 255, 255, 0.8), 0 14px 26px -12px rgba(201, 42, 100, 0.8);
}

.footer { max-width: 1120px; margin: 48px auto 0; padding: 26px 20px 40px; text-align: center; color: var(--sky-soft); font-size: 14px; text-shadow: var(--sky-shadow); }
.footer p { margin: 4px 0; }
.footer a { color: var(--sky-ink); font-weight: 600; }

@media (max-width: 760px) {
  .topbar nav { display: none; }
  .topbar .btn-small { margin-left: auto; }
  .stage, .deck {
    display: flex;
    gap: 16px;
    aspect-ratio: auto;
    margin-left: -20px;
    margin-right: -20px;
    padding: 24px 20px 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .layer, .deck li {
    position: relative;
    inset: auto;
    flex: 0 0 82%;
    width: auto;
    margin: 0;
    transform: none;
    scroll-snap-align: center;
  }
  .layer:hover, .deck li:hover { transform: none; }
  .modules { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .modules li { padding: 14px; }
  .modules h3 { font-size: 16px; }
  .modules p { font-size: 14px; }
  .panel { padding: 26px 22px; }
  .hero { padding-top: 40px; }

}
