/* Messages et Profil en nuit étoilée (v246) */
.night-page{--np-serif:'Fraunces',Didot,"Bodoni 72",Georgia,serif;position:relative;background:radial-gradient(ellipse 130% 60% at 50% 0%,#5a2d36 0%,#3b1c27 38%,#26131c 100%) fixed,#26131c!important;color:#fbefe3}
.night-page>.night-stars{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.night-page>.night-stars i{position:absolute;width:2px;height:2px;border-radius:50%;background:#f6dcc0;opacity:.45;animation:npTwinkle 3.6s ease-in-out infinite;animation-delay:var(--t)}
.night-page>.night-stars i.is-big{width:3px;height:3px;box-shadow:0 0 8px 2px #f1c99d66}
.night-page>.night-stars i.is-big:after{content:"✦";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:9px;color:#f1c99d}
@keyframes npTwinkle{0%,100%{opacity:.15}50%{opacity:.85}}
.night-page>header,.night-page>main{position:relative;z-index:1}

/* En-tête : plus de photo, titre en Fraunces sur le ciel */
.night-page .page-photo{display:none!important}
.night-page .page-chrome{background:none!important}
.night-page .page-head-panel{background:none!important;margin-top:0!important;padding-top:calc(22px + env(safe-area-inset-top,0px))!important;box-shadow:none!important}
.night-page .page-head-panel svg[class*="wave"],.night-page .page-photo-waves{display:none!important}
.night-page .greeting{font-family:var(--np-serif)!important;font-weight:400!important;color:#fff3e6!important;letter-spacing:-.01em!important}
.night-page .sub-greeting{color:#d9b8a6!important}
.night-page .icon-btn{background:#ffffff12!important;color:#f1d0b8!important;box-shadow:0 0 0 1px #ffffff1c!important}
.night-page .page{background:none!important}

/* Titres et textes */
.night-page h2,.night-page h3,.night-page h4,.night-page strong{color:#fff3e6!important}
.night-page h2{font-family:var(--np-serif)!important;font-weight:400!important}
.night-page p,.night-page span,.night-page small,.night-page label,.night-page li,.night-page .q-note{color:#f1d9c8}
.night-page .link-btn{color:#f2a58c!important}

/* Cartes en verre fumé chaud */
.night-page .card,.night-page .subscription-card,.night-page .profile-hero,.night-page .checkin,.night-page .profile-menu,.night-page .whatsapp-card,.night-page .notice,.night-page .option,.night-page .message-row{background:#ffffff10!important;box-shadow:0 0 0 1px #ffffff1c!important;border-color:#ffffff1c!important;color:#fbefe3!important}
.night-page .message-row+.message-row{border-top:1px solid #ffffff14!important}
.night-page .chip{background:#ffffff12!important;color:#f6dcc9!important;border-color:#ffffff24!important}
.night-page .chip.active,.night-page .chip[aria-pressed="true"]{background:#e8b99a!important;color:#2c1620!important}
.night-page .menu-icon{background:#ffffff14!important;color:#f1c99d!important}
.night-page .arrow{color:#e8b99a!important}
.night-page .avatar{box-shadow:0 0 0 2px #f1c99d88,0 0 18px #f1c99d33!important}
.night-page .btn:not(.btn-primary){background:#ffffff14!important;color:#f6dcc9!important;box-shadow:0 0 0 1px #ffffff26!important}
.night-page input,.night-page textarea,.night-page select{background:#ffffff12!important;color:#fbefe3!important;border-color:#ffffff26!important}
@media (prefers-reduced-motion:reduce){.night-page>.night-stars i{animation:none}}
.night-page{min-height:100vh;min-height:100dvh}
.night-page summary,.night-page legend,.night-page dt,.night-page dd,.night-page .option-copy,.night-page .option-copy *{color:#f1d9c8!important}
.night-page summary{font-weight:600}

/* ── Profil : menu, compte connecté, boutons ── */
.night-page .profile-menu{background:#ffffff0d!important}
.night-page .profile-menu button{color:#f6dcc9!important;background:none!important;border-color:#ffffff14!important}
.night-page .profile-menu button:last-child{border-bottom:0!important}
.night-page .profile-menu .menu-icon img{filter:none}
.night-page>section{background:#ffffff10!important;box-shadow:0 0 0 1px #ffffff1c!important;border-color:#ffffff1c!important;color:#fbefe3!important;margin:12px 18px 0!important;border-radius:20px!important}
.night-page>section p,.night-page>section span{color:#f1d9c8!important}
.night-page>section strong{color:#fff3e6!important}
.night-page .btn-secondary,.night-page>section .btn,.night-page>section button{background:#ffffff12!important;color:#f6dcc9!important;border:1px solid #ffffff2e!important;box-shadow:none!important}
.night-page .btn-primary{background:#b46a54!important;color:#fff8f1!important;border:0!important}
.night-page .whatsapp-btn{background:#6f8456!important;color:#fff8f1!important}
.night-page .subscription-card *,.night-page .profile-hero *{color:inherit}
.night-page .subscription-card,.night-page .profile-hero{color:#f1d9c8!important}
.night-page .checkin-title{color:#fff3e6!important}
.night-page select option{background:#2c1620;color:#fbefe3}

/* ── Messages : plus d'ombre en double, notifications lisibles ── */
.night-page .card{box-shadow:none!important;background:none!important;padding:0!important}
.night-page .message-row{border-radius:18px!important;margin-bottom:10px!important;box-shadow:0 0 0 1px #ffffff1c!important;background:#ffffff10!important}
.night-page .message-row+.message-row{border-top:0!important}
.night-page .message-top *,.night-page .message-copy *{color:#f1d9c8!important}
.night-page .message-top strong,.night-page .message-copy strong,.night-page .message-top b{color:#fff3e6!important}
.night-page .message-thumb{box-shadow:none!important}

/* ── Fond de l'app et barre du bas en nuit, textes clairs ── */
html.revnchi-night,html.revnchi-night body,html.revnchi-night #app{background:#26131c!important}
html.revnchi-night .bottom-nav{background:#2a1520f2!important;border-top:1px solid #ffffff14!important;box-shadow:0 -10px 24px #00000033!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
html.revnchi-night .bottom-nav button,html.revnchi-night .bottom-nav button *:not(.nav-badge){color:#c9a99b!important}
html.revnchi-night .bottom-nav button.active,html.revnchi-night .bottom-nav button.active *:not(.nav-badge){color:#fff3e6!important}

/* ── Marges du bas réduites partout (l'app garde déjà la place de la barre du bas) ── */
html.revnchi-night #screen-home.lunar-home .home-panel{padding-bottom:18px!important}
html.revnchi-night #screen-cycle .lc{padding-bottom:16px!important}
html.revnchi-night #screen-journey .rf{padding-bottom:16px!important}
html.revnchi-night .night-page>main.page{padding-bottom:12px!important}
html.revnchi-night .night-page>section:last-child{margin-bottom:14px!important}
/* les pages pas encore passées en nuit (Explorer, contenus, connexion, questionnaire…) gardent leur fond crème */
html.revnchi-night .screen{background-color:#fbf4ec;min-height:100vh;min-height:100dvh}
.night-page .card{border:0!important;outline:0!important}

/* ── Zone de sécurité (encoche, Dynamic Island, barre d'état) en plein écran ──
   Une seule variable pour la hauteur de l'encoche, appliquée fermement en haut de chaque page
   (des règles anciennes forçaient un petit padding qui annulait l'encoche). */
:root{--sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px)}
#screen-home.lunar-home .home-panel{padding-top:calc(12px + var(--sat))!important}
#screen-cycle.lunar-cycle .lc-head{padding-top:calc(12px + var(--sat))!important}
#screen-cycle.lunar-cycle .lc-weekdays{top:var(--sat)!important}
/* bande fixe sous l'encoche : le calendrier qui défile ne passe pas sous l'heure et la caméra */
#screen-cycle.lunar-cycle.active:before{content:"";position:fixed;left:0;right:0;top:0;height:var(--sat);z-index:6;background:#fcf2e8;pointer-events:none}
#screen-cycle.lunar-cycle.is-night.active:before{background:#2f1820}
#screen-cycle.lunar-cycle .lc-month{scroll-margin-top:calc(34px + var(--sat))}
#screen-journey.refuge .rf{padding-top:calc(18px + var(--sat))!important}
.night-page .page-head-panel{padding-top:calc(22px + var(--sat))!important}
.lunar-banner{top:calc(10px + var(--sat))!important}
.lc-sheet{max-height:calc(100dvh - var(--sat) - 20px)!important}
.rf-moment-close{top:calc(14px + var(--sat))!important}
#screen-cycle.lunar-cycle .lc{padding-top:var(--sat,0px)!important}
