/* ============================================================
   Carnet 21 jours — ASSENTIEL
   Papier ivoire, encre violette, filets d'or.
   ============================================================ */

@font-face {
  font-family: "Crimson Text";
  src: url("fonts/CrimsonText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("fonts/CrimsonText-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("fonts/CrimsonText-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --violet: #4b2063;
  --violet-700: #3a184e;
  --violet-900: #2a1038;
  --gold: #b08d57;
  --gold-soft: #d8be93;
  --gold-wash: #f0e3cd;
  --ivory: #f7efe5;
  --paper: #fffcf7;
  --ink: #2c2333;
  --muted: #6e6277;
  --line: rgba(75, 32, 99, 0.13);
  --line-strong: rgba(75, 32, 99, 0.24);
  --shadow: 0 18px 40px -30px rgba(44, 35, 51, 0.55);
  --serif: "Crimson Text", Georgia, "Times New Roman", serif;
  --sans: "Lato", "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(140% 80% at 50% -10%, #fdf8f1 0%, var(--ivory) 46%, #f2e7d9 100%);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--violet);
  color: var(--ivory);
  border-radius: 0 0 12px 0;
}
.skip:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Structure ---------- */

.app {
  min-height: 100dvh;
  display: block;
}

.main {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px calc(112px + var(--safe-bottom));
}

.view {
  animation: rise 0.45s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Barre haute (mobile) ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 6px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--violet);
}
.topbar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.7);
  color: var(--violet);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.install-btn svg {
  width: 15px;
  height: 15px;
}

/* ---------- Panneau de marque (desktop) ---------- */

.brand-panel {
  display: none;
}

/* ---------- En-tête du jour ---------- */

.day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 4px 12px;
}

.day-date {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-count {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--violet);
  white-space: nowrap;
}
.day-count strong {
  font-weight: 600;
  font-size: 1.15rem;
}

/* ---------- Progression ---------- */

.progress {
  height: 3px;
  border-radius: 999px;
  background: rgba(75, 32, 99, 0.1);
  overflow: hidden;
  margin: 0 4px 20px;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  transition: width 0.6s cubic-bezier(0.22, 0.8, 0.3, 1);
}

/* ---------- Carte héro ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 28px 26px 26px;
  color: var(--ivory);
  background:
    radial-gradient(120% 120% at 100% 0%, #62317f 0%, #4b2063 48%, #38164b 100%);
  box-shadow: 0 26px 50px -34px rgba(42, 16, 56, 0.9);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(216, 190, 147, 0.28);
  pointer-events: none;
}
.hero::before {
  width: 230px;
  height: 230px;
  right: -86px;
  top: -96px;
}
.hero::after {
  width: 340px;
  height: 340px;
  right: -140px;
  top: -150px;
  border-color: rgba(216, 190, 147, 0.16);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.hero h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 6.4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.hero p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(247, 239, 229, 0.82);
  max-width: 34ch;
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(216, 190, 147, 0.22);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: rgba(247, 239, 229, 0.68);
}
.hero-foot span {
  width: 22px;
  height: 1px;
  background: var(--gold-soft);
  display: inline-block;
}

/* ---------- Sections ---------- */

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 10px;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.22rem;
  color: var(--violet);
}

.section-note {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  text-align: right;
}

.section-intro {
  margin: 0 4px 12px;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- Cartes ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* ---------- Gestes matin / soir ---------- */

.gestes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.geste {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}
.geste:active {
  transform: scale(0.985);
}

.geste-check {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.4px solid var(--gold-soft);
  display: grid;
  place-items: center;
  color: transparent;
  background: transparent;
  transition: background 0.25s ease, color 0.2s ease, border-color 0.25s ease;
}
.geste-check svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.geste-label {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--violet);
  line-height: 1.2;
}

.geste-hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.geste.is-done {
  background: #fbf6ec;
  border-color: rgba(176, 141, 87, 0.45);
}
.geste.is-done .geste-check {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--ivory);
}

/* ---------- Champs ---------- */

.field {
  margin-top: 18px;
}
.field:first-child {
  margin-top: 0;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(176, 141, 87, 0.4);
}

.field label,
.field-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.field input[type="text"],
.field input[type="date"],
.field textarea,
.field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 8px 2px 9px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.2s ease;
}
.field textarea {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 88px;
  background: #fffdf9;
  line-height: 1.55;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #a79aad;
  font-style: italic;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
}
.field textarea:focus {
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.12);
}

.field-help {
  margin: 6px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

/* ---------- Souffle ---------- */

.breath-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px dashed rgba(176, 141, 87, 0.55);
  background: linear-gradient(180deg, #fdf8f0, #f9f1e4);
}

.breath-orb {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e9d7b8, var(--gold));
  box-shadow: 0 0 0 6px rgba(176, 141, 87, 0.1);
  animation: orb 10s ease-in-out infinite;
}

@keyframes orb {
  0%, 100% { transform: scale(0.86); }
  40% { transform: scale(1.06); }
  60% { transform: scale(1.06); }
}

.breath-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.breath-copy h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--violet);
}
.breath-copy p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn svg {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--violet);
  color: var(--ivory);
}
.btn-primary:hover {
  background: var(--violet-700);
}

.btn-gold {
  background: linear-gradient(135deg, #c3a06a, var(--gold));
  color: #fffdf8;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--violet);
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  min-height: 40px;
  padding: 8px 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(110, 98, 119, 0.4);
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Bandeau du jour ---------- */

.day-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.day-strip svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--gold);
}
.day-strip strong {
  color: var(--violet);
  font-weight: 700;
}

/* ---------- Dimanche ---------- */

.quadrants {
  display: grid;
  gap: 12px;
}

.quadrant {
  padding: 18px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.quadrant h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--violet);
}
.quadrant .quad-tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.quadrant p {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.quadrant textarea {
  width: 100%;
  min-height: 78px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fffdf9;
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.5;
}
.quadrant textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.12);
}

.top3 {
  display: grid;
  gap: 10px;
}

.top3-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.top3-row .field-num {
  width: 22px;
  height: 22px;
}
.top3-row input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 0.95rem;
}
.top3-row input:focus {
  outline: none;
}
.top3-row.is-done input {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(110, 98, 119, 0.5);
}

.check-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.4px solid var(--line-strong);
  background: transparent;
  display: grid;
  place-items: center;
  color: transparent;
}
.check-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.check-btn.is-done {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--ivory);
}

/* ---------- Contrôle J+7 ---------- */

.check-list {
  display: grid;
  gap: 12px;
}

.check-item {
  padding: 16px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.check-item > p {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--violet);
}
.check-grid {
  display: grid;
  gap: 8px;
}
.check-q {
  display: grid;
  gap: 3px;
}
.check-q span {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.check-q select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fffdf9;
  font-size: 0.88rem;
}

/* ---------- Parcours ---------- */

.parcours-head {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.parcours-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat {
  text-align: center;
  padding: 8px 4px;
  border-radius: 14px;
  background: rgba(176, 141, 87, 0.07);
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--violet);
  line-height: 1.1;
}
.stat span {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.day-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--muted);
  transition: transform 0.15s ease, background 0.2s ease;
}
.day-cell:active {
  transform: scale(0.95);
}
.day-cell.is-done {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--ivory);
}
.day-cell.is-partial {
  background: #fbf2e2;
  border-color: rgba(176, 141, 87, 0.55);
  color: var(--violet);
}
.day-cell.is-today {
  box-shadow: 0 0 0 2px var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}
.day-cell.is-rest {
  background: rgba(75, 32, 99, 0.04);
  border-style: dashed;
}
.day-cell .dot {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.72rem;
  color: var(--muted);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: inline-block;
}
.legend .l-done { background: var(--violet); border-color: var(--violet); }
.legend .l-partial { background: #fbf2e2; border-color: var(--gold-soft); }
.legend .l-rest { background: rgba(75, 32, 99, 0.04); border-style: dashed; }

.legend-note {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: var(--muted);
}

/* ---------- Bilan ---------- */

.bilan-q {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.bilan-q:last-of-type {
  border-bottom: 0;
  padding-bottom: 4px;
}
.bilan-q label {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
}
.bilan-q .q-num {
  flex: none;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--gold);
  line-height: 1.3;
}
.bilan-q textarea {
  width: 100%;
  min-height: 70px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fffdf9;
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.5;
}
.bilan-q textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.12);
}

.intention {
  margin-top: 22px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, #fdf8f0, #f6ecdc);
  border: 1px solid rgba(176, 141, 87, 0.3);
}
.intention label {
  display: block;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--violet);
  margin-bottom: 8px;
}
.intention textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid rgba(176, 141, 87, 0.45);
  border-radius: 14px;
  padding: 12px;
  background: #fffdf8;
  resize: vertical;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.5;
}

/* ---------- Appel Clarté ---------- */

.call-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  color: var(--ivory);
  background:
    radial-gradient(120% 120% at 0% 0%, #5b2a76 0%, #431c59 55%, #351448 100%);
  box-shadow: 0 22px 44px -32px rgba(42, 16, 56, 0.9);
}
.call-card .eyebrow {
  color: var(--gold-soft);
}
.call-card h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.15;
}
.call-card p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: rgba(247, 239, 229, 0.8);
  max-width: 40ch;
}
.call-card .btn {
  width: 100%;
}

/* ---------- Bande d'appel quotidienne ---------- */

.call-strip {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(176, 141, 87, 0.38);
  background: linear-gradient(160deg, #fdf8f0 0%, #f8eee0 100%);
}

.cs-title {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--violet);
  line-height: 1.2;
}

.cs-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 42ch;
}

.call-strip .btn {
  width: 100%;
  line-height: 1.25;
  text-align: center;
}

.call-actions {
  display: grid;
  gap: 6px;
  justify-items: stretch;
}

.wa-link {
  display: block;
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(176, 141, 87, 0.5);
  text-underline-offset: 3px;
  padding: 2px 0;
}

.wa-link:hover {
  color: var(--violet);
}

.share-card {
  padding: 22px;
  border-radius: 22px;
  background: var(--paper);
  border: 1px solid rgba(176, 141, 87, 0.42);
  box-shadow: var(--shadow);
}

.share-card.is-done {
  background: linear-gradient(160deg, #fdf8f0 0%, #f8eee0 100%);
}

.share-note {
  margin: 14px 0 0;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.share-error {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #9b2c2c;
  text-align: center;
}

.kept-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(176, 141, 87, 0.12);
  font-size: 0.8rem;
  line-height: 1.45;
  color: #7d6136;
}

.share-card .btn {
  width: 100%;
}

.share-card .btn-quiet {
  width: auto;
}

.btn-call {
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
  padding: 11px 20px;
}

.btn-call span {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.92;
}

/* ---------- Barre d'onglets (mobile) ---------- */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px -18px rgba(44, 35, 51, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 30;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 7px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease;
}
.tab svg {
  width: 20px;
  height: 20px;
}
.tab.is-active {
  background: rgba(75, 32, 99, 0.07);
  color: var(--violet);
}
.tab.is-active svg {
  stroke-width: 1.9;
}

/* ---------- Pied de page ---------- */

.app-footer {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--serif);
  font-size: 0.86rem;
  color: var(--muted);
}
.app-footer p {
  margin: 0;
}
.app-footer-note {
  margin-top: 6px !important;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--violet);
  color: var(--ivory);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
  white-space: nowrap;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Feuille modale ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(42, 16, 56, 0.42);
  backdrop-filter: blur(3px);
  animation: fade 0.2s ease both;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 10px 22px calc(26px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--ivory);
  box-shadow: 0 -20px 60px -30px rgba(42, 16, 56, 0.6);
  animation: sheet-up 0.32s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.sheet-grip {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(75, 32, 99, 0.18);
  margin: 4px auto 16px;
}

.sheet h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--violet);
  line-height: 1.15;
}
.sheet .sheet-sub {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
}
.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- Souffle (plein écran) ---------- */

.breath {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ivory);
  background:
    radial-gradient(80% 60% at 50% 42%, #562a70 0%, #3b1750 55%, #260d33 100%);
  animation: fade 0.35s ease both;
}

.breath-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 24px;
}

.breath-stage {
  position: relative;
  width: min(66vw, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.breath-stage::before,
.breath-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(216, 190, 147, 0.22);
}

.breath-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 252, 246, 0.62), rgba(226, 201, 163, 0.34) 44%, rgba(176, 141, 87, 0.1) 72%);
  border: 1px solid rgba(216, 190, 147, 0.5);
  transform: scale(0.62);
  transition: transform 4s cubic-bezier(0.37, 0, 0.63, 1);
  box-shadow: 0 0 80px rgba(216, 190, 147, 0.22), inset 0 0 60px rgba(255, 250, 240, 0.18);
}
.breath-circle.is-in {
  transform: scale(1);
  transition-duration: 4s;
}
.breath-circle.is-out {
  transform: scale(0.62);
  transition-duration: 6s;
}

.breath-word {
  position: absolute;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: #fdf7ec;
}

.breath-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
}
.breath-count {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 239, 229, 0.6);
}
.breath-close {
  background: transparent;
  border: 1px solid rgba(216, 190, 147, 0.5);
  color: var(--ivory);
}

/* ---------- Onboarding ---------- */

.welcome {
  padding-top: 34px;
  text-align: center;
}
.welcome img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 10px;
}
.welcome .eyebrow {
  color: var(--gold);
}
.welcome h1 {
  margin: 0 auto 12px;
  max-width: 20ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 2.6rem);
  line-height: 1.08;
  color: var(--violet);
  text-wrap: balance;
}
.welcome > p {
  margin: 0 auto 26px;
  max-width: 38ch;
  font-size: 0.95rem;
  color: var(--muted);
}
.welcome-card {
  text-align: left;
}

/* ---------- Utilitaires ---------- */

.mt-24 { margin-top: 24px; }
.mt-16 { margin-top: 16px; }
.center { text-align: center; }
.hidden { display: none !important; }

.empty-note {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Grand écran ---------- */

@media (min-width: 960px) {
  .app {
    display: grid;
    grid-template-columns: 300px minmax(0, 620px);
    gap: 56px;
    justify-content: center;
    align-items: start;
    max-width: 1040px;
    margin: 0 auto;
    padding: 44px 32px 80px;
  }

  .brand-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 44px;
    padding-top: 4px;
  }

  .brand-lockup {
    text-align: left;
  }
  .brand-mark {
    width: 74px;
    height: 74px;
    object-fit: contain;
    margin-bottom: 8px;
  }
  .brand-name {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.5rem;
    letter-spacing: 0.18em;
    color: var(--violet);
    line-height: 1;
  }
  .brand-tag {
    margin: 8px 0 0;
    font-size: 0.62rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--gold);
    line-height: 1.6;
    max-width: 26ch;
  }

  .brand-progress {
    position: relative;
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
  }
  .ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
  }
  .ring circle {
    fill: none;
    stroke-width: 2.4;
  }
  .ring-track {
    stroke: rgba(75, 32, 99, 0.1);
  }
  .ring-value {
    stroke: var(--gold);
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transition: stroke-dashoffset 0.8s ease;
  }
  .ring-label {
    text-align: center;
  }
  .ring-number {
    display: block;
    font-family: var(--serif);
    font-size: 2rem;
    line-height: 1;
    color: var(--violet);
  }
  .ring-caption {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .sidenav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }
  .sidenav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-size: 0.86rem;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .sidenav-item svg {
    width: 18px;
    height: 18px;
  }
  .sidenav-item.is-active {
    background: rgba(75, 32, 99, 0.07);
    color: var(--violet);
    font-weight: 700;
  }
  .sidenav-item:hover {
    color: var(--violet);
  }

  .brand-signature {
    margin: 0;
    font-family: var(--serif);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.02em;
  }

  .main {
    padding: 0 0 40px;
  }

  .topbar {
    justify-content: flex-end;
    padding: 0 0 8px;
    min-height: 0;
  }
  .topbar-brand {
    display: none;
  }

  .day-head {
    padding-top: 4px;
  }

  .tabbar {
    display: none;
  }

  .toast {
    bottom: 34px;
  }

  .quadrants {
    grid-template-columns: 1fr 1fr;
  }

  .check-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .app-footer {
    margin-top: 40px;
  }
}

@media (min-width: 1200px) {
  .app {
    grid-template-columns: 320px minmax(0, 640px);
    gap: 72px;
  }
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .breath-orb {
    animation: none;
  }
  .breath-circle {
    transition: none;
  }
}

/* ---------- Impression ---------- */

.print-sheet {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 18mm 16mm;
  }
  body {
    background: #fff;
    color: #2c2333;
    font-size: 10.5pt;
  }
  .app,
  .tabbar,
  .toast,
  .overlay,
  .skip {
    display: none !important;
  }
  .print-sheet {
    display: block;
  }
  .print-head {
    text-align: center;
    border-bottom: 1px solid #b08d57;
    padding-bottom: 10px;
    margin-bottom: 18px;
  }
  .print-head img {
    width: 64px;
    height: 64px;
    object-fit: contain;
  }
  .print-head h1 {
    font-family: var(--serif);
    font-size: 20pt;
    margin: 4px 0 2px;
    color: #4b2063;
  }
  .print-head p {
    margin: 0;
    font-size: 8pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #b08d57;
  }
  .print-sheet h2 {
    font-family: var(--serif);
    font-size: 13pt;
    color: #4b2063;
    margin: 18px 0 6px;
    border-bottom: 1px solid rgba(75, 32, 99, 0.2);
    padding-bottom: 3px;
  }
  .print-sheet h3 {
    font-family: var(--serif);
    font-size: 11pt;
    color: #4b2063;
    margin: 12px 0 3px;
  }
  .print-sheet p {
    margin: 0 0 5px;
    line-height: 1.45;
  }
  .print-sheet .muted {
    color: #6e6277;
    font-size: 9pt;
  }
  .print-sheet table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 9pt;
  }
  .print-sheet th,
  .print-sheet td {
    border: 1px solid rgba(75, 32, 99, 0.18);
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
  }
  .print-sheet th:nth-child(1), .print-sheet td:nth-child(1) { width: 7%; }
  .print-sheet th:nth-child(2), .print-sheet td:nth-child(2) { width: 12%; }
  .print-sheet th:nth-child(3), .print-sheet td:nth-child(3),
  .print-sheet th:nth-child(4), .print-sheet td:nth-child(4) { width: 8%; }
  .print-sheet th:nth-child(5), .print-sheet td:nth-child(5) { width: 32%; }
  .print-sheet th:nth-child(6), .print-sheet td:nth-child(6) { width: 33%; }
  .print-sheet th {
    background: #f7efe5;
    font-weight: 700;
  }
  .print-foot {
    margin-top: 22px;
    padding-top: 8px;
    border-top: 1px solid rgba(75, 32, 99, 0.2);
    text-align: center;
    font-family: var(--serif);
    font-size: 8.5pt;
    color: #6e6277;
  }
  .print-sheet .qa {
    margin-bottom: 8px;
    break-inside: avoid;
  }
}
