/* Page « Mon cycle » lunaire (v235) — limitée à #screen-cycle.lunar-cycle */
#screen-cycle.lunar-cycle{--lunar-serif:'Fraunces',Didot,"Bodoni 72",Georgia,serif;--lc-serif:'Fraunces',Didot,"Bodoni 72",Georgia,serif;background:radial-gradient(ellipse 120% 60% at 50% 0%,#fef4ea 0%,#fbf0e4 45%,#f6e9d9 100%) fixed,#f8ede1}
#screen-cycle.lunar-cycle>header,#screen-cycle.lunar-cycle>.page-chrome,#screen-cycle.lunar-cycle>main{display:none!important}
.lc{position:relative;padding:0 14px calc(78px + env(safe-area-inset-bottom,0px));min-height:100%}
.lc:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.55;background-image:radial-gradient(1.4px 1.4px at 12% 18%,#c99a6b 50%,transparent 51%),radial-gradient(1px 1px at 78% 9%,#c99a6b 50%,transparent 51%),radial-gradient(1.2px 1.2px at 64% 34%,#d6ae86 50%,transparent 51%),radial-gradient(1px 1px at 27% 52%,#d6ae86 50%,transparent 51%),radial-gradient(1.4px 1.4px at 88% 61%,#c99a6b 50%,transparent 51%),radial-gradient(1px 1px at 41% 83%,#d6ae86 50%,transparent 51%),radial-gradient(1.2px 1.2px at 6% 74%,#c99a6b 50%,transparent 51%)}

/* Barre du haut et jours de la semaine, collées en haut pendant le défilement */
.lc-top{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;margin:0 -14px;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 8px;background:#fcf2e8}
.lc-pill{flex:0 0 auto;border:0;border-radius:999px;padding:9px 13px;background:#f3e2d4;color:#9b4d35;font:600 12px/1 var(--sans);cursor:pointer}
.lc-title{flex:1;text-align:center;min-width:0}
.lc-title h1{margin:0;font:400 clamp(22px,6.4vw,26px)/1.1 var(--lc-serif)!important;letter-spacing:-.01em;color:#2f1a14}
.lc-title p{margin:3px 0 0;font:400 12px/1.3 var(--sans);color:#8a6a5a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lc-add{flex:0 0 40px;width:40px;height:40px;border:0;border-radius:50%;background:#b46a54;color:#fff8f1;font:400 24px/1 var(--sans);cursor:pointer;box-shadow:0 6px 14px #8d43302b}
.lc-weekdays{position:sticky;top:0;z-index:4;display:grid;grid-template-columns:repeat(7,1fr);margin:0 -14px;padding:6px 14px 8px;background:#fcf2e8f2;border-bottom:1px solid #ecdccd;font:600 11px/1 var(--sans);letter-spacing:.08em;color:#a08676;text-align:center}

/* Mois */
.lc-month{position:relative;padding:16px 0 6px;scroll-margin-top:34px}
.lc-month h3{margin:4px 2px 12px;font:400 clamp(24px,7vw,30px)/1 var(--lc-serif);color:#5d4136;letter-spacing:-.01em}
.lc-month h3 span{font-size:.6em;color:#a08676}
.lc-month.is-now h3{color:#b46a54}
.lc-grid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:6px}
.lc-day{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;height:58px;padding:6px 0 0;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent;color:#3a2119}
.lc-day i{position:relative;z-index:1;display:block;width:19px;height:19px}
.lc-day i svg{width:100%;height:100%;display:block}
.lc-day b{position:relative;z-index:1;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;font:500 14px/1 var(--sans)}
.lc-day.is-future b{color:#a08f84}
.lc-day em{z-index:1;position:absolute;bottom:1px;left:50%;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#b46a54}
/* bandes continues : règles, prévues, fertile, ovulation, retard */
.lc-day[class*=" b-"]:before{content:"";position:absolute;left:0;right:0;top:3px;bottom:3px;z-index:0}
.lc-day.b-start:before{left:3px;border-top-left-radius:18px;border-bottom-left-radius:18px}
.lc-day.b-end:before{right:3px;border-top-right-radius:18px;border-bottom-right-radius:18px}
.lc-day.b-period:before{background:#f2c7bb}
.lc-day.b-estimate:before{background:repeating-linear-gradient(135deg,#f7dcd3 0 6px,#fbe9e3 6px 12px)}
.lc-day.b-fertile:before{background:#e3ead6}
.lc-day.b-ovul:before{background:#cfdcbd}
.lc-day.b-late:before{background:#e9e1d9}
.lc-day.b-period b{color:#7a2f1f}
.lc-day.is-today b{background:#b46a54;color:#fff8f1;box-shadow:0 0 0 3px #fbf1e6,0 0 14px 3px #f1c99d}
.lc-day.is-selected b{box-shadow:0 0 0 2px #9b4d35}
.lc-day.is-today.is-selected b{box-shadow:0 0 0 3px #fbf1e6,0 0 0 5px #9b4d35}
.lc-day:active b{transform:scale(.92)}

.lc-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;margin:18px 0 4px;font:500 11.5px/1 var(--sans);color:#7d5a4a}
.lc-legend span{display:inline-flex;align-items:center;gap:6px}
.lc-legend i{width:16px;height:10px;border-radius:6px}
.lc-legend .period{background:#f2c7bb}.lc-legend .estimate{background:repeating-linear-gradient(135deg,#f7dcd3 0 3px,#fbe9e3 3px 6px)}.lc-legend .fertile{background:#e3ead6}.lc-legend .ovul{background:#cfdcbd}
.lc-note{margin:8px auto 0;max-width:320px;text-align:center;font-size:10.5px;line-height:1.45;color:#a08676}
.lc-history{margin-top:18px}

/* Fiche d'un jour (monte du bas) */
.lc-sheet-backdrop{position:fixed;inset:0;z-index:90;background:#2a160e00;transition:background .25s}
.lc-sheet{position:fixed;left:0;right:0;bottom:0;z-index:91;max-width:520px;margin:0 auto;max-height:86vh;overflow:auto;padding:10px 20px calc(22px + env(safe-area-inset-bottom,0px));border-radius:26px 26px 0 0;background:radial-gradient(ellipse 120% 70% at 80% 0%,#f8e3d4 0%,#fcf3ea 45%,#fdf7f0 100%);box-shadow:0 -12px 34px #4a24162b;transform:translateY(105%);transition:transform .28s cubic-bezier(.3,.7,.3,1)}
body.lc-sheet-open .lc-sheet{transform:none}
body.lc-sheet-open .lc-sheet-backdrop{background:#2a160e40}
.lc-sheet-handle{width:42px;height:4px;margin:0 auto 10px;border-radius:3px;background:#dcc4b2}
.lc-sheet-close{position:absolute;top:12px;right:14px;width:34px;height:34px;border:0;border-radius:50%;background:#f3e2d4;color:#7d4a3a;font:400 22px/1 var(--sans);cursor:pointer}
.lc-sheet-head{display:flex;align-items:center;gap:14px;padding-right:40px}
.lc-sheet-moon{flex:0 0 46px;width:46px;height:46px;filter:drop-shadow(0 0 10px #f6dcc0)}
.lc-sheet-moon svg{width:100%;height:100%}
.lc-sheet-head h2{margin:0;font:400 21px/1.15 Fraunces,Georgia,serif;color:#2f1a14}
.lc-sheet-head p{margin:4px 0 0;font:500 12.5px/1.4 var(--sans);color:#8a4a36}
.lc-sheet-head p span{font-weight:400;color:#8a6a5a}
.lc-sheet-future{margin:18px 0 6px;padding:14px;border-radius:16px;background:#f3e6da;font-size:13px;line-height:1.5;color:#6b5146}
.lc-period-btn{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;margin:18px 0 6px;padding:14px;border:0;border-radius:999px;background:#c9614d;color:#fff8f1;font:600 14px/1 var(--sans);cursor:pointer;box-shadow:0 8px 18px #a1442f33}
.lc-period-btn span{font-size:11px}
.lc-period-btn.is-on{background:#f6dcd3;color:#9b4d35;box-shadow:none}
.lc-feelings{display:grid;gap:4px;margin-top:12px}
.lc-feel{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #f0e0d2}
.lc-feel:last-child{border-bottom:0}
.lc-feel-label{display:flex;flex-direction:column;gap:2px;min-width:78px;font:600 13px/1.1 var(--sans);color:#4a2b21}
.lc-feel-label small{font:500 11px/1.1 var(--sans);color:#a2553d;min-height:12px}
.lc-feel-moons{display:flex;gap:6px}
.lc-feel-moons button{width:clamp(34px,9.6vw,40px);height:clamp(34px,9.6vw,40px);padding:4px;border:0;border-radius:50%;background:none;cursor:pointer;transition:transform .15s,box-shadow .2s}
.lc-feel-moons button svg{width:100%;height:100%;display:block}
.lc-feel-moons button:active{transform:scale(.88)}
.lc-feel-moons button.is-on{box-shadow:0 0 0 2px #c99a6b,0 0 12px 2px #f6d9b4;background:#fffaf3}
.lc-more{display:block;width:100%;margin:14px 0 0;padding:10px;border:0;background:none;color:#a2553d;font:500 12.5px/1.3 var(--sans);cursor:pointer}
@media (prefers-reduced-motion:reduce){.lc-sheet{transition:none}}

/* l'en-tête collé a besoin que le conteneur de l'app ne soit pas une zone de défilement (overflow:clip coupe pareil sans casser position:sticky) */
#app:has(#screen-cycle.active.lunar-cycle){overflow:clip}

/* Haut identique à l'accueil */
#screen-cycle.lunar-cycle .lc-head{margin:0 -14px;padding:calc(14px + env(safe-area-inset-top,0px)) 14px 10px}
#screen-cycle.lunar-cycle .lc-head .lunar-top-icon{color:#c08a4e}
#screen-cycle.lunar-cycle .lc-head .lunar-top-icon svg{stroke-width:1.8}
.lc-day.is-picked b{box-shadow:0 0 0 1.5px #c08a4e}
.lc-day.is-today.is-picked b{box-shadow:0 0 0 3px #fbf1e6,0 0 14px 3px #f1c99d}
.lc-history{margin-top:12px}
.lc-history .cycle-history{margin-bottom:0}

/* + flottant, toujours à portée de pouce */
.lc-fab{position:fixed;right:18px;bottom:calc(92px + env(safe-area-inset-bottom,0px));z-index:40;width:56px;height:56px;border:0;border-radius:50%;background:#b46a54;color:#fff8f1;display:grid;place-items:center;cursor:pointer;box-shadow:0 10px 24px #4a241640,0 0 0 4px #fbf1e655}
.lc-fab svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.lc-fab:active{transform:scale(.94)}
#screen-cycle:not(.active) .lc-fab{display:none}
#screen-cycle.lunar-cycle .lc-head{padding-bottom:4px}

/* Thème nuit étoilée (comme l'accueil et le Refuge) */
#screen-cycle.lunar-cycle.is-night{background:radial-gradient(ellipse 130% 60% at 50% 0%,#5a2d36 0%,#3b1c27 38%,#26131c 100%) fixed,#26131c}
#screen-cycle.is-night .lc:before{opacity:.9;background-image:radial-gradient(1.4px 1.4px at 12% 18%,#f6dcc0 50%,transparent 51%),radial-gradient(1px 1px at 78% 9%,#f6dcc0 50%,transparent 51%),radial-gradient(1.2px 1.2px at 64% 34%,#f1c99d 50%,transparent 51%),radial-gradient(1px 1px at 27% 52%,#f6dcc0 50%,transparent 51%),radial-gradient(1.4px 1.4px at 88% 61%,#f1c99d 50%,transparent 51%),radial-gradient(1px 1px at 41% 83%,#f6dcc0 50%,transparent 51%),radial-gradient(1.2px 1.2px at 6% 74%,#f1c99d 50%,transparent 51%),radial-gradient(1px 1px at 52% 6%,#f6dcc0 50%,transparent 51%),radial-gradient(1.3px 1.3px at 93% 28%,#f6dcc0 50%,transparent 51%),radial-gradient(1px 1px at 18% 92%,#f1c99d 50%,transparent 51%)}
#screen-cycle.is-night .lc-head .lunar-top-icon{color:#e8b99a}
#screen-cycle.is-night .lunar-dates button{color:#a98a7f}
#screen-cycle.is-night .lunar-dates button.is-active{color:#fff3e6}
#screen-cycle.is-night .lunar-dates button.is-active:after{background:#e8b99a}
#screen-cycle.is-night .lc-weekdays{background:#2f1820f2;border-bottom-color:#ffffff1a;color:#c9a99b}
#screen-cycle.is-night .lc-month h3{color:#f1d9c8}
#screen-cycle.is-night .lc-month h3 span{color:#c9a99b}
#screen-cycle.is-night .lc-month.is-now h3{color:#f2a58c}
#screen-cycle.is-night .lc-day{color:#fbefe3}
#screen-cycle.is-night .lc-day.is-future b{color:#b39a8f}
#screen-cycle.is-night .lc-day.b-period:before{background:#c9614d66}
#screen-cycle.is-night .lc-day.b-period b{color:#fff3e6}
#screen-cycle.is-night .lc-day.b-estimate:before{background:repeating-linear-gradient(135deg,#c9614d40 0 6px,#c9614d1f 6px 12px)}
#screen-cycle.is-night .lc-day.b-fertile:before{background:#9caf8033}
#screen-cycle.is-night .lc-day.b-ovul:before{background:#6f845666}
#screen-cycle.is-night .lc-day.b-late:before{background:#ffffff14}
#screen-cycle.is-night .lc-day.is-today b{box-shadow:0 0 0 3px #2c1620,0 0 16px 4px #f1c99d77}
#screen-cycle.is-night .lc-day.is-picked b{box-shadow:0 0 0 1.5px #e8b99a}
#screen-cycle.is-night .lc-day em{background:#f2a58c}
#screen-cycle.is-night .lc-legend{color:#e9cbb8}
#screen-cycle.is-night .lc-legend .period{background:#c9614d88}#screen-cycle.is-night .lc-legend .estimate{background:repeating-linear-gradient(135deg,#c9614d55 0 3px,#c9614d22 3px 6px)}#screen-cycle.is-night .lc-legend .fertile{background:#9caf8055}#screen-cycle.is-night .lc-legend .ovul{background:#6f845699}
#screen-cycle.is-night .lc-note{color:#c9a99b}
#screen-cycle.is-night .lc-history *{color:#f1d9c8}
#screen-cycle.is-night .lc-history h2,#screen-cycle.is-night .lc-history h3,#screen-cycle.is-night .lc-history strong{color:#fff3e6!important}
#screen-cycle.is-night .lc-history section,#screen-cycle.is-night .lc-history .cycle-history{background:#ffffff10!important;box-shadow:0 0 0 1px #ffffff1c!important;border-color:#ffffff1c!important}
#screen-cycle.is-night .lc-fab{box-shadow:0 10px 24px #00000055,0 0 0 4px #ffffff14}

/* Barre du haut : ← · Mois / Année · +, collée en haut avec les jours de la semaine */
#screen-cycle .lc-sticky{position:sticky;top:var(--sat,0px);z-index:6;margin:0 -14px;background:#fcf2e8}
#screen-cycle.is-night .lc-sticky{background:#2f1820f2;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
#screen-cycle .lc-sticky .lc-weekdays{position:static!important;margin:0;top:auto!important}
.lc-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(10px + var(--sat,0px)) 14px 10px}
#screen-cycle .lc-sticky .lc-bar{padding-top:10px}
.lc-bar-icon{flex:0 0 42px;width:42px;height:42px;border:0;border-radius:50%;background:none;color:#c08a4e;display:grid;place-items:center;cursor:pointer}
.lc-bar-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lc-bar-plus{background:#b46a54;color:#fff8f1;box-shadow:0 6px 14px #8d43302b}
.lc-bar-plus svg{width:22px;height:22px;stroke-width:2}
.lc-seg{display:flex;padding:4px;border-radius:999px;background:#efe0d3}
.lc-seg button{min-width:96px;padding:9px 16px;border:0;border-radius:999px;background:none;color:#8a6a5a;font:600 13px/1 var(--sans);cursor:pointer;transition:background .2s,color .2s}
.lc-seg button.is-on{background:#fffaf3;color:#2f1a14;box-shadow:0 2px 6px #8a5b3d22}
#screen-cycle.is-night .lc-seg{background:#ffffff14}
#screen-cycle.is-night .lc-seg button{color:#c9a99b}
#screen-cycle.is-night .lc-seg button.is-on{background:#f3e2d4;color:#2c1620}
#screen-cycle.is-night .lc-bar-icon:not(.lc-bar-plus){color:#e8b99a}
#screen-cycle .lc-head,#screen-cycle .lc-fab{display:none!important}
#screen-cycle.lunar-cycle .lc-month{scroll-margin-top:0}

/* Vue Année */
.lc-year{padding:10px 0 6px}
.lc-year-head{display:flex;align-items:center;justify-content:center;gap:24px;margin:6px 0 14px}
.lc-year-head h3{margin:0;font:400 28px/1 var(--lc-serif);color:#5d4136}
.lc-year-head button{width:36px;height:36px;border:0;border-radius:50%;background:#f3e2d4;color:#9b4d35;font-size:20px;cursor:pointer}
.lc-year-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px 12px}
.lc-mini{display:flex;flex-direction:column;gap:7px;padding:8px 6px 10px;border:0;border-radius:14px;background:none;cursor:pointer;text-align:left}
.lc-mini b{font:400 15px/1 var(--lc-serif);color:#5d4136;padding-left:2px}
.lc-mini.is-now{background:#f3e2d4}
.lc-mini.is-now b{color:#b46a54}
.lc-mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.lc-mini-grid i{display:block;width:100%;aspect-ratio:1;border-radius:50%;background:#e6d6c8}
.lc-mini-grid i.lc-mini-blank{background:none}
.lc-mini-grid i.b-period{background:#c9614d}
.lc-mini-grid i.b-estimate{background:#e8a594}
.lc-mini-grid i.b-fertile{background:#b7c79e}
.lc-mini-grid i.b-ovul{background:#6f8456}
.lc-mini-grid i.b-late{background:#cdbfb3}
.lc-mini-grid i.is-today{box-shadow:0 0 0 1.5px #b46a54;background:#fffaf3}
#screen-cycle.is-night .lc-year-head h3,#screen-cycle.is-night .lc-mini b{color:#f1d9c8}
#screen-cycle.is-night .lc-year-head button{background:#ffffff14;color:#f2a58c}
#screen-cycle.is-night .lc-mini.is-now{background:#ffffff12}
#screen-cycle.is-night .lc-mini.is-now b{color:#f2a58c}
#screen-cycle.is-night .lc-mini-grid i{background:#ffffff1f}
#screen-cycle.is-night .lc-mini-grid i.lc-mini-blank{background:none}
#screen-cycle.is-night .lc-mini-grid i.b-period{background:#d9826f}
#screen-cycle.is-night .lc-mini-grid i.b-estimate{background:#c9614d88}
#screen-cycle.is-night .lc-mini-grid i.b-fertile{background:#9caf80aa}
#screen-cycle.is-night .lc-mini-grid i.b-ovul{background:#9fb886}
#screen-cycle.is-night .lc-mini-grid i.is-today{background:#fff3e6;box-shadow:0 0 6px 1px #f1c99d}

#screen-cycle .lc-weekdays[hidden],#screen-cycle .lc-year[hidden],#screen-cycle .lc-months[hidden]{display:none!important}
