/* ALMA — Design System */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Nunito:wght@400;500;600&display=swap');

:root {
  --alma-cream: #FFF9F5;
  --alma-cream-bg: #F0EBE3;
  --alma-cream-warm: #FDF3EC;
  --alma-text: #4C3A2C;
  --alma-text-soft: #6B5E50;
  --alma-sage: #B2AC88;
  --alma-sage-light: #E8D9C5;
  --alma-peach: #FF9E80;
  --alma-peach-dark: #F28C6A;
  --alma-gold: #FFD700;
  --alma-gold-soft: #FFE99B;
}

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

html, body {
  background: var(--alma-cream-bg);
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--alma-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
}

.app {
  background: var(--alma-cream);
  max-width: 390px;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* HEADER */
.header {
  display: flex;
  align-items: center;
  padding: 16px;
  position: sticky;
  top: 0;
  background: var(--alma-cream);
  z-index: 10;
  border-bottom: .5px solid rgba(178,172,136,.15);
}
.header .back {
  font-size: 22px;
  color: var(--alma-sage);
  cursor: pointer;
  padding: 4px 8px;
  margin-right: 8px;
  text-decoration: none;
  transition: color .2s;
}
.header .back:hover { color: var(--alma-peach); }
.header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 500;
}
.header-sub {
  font-size: 10px;
  color: var(--alma-sage);
  letter-spacing: .15em;
  margin-top: 1px;
}

/* HOMEPAGE */
.app-home {
  border-radius: 0;
  padding: 24px 16px 80px;
}
.logo { text-align: center; margin-bottom: 6px; }
.logo img { width: 110px; opacity: .85; }
.welcome { text-align: center; margin-bottom: 12px; }
.welcome h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
}
.welcome .sub {
  font-size: 13px;
  opacity: .6;
  margin-top: 3px;
}

/* SUN */
.sun-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}
.sun-wrap svg {
  width: 100%;
  height: 100%;
}
.tip {
  position: absolute;
  background: var(--alma-text);
  color: var(--alma-cream);
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
  z-index: 10;
}
.tip.on { opacity: 1; }
.sun-sub {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--alma-sage);
  white-space: nowrap;
}
[data-tip] { cursor: pointer; }
.ray-lock { cursor: default !important; }
.ray-done:hover, .dot-done:hover {
  filter: drop-shadow(0 0 5px rgba(255,215,0,.6));
  opacity: 1 !important;
  stroke-width: 4 !important;
}

/* CARDS */
.card {
  background: #FFFFFF;
  border-radius: 16px;
  margin: 28px 0 14px;
  border: .5px solid rgba(178,172,136,.25);
  overflow: hidden;
}
.card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(180deg, #FFF8F3, #FFF);
}
.card-visual img {
  width: 180px;
  height: auto;
  border-radius: 6px;
}
.card-body { padding: 16px 20px; }
.card-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tag {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--alma-peach);
  font-weight: 600;
}
.date {
  font-size: 11px;
  color: var(--alma-sage);
}
.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 6px;
}
.card-desc {
  font-size: 13px;
  opacity: .7;
  margin-bottom: 14px;
  line-height: 1.55;
}

/* BUTTONS */
.btn {
  width: 100%;
  background: var(--alma-peach);
  color: #FFF;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .05em;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background .2s;
}
.btn:hover { background: var(--alma-peach-dark); }

/* YESTERDAY */
.yesterday {
  background: rgba(255,255,255,.6);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.yesterday:hover { background: rgba(255,255,255,.9); }
.yesterday-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.yesterday .lab {
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--alma-sage);
  margin-bottom: 3px;
}
.yesterday .txt {
  font-size: 13px;
  opacity: .85;
}
.yesterday .arr {
  color: var(--alma-peach);
  font-size: 20px;
}

/* QUOTE */
.quote {
  text-align: center;
  padding: 14px 12px 6px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--alma-sage);
  line-height: 1.5;
}

/* NAV */
.nav {
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 390px;
  width: 100%;
  background: var(--alma-cream);
  border-top: .5px solid rgba(178,172,136,.25);
  z-index: 100;
}
.nav-i {
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.nav-i.on { color: var(--alma-peach); }
.nav-i.off { color: var(--alma-sage); opacity: .5; }
.nav-i:hover { opacity: 1; }
.nav-i .ic {
  font-family: serif;
  font-size: 16px;
}
.nav-i .lb {
  font-size: 10px;
  margin-top: 3px;
  letter-spacing: .05em;
}

/* DAY CONTENT PAGE */
.hero {
  text-align: center;
  padding: 20px 24px;
  background: linear-gradient(180deg, var(--alma-cream) 0%, var(--alma-cream-warm) 100%);
}
.hero img.mirror {
  width: 200px;
  height: auto;
  margin-bottom: 14px;
  border-radius: 8px;
}
.hero .jour {
  font-size: 10px;
  letter-spacing: .4em;
  color: var(--alma-sage);
  margin-bottom: 10px;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.hero .phrase {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: #9C8E78;
  line-height: 1.5;
}
.hero .science {
  font-size: 10px;
  color: var(--alma-sage);
  margin-top: 12px;
  letter-spacing: .05em;
}

.bloc {
  padding: 20px 24px;
  border-bottom: .5px solid rgba(178,172,136,.12);
}
.bloc:last-child { border-bottom: none; }
.bloc-label {
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--alma-peach);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.bloc h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
}
.bloc p {
  font-size: 13.5px;
  line-height: 1.7;
  opacity: .85;
  margin-bottom: 10px;
}
.bloc p:last-child { margin-bottom: 0; }
.bloc strong { font-weight: 600; }
.bloc em { font-style: italic; }
.highlight {
  background: linear-gradient(180deg, transparent 60%, rgba(255,158,128,.15) 60%);
  padding: 0 2px;
}

/* SI/ALORS */
.si-alors-display {
  background: rgba(255,255,255,.8);
  border-radius: 14px;
  padding: 18px;
  margin: 8px 0;
}
.sa-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}
.sa-row:last-child { margin-bottom: 0; }
.b-si, .b-al {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  margin-right: 10px;
  flex-shrink: 0;
  letter-spacing: .1em;
  margin-top: 2px;
}
.b-si { background: var(--alma-peach); }
.b-al { background: var(--alma-sage); }
.sa-text {
  font-size: 13px;
  line-height: 1.5;
}

/* CARNET BOX */
.carnet-box {
  background: rgba(255,255,255,.6);
  border-radius: 14px;
  padding: 18px;
  margin: 12px 0;
  border: 1px dashed rgba(178,172,136,.3);
}
.carnet-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}
.carnet-row:last-child { margin-bottom: 0; }
.c-input {
  flex: 1;
  border: 1px solid rgba(178,172,136,.25);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--alma-text);
  background: rgba(255,255,255,.7);
  resize: none;
  min-height: 40px;
  font-weight: 400;
}
.c-input:focus {
  outline: none;
  border-color: var(--alma-peach);
}
.c-input::placeholder {
  color: var(--alma-sage);
  font-style: italic;
}

textarea.journal {
  width: 100%;
  border: 1px solid rgba(178,172,136,.25);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  min-height: 90px;
  resize: vertical;
  background: rgba(255,255,255,.5);
  color: var(--alma-text);
  margin-top: 10px;
}
textarea.journal:focus {
  outline: none;
  border-color: var(--alma-peach);
}
textarea.journal::placeholder {
  color: var(--alma-sage);
  font-style: italic;
}

/* MEDITATION */
.med-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--alma-cream-warm), #FFF5EE);
  border: 1px solid rgba(178,172,136,.2);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 12px 0;
  cursor: pointer;
  transition: transform .2s;
}
.med-btn:hover { transform: scale(1.02); }
.play {
  width: 42px;
  height: 42px;
  background: var(--alma-peach);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.play:after {
  content: "";
  border-left: 14px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.med-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 500;
}
.med-dur {
  font-size: 11px;
  color: var(--alma-sage);
  margin-top: 2px;
}

/* BLOCS SPECIFIQUES */
.steps {
  background: rgba(255,255,255,.7);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 12px 0;
}
.steps li {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
  list-style: none;
  padding-left: 20px;
  position: relative;
}
.steps li:before {
  content: "🌿";
  position: absolute;
  left: 0;
  font-size: 11px;
}
.steps li:last-child { margin-bottom: 0; }
.story {
  background: rgba(178,172,136,.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 12px 0;
  border-left: 3px solid var(--alma-sage);
}
.story p {
  font-size: 13px;
  line-height: 1.65;
  font-style: italic;
  color: var(--alma-text-soft);
}
.science-box {
  background: rgba(255,215,0,.06);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
}
.science-box .lab {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--alma-sage);
  margin-bottom: 6px;
}
.science-box p {
  font-size: 12.5px;
  line-height: 1.6;
  color: #7A6E5F;
}

/* Subsection headers within blocs (Les 3 étapes, Mon histoire, etc.) */
.sub-h {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--alma-peach);
  margin: 18px 0 8px;
  letter-spacing: .02em;
}
.bloc .sub-h:first-child { margin-top: 4px; }

/* Story paragraphs (italic, styled) */
.story-para {
  background: rgba(178,172,136,.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
  border-left: 3px solid var(--alma-sage);
  font-size: 13px;
  line-height: 1.65;
  font-style: italic;
  color: var(--alma-text-soft);
}

/* BADGE SECTION */
.badge-section {
  text-align: center;
  padding: 28px 24px;
  background: linear-gradient(180deg, var(--alma-cream), var(--alma-cream-warm));
}
.badge-section svg {
  width: 160px;
  height: 160px;
  margin: 0 auto 14px;
  display: block;
}
.badge-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  margin-bottom: 4px;
}
.badge-science {
  font-size: 10px;
  color: var(--alma-sage);
  font-style: italic;
}

.btn-done {
  width: calc(100% - 48px);
  margin: 16px 24px 24px;
  background: var(--alma-peach);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .05em;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}
.btn-done:hover { background: var(--alma-peach-dark); }

/* CARNET */
.tabs {
  display: flex;
  padding: 12px 16px;
  gap: 8px;
  position: sticky;
  top: 53px;
  background: var(--alma-cream);
  z-index: 9;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
}
.tab.active {
  background: var(--alma-peach);
  color: #fff;
}
.tab.inactive {
  background: rgba(255,255,255,.6);
  color: var(--alma-sage);
  border-color: rgba(178,172,136,.2);
}
.tab.inactive:hover {
  background: rgba(255,255,255,.9);
  color: var(--alma-text);
}
.tab-content {
  display: none;
  padding: 8px 16px;
}
.tab-content.active { display: block; }

.sec-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  padding: 12px 0 4px;
}
.sec-sub {
  font-size: 12px;
  color: var(--alma-sage);
  font-style: italic;
  margin-bottom: 16px;
}

.entry {
  background: #FFF;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  border: .5px solid rgba(178,172,136,.12);
}
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.entry-day {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--alma-peach);
}
.entry-tech, .entry-date {
  font-size: 11px;
  color: var(--alma-sage);
}
.suc-text {
  font-size: 13px;
  line-height: 1.6;
  opacity: .85;
  padding: 10px 12px;
  background: rgba(255,215,0,.04);
  border-radius: 10px;
  border-left: 3px solid var(--alma-gold);
}

.stars-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin: 4px 16px 12px;
  background: linear-gradient(135deg, rgba(255,215,0,.06), rgba(255,158,128,.06));
  border-radius: 14px;
}
.stars-bar .dots {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.stars-bar .dot-on {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alma-gold);
}
.stars-bar .dot-off {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alma-sage-light);
  opacity: .4;
}
.stars-bar .info { flex: 1; }
.stars-bar .info .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 500;
}
.stars-bar .info .lab {
  font-size: 10px;
  color: var(--alma-sage);
}

.add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1.5px dashed rgba(178,172,136,.3);
  border-radius: 14px;
  background: transparent;
  color: var(--alma-sage);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 16px;
}
.add-btn:hover {
  border-color: var(--alma-peach);
  color: var(--alma-peach);
  background: rgba(255,158,128,.04);
}
.add-btn .plus {
  font-size: 18px;
  font-weight: 300;
}

.new-entry {
  background: #FFF;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  border: 1.5px solid var(--alma-peach);
  display: none;
}
.new-entry.open { display: block; }
.new-entry textarea {
  width: 100%;
  border: 1px solid rgba(178,172,136,.2);
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  min-height: 70px;
  resize: vertical;
  color: var(--alma-text);
}
.new-entry textarea:focus {
  outline: none;
  border-color: var(--alma-peach);
}
.new-entry textarea::placeholder {
  color: var(--alma-sage);
  font-style: italic;
}
.new-entry .save {
  margin-top: 10px;
  background: var(--alma-peach);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  float: right;
}

/* BADGES PAGE */
.progress {
  text-align: center;
  padding: 20px 24px 8px;
}
.progress h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 6px;
}
.progress .sub {
  font-size: 13px;
  color: var(--alma-sage);
  font-style: italic;
  margin-bottom: 14px;
}
.bar-wrap {
  width: 75%;
  height: 5px;
  background: var(--alma-sage-light);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}
.bar {
  height: 100%;
  background: linear-gradient(90deg, var(--alma-gold), var(--alma-peach));
  border-radius: 3px;
  transition: width .5s;
}

.sem-header {
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--alma-sage);
  font-weight: 600;
  text-transform: uppercase;
  padding: 18px 20px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sem-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 12px;
}
.badge-card {
  background: #FFF;
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  position: relative;
  border: .5px solid rgba(178,172,136,.1);
  cursor: pointer;
  transition: transform .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.badge-card:hover { transform: scale(1.04); }
.badge-mini {
  width: 68px;
  height: 68px;
  margin: 0 auto 6px;
  display: block;
}
.b-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.b-day {
  font-size: 9px;
  color: var(--alma-sage);
  margin-top: 2px;
}
.lock {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 9px;
  opacity: .35;
}

/* AUTH PAGE */
.auth-page {
  padding: 40px 24px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-page h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 8px;
}
.auth-page .tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--alma-sage);
  margin-bottom: 32px;
}
.auth-form {
  background: #FFF;
  border-radius: 16px;
  padding: 24px;
  border: .5px solid rgba(178,172,136,.2);
}
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(178,172,136,.3);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--alma-peach);
}
.auth-msg {
  margin-top: 16px;
  font-size: 13px;
  padding: 12px;
  border-radius: 8px;
  display: none;
}
.auth-msg.success {
  background: rgba(82, 183, 136, .1);
  color: #2D6A4F;
  display: block;
}
.auth-msg.error {
  background: rgba(255, 158, 128, .1);
  color: var(--alma-peach-dark);
  display: block;
}

/* MOBILE PADDING for content */
.has-nav { padding-bottom: 80px; }
