/* ============================================================
   App modèle — habillage « noir & or »
   Mise en page : une colonne téléphone, titres en serif éditoriale,
   or brossé réservé aux chiffres clés et aux actions.
   ============================================================ */
.lux {
  /* Polices arrondies : Quicksand (titres, chiffres) + Nunito (texte) */
  --serif: "Quicksand", "Nunito", "SF Pro Rounded", ui-rounded, -apple-system, sans-serif;
  --sans: "Nunito", "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gold-grad: linear-gradient(110deg, #9c7a2c 0%, #e9d18c 28%, #c9a24a 50%, #f6e7b4 72%, #a8842f 100%);
  --card: linear-gradient(180deg, #15130f 0%, #0f0e0b 100%);
  --hair: rgba(201, 162, 74, .22);
  font-family: var(--sans);
  letter-spacing: .005em;
}
.lux, .lux body { background: radial-gradient(120% 60% at 50% -10%, #1d170c 0%, var(--bg) 55%) fixed, var(--bg); }

/* ---------- En-tête ---------- */
.lux .m-head { background: rgba(10, 9, 8, .9); border-bottom: 1px solid var(--hair);
  padding-top: calc(env(safe-area-inset-top, 0px) + 26px); padding-bottom: 16px; }
.lux .m-date { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #e2c57a; line-height: 1.4; }
.lux #hello { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; margin-top: 6px; letter-spacing: .01em; }
.lux #hello em { font-style: normal; font-weight: 700; background: var(--gold-grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite; }

/* ---------- Titres de section ---------- */
.lux .sec { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.lux .sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair), transparent); }
.lux .sec .count { color: var(--accent); }

/* ---------- Cartes ---------- */
.lux .card { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

/* ---------- Chiffre du jour ---------- */
.lux .hero { padding: 26px 0 8px; position: relative; }
.lux .hero::before { content: ""; position: absolute; left: 50%; top: 18px; width: 170px; height: 170px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201, 162, 74, .18), transparent 65%); pointer-events: none; animation: glow 4s ease-in-out infinite; }
.lux .hero-n { position: relative; font-family: var(--serif); font-weight: 600; font-size: 92px; line-height: .95; letter-spacing: -.02em;
  background: var(--gold-grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite; font-variant-numeric: lining-nums tabular-nums; }
.lux .hero-n.done { font-size: 72px; }
.lux .hero-t { font-family: var(--serif); font-weight: 600; font-size: 20px; margin-top: 10px; }
.lux .hero p { color: var(--muted); }

/* ---------- To-do ---------- */
.lux .todo-item { font-weight: 600; background: var(--card); border: 1px solid var(--hair); border-radius: 18px; padding: 16px; font-size: 15.5px;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1), border-color .2s; }
.lux .todo-item:hover { border-color: rgba(201, 162, 74, .45); }
.lux .todo-item .box { width: 26px; height: 26px; border: 1.5px solid var(--accent); color: transparent; position: relative; }
.lux .todo-item.leaving { opacity: 0; transform: translateX(40px) scale(.98); }
.lux .todo-item.leaving .box, .lux .todo-item.done .box { background: var(--gold-grad); border-color: transparent; color: var(--gold-ink); }
.lux .todo-item.leaving .box::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent2); animation: ring .5s ease-out forwards; }
.lux .linkbtn { color: var(--accent); text-decoration: none; letter-spacing: .04em; }

/* ---------- Comptes / compteurs ---------- */
.lux .acc-count { font-family: var(--serif); font-size: 28px; font-weight: 700; line-height: 1; }
.lux .acc-ok { border-color: rgba(201, 162, 74, .55); }
.lux .acc-ok .acc-count { color: transparent; background: var(--gold-grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; animation: shimmer 5s linear infinite; }
.lux .acc-count.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
.lux .bar { height: 4px; background: #24201a; }
.lux .bar > i { background: var(--gold-grad); background-size: 200% auto; animation: shimmer 4s linear infinite; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.lux .bar.done > i { background: var(--gold-grad); background-size: 200% auto; }

/* ---------- Boutons ---------- */
.lux .btn { border-radius: 14px; letter-spacing: .02em; transition: transform .15s ease, filter .2s, box-shadow .2s; }
.lux .btn:active { transform: scale(.97); }
.lux .btn.primary { position: relative; overflow: hidden; background: var(--gold-grad); background-size: 160% auto; color: var(--gold-ink);
  box-shadow: 0 8px 24px rgba(201, 162, 74, .22), inset 0 1px 0 rgba(255, 255, 255, .35); font-weight: 700; }
.lux .btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: sheen 4.5s ease-in-out infinite; }
.lux .btn.undo { background: transparent; border: 1px solid var(--hair); color: var(--muted); }
.lux .btn:not(.primary):not(.undo) { background: #1a1813; border: 1px solid var(--hair); }

/* ---------- Bloc « vidéos à tourner » ---------- */
.lux .cta { border-color: rgba(201, 162, 74, .4); }
.lux .cta .cta-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--gold-ink); flex-shrink: 0; }
.lux .cta .cta-ic svg { width: 20px; height: 20px; }

/* ---------- Pastilles ---------- */
.lux .pill { background: #1d1a14; border: 1px solid var(--hair); color: var(--text); font-weight: 600; letter-spacing: .02em; }
.lux .pill.late, .lux .pill.redo { background: rgba(224, 112, 95, .12); border-color: rgba(224, 112, 95, .4); color: #f0a093; }
.lux .pill.submitted { background: rgba(201, 162, 74, .12); color: var(--accent2); }
.lux .pill.approved { background: rgba(140, 201, 160, .12); border-color: rgba(140, 201, 160, .35); color: var(--ok); }
.lux .fix { background: rgba(224, 112, 95, .1); border: 1px solid rgba(224, 112, 95, .3); color: #f3b3a8; border-radius: 12px; }

/* ---------- Idées ---------- */
.lux .seg-m { background: #100f0c; border-color: var(--hair); border-radius: 14px; }
.lux .seg-m button { letter-spacing: .03em; }
.lux .seg-m button.on { background: var(--gold-grad); color: var(--gold-ink); }
.lux .slide-card { background: var(--card); border-color: var(--hair); border-radius: 22px; }
.lux .slide-info b { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.25; }
.lux .note { color: var(--accent2); font-size: 13px; }
.lux .linkcard { background: radial-gradient(80% 60% at 50% 40%, #2a2214, #0d0c0a); color: var(--accent2); font-family: var(--serif); font-size: 20px; }
.lux .linkcard::before { content: ""; width: 54px; height: 54px; margin-right: 12px; border-radius: 50%; border: 1px solid var(--accent);
  background: no-repeat center/18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f0dc9c'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E"); }
.lux .round { width: 64px; height: 64px; transition: transform .15s; }
.lux .round:active { transform: scale(.9); }
.lux .round.nope { background: transparent; border: 1.5px solid rgba(224, 112, 95, .7); color: var(--bad); }
.lux .round.like { box-shadow: 0 10px 28px rgba(201, 162, 74, .35); }
.lux .stamp { font-family: var(--serif); font-weight: 700; letter-spacing: .08em; border-width: 2px; background: rgba(10, 9, 8, .5); }
.lux .stamp.like { color: var(--accent2); }

/* ---------- Barre d'onglets ---------- */
.lux .m-nav { background: rgba(12, 11, 9, .9); border-top: 1px solid var(--hair); }
.lux .m-nav button { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; transition: color .2s; }
.lux .m-nav button .ic { display: grid; place-items: center; height: 26px; }
.lux .m-nav button .ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lux .m-nav button.on { color: var(--accent2); }
.lux .m-nav button.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--gold-grad);
  animation: grow .35s ease-out; }

/* ---------- Fenêtre « j'ai tourné » ---------- */
.lux dialog, dialog.lux-dlg { background: #12110e; border: 1px solid var(--hair); border-radius: 22px; }
.lux dialog h2 { font-family: var(--serif); font-size: 24px; font-weight: 700; }

/* ---------- Apparition des écrans ---------- */
.lux .m-main.enter > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.lux .m-main.enter > *:nth-child(2) { animation-delay: .06s; }
.lux .m-main.enter > *:nth-child(3) { animation-delay: .12s; }
.lux .m-main.enter > *:nth-child(4) { animation-delay: .18s; }
.lux .m-main.enter > *:nth-child(5) { animation-delay: .24s; }
.lux .m-main.enter > *:nth-child(n+6) { animation-delay: .3s; }
.lux .m-main.enter .todo-item, .lux .m-main.enter .stack > .card { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.lux .m-main.enter .todo-item:nth-child(2), .lux .m-main.enter .stack > .card:nth-child(2) { animation-delay: .08s; }
.lux .m-main.enter .todo-item:nth-child(3), .lux .m-main.enter .stack > .card:nth-child(3) { animation-delay: .14s; }
.lux .m-main.enter .todo-item:nth-child(n+4), .lux .m-main.enter .stack > .card:nth-child(n+4) { animation-delay: .2s; }

/* ---------- Pluie d'or quand la journée est bouclée ---------- */
.burst { position: fixed; left: 50%; top: 38%; width: 0; height: 0; z-index: 200; pointer-events: none; }
.burst i { position: absolute; width: 8px; height: 8px; background: linear-gradient(135deg, #f6e7b4, #c9a24a); transform: rotate(45deg);
  animation: fly 1.3s cubic-bezier(.15, .7, .3, 1) forwards; }

@keyframes shimmer { to { background-position: 200% center; } }
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes glow { 50% { opacity: .55; transform: translateX(-50%) scale(1.12); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bump { 40% { transform: scale(1.35); } }
@keyframes ring { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.5); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes fly { 0% { opacity: 1; transform: translate(0, 0) rotate(45deg) scale(.6); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 120px)) rotate(var(--r)) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .lux *, .lux *::before, .lux *::after, .burst i { animation: none !important; transition: none !important; }
}

/* ---------- Écran de connexion ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.auth-in { width: min(400px, 100%); text-align: center; animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.auth-logo { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 14px 40px rgba(201, 162, 74, .25); }
.auth-title { font-family: var(--serif); font-weight: 500; font-size: 40px; letter-spacing: -.01em; line-height: 1; margin: 18px 0 6px; }
.auth-title em { font-style: normal; font-weight: 700; background: var(--gold-grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
.auth-sub { color: var(--muted); margin: 0 0 22px; }
.auth-form { text-align: left; }
.auth-form label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.auth-form input { background: #100f0c; border: 1px solid var(--hair); border-radius: 14px; padding: 14px 16px; font-size: 16px; }
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 162, 74, .15); }
.pw { position: relative; }
.pw input { padding-right: 88px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent); font-size: 13px; cursor: pointer; padding: 8px; }
.auth-err { color: #f0a093; min-height: 1.4em; margin: 12px 0 0; text-align: center; font-size: 14px; }
.auth-foot { color: var(--muted); font-size: 12px; margin-top: 18px; }
.install { text-align: left; margin-bottom: 8px; padding: 14px 16px; border-color: rgba(201, 162, 74, .45); }
.install b:first-child { color: var(--accent2); }
.install ol { margin: 8px 0 0; padding-left: 20px; color: var(--text); font-size: 14px; line-height: 1.6; }
.share-ic { display: inline-block; width: 14px; height: 16px; vertical-align: -2px; background: no-repeat center/contain
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0dc9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v8h14v-8'/%3E%3C/svg%3E"); }

/* ---------- Petites animations en plus ---------- */
/* l'icône de l'onglet choisi fait un petit rebond */
.lux .m-nav button.on .ic svg { animation: hop .45s cubic-bezier(.3, 1.6, .5, 1); }
/* les cartes s'enfoncent légèrement sous le doigt */
.lux .card, .lux .todo-item, .lux .slide-card { transition: transform .18s ease, border-color .2s, box-shadow .2s; }
.lux .todo-item:active, .lux .cta:active { transform: scale(.98); }
/* le bouton doré respire doucement tant qu'il reste des Reels à poster */
.lux .acc:not(.acc-ok) .btn.primary { animation: breathe 3.2s ease-in-out infinite; }
/* le compteur passé à l'objectif brille une fois */
.lux .acc-ok { animation: glowOnce 1.2s ease-out 1; }
/* l'écran de connexion : le logo flotte légèrement */
.auth-logo { animation: float 5s ease-in-out infinite; }
@keyframes hop { 40% { transform: translateY(-5px) scale(1.12); } }
@keyframes breathe { 50% { box-shadow: 0 8px 34px rgba(201, 162, 74, .42), inset 0 1px 0 rgba(255, 255, 255, .35); } }
@keyframes glowOnce { 0% { box-shadow: 0 0 0 0 rgba(240, 220, 156, .5); } 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 14px rgba(240, 220, 156, 0); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .lux .m-nav button.on .ic svg, .lux .acc .btn.primary, .lux .acc-ok, .auth-logo { animation: none !important; } }

/* ---------- Bouton de déconnexion (en-tête) ---------- */
.lux .m-head-row { display: flex; align-items: center; gap: 12px; }
.lux .m-head-row > div { flex: 1; }
.lux .m-logout { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: #15130f; border: 1px solid var(--hair); color: var(--accent2); transition: transform .15s, border-color .2s; }
.lux .m-logout:active { transform: scale(.92); }
.lux .m-logout:hover { border-color: var(--accent); }
.lux .m-logout svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- Choix de la langue ---------- */
.lux .m-lang { font-family: var(--sans); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.auth { position: relative; }
.auth-lang { position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 6px;
  background: #15130f; border: 1px solid var(--hair); color: var(--accent2); border-radius: 99px; padding: 8px 12px; cursor: pointer;
  font: 800 12px var(--sans); letter-spacing: .06em; }
.auth-lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-dlg { width: min(360px, 92vw); }
.lang-dlg h2 { font-family: var(--serif); font-weight: 700; font-size: 22px; margin: 0 0 12px; }
.lang-list { display: flex; flex-direction: column; gap: 8px; }
.lang-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; cursor: pointer; text-align: left;
  background: #15130f; border: 1px solid var(--hair); color: var(--text); font: 600 16px var(--sans); }
.lang-list button.on { border-color: var(--accent); }
.lang-list .flag { font-size: 22px; }
.lang-list .tick { margin-left: auto; color: var(--accent2); }
@media (max-width: 760px) { .lang-dlg { width: 100vw; max-width: 100vw; padding-bottom: calc(20px + env(safe-area-inset-bottom)); } }

/* ---------- Planning & règles ---------- */
.lux .guide { margin-top: 18px; padding: 0; overflow: hidden; }
.lux .guide summary { display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; list-style: none; }
.lux .guide summary::-webkit-details-marker { display: none; }
.lux .guide .guide-ic { font-size: 20px; }
.lux .guide summary b { flex: 1; font-family: var(--serif); font-weight: 700; font-size: 16px; }
.lux .guide .chev { color: var(--accent); font-size: 22px; transition: transform .25s; }
.lux .guide[open] .chev { transform: rotate(90deg); }
.lux .guide-body { padding: 0 16px 18px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; color: #e9e2d4; border-top: 1px solid var(--hair); padding-top: 14px; }
.lux .guide-body a { color: var(--accent2); }
.lux .guide[open] .guide-body { animation: rise .35s ease both; }

/* ---------- To-do en catégories déroulantes ---------- */
.lux .cats { display: flex; flex-direction: column; gap: 10px; }
.lux .cat { padding: 0; overflow: hidden; }
.lux .cat summary { display: flex; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; list-style: none; }
.lux .cat summary::-webkit-details-marker { display: none; }
.lux .cat .cat-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px;
  background: #1b1812; border: 1px solid var(--hair); flex-shrink: 0; }
.lux .cat .cat-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lux .cat .cat-name b { font-family: var(--serif); font-weight: 700; font-size: 16px; }
.lux .cat .cat-sub { font-size: 12px; color: var(--muted); }
.lux .cat .cat-count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center;
  background: var(--gold-grad); color: var(--gold-ink); font-weight: 800; font-size: 13px; }
.lux .cat .cat-count.ok { background: rgba(140, 201, 160, .15); color: var(--ok); border: 1px solid rgba(140, 201, 160, .4); }
.lux .cat .chev { color: var(--accent); font-size: 22px; transition: transform .25s; }
.lux .cat[open] .chev { transform: rotate(90deg); }
.lux .cat-body { padding: 0 12px 12px; }
.lux .cat[open] .cat-body { animation: rise .35s ease both; }
.lux .cat .todo-item { padding: 13px 14px; font-size: 15px; }

/* ---------- Planning du jour ---------- */
.lux .plan { margin-top: 18px; padding: 16px; }
.lux .plan-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.lux .plan-head b { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.lux .plan-head b::first-letter { text-transform: uppercase; }
.lux .plan-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lux .plan-item { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; cursor: pointer;
  background: #15130f; border: 1px solid var(--hair); color: var(--text); font: 600 14px var(--sans); transition: transform .15s, background .2s; }
.lux .plan-item:active { transform: scale(.96); }
.lux .plan-item .box { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.lux .plan-item.done { background: rgba(201, 162, 74, .14); }
.lux .plan-item.done .box { background: var(--gold-grad); border-color: transparent; color: var(--gold-ink); }
.lux .plan-item.done span:last-child { text-decoration: line-through; opacity: .7; }

/* Encart notifications */
.lux .notif { margin-top: 18px; border-color: rgba(201, 162, 74, .45); }
.lux .notif b { font-family: var(--serif); font-size: 17px; }

/* Envoi de vidéo */
.lux .up-pick { display: block; text-align: center; cursor: pointer; }
.lux .up-name { text-align: center; }
.lux .up-or { text-align: center; text-transform: uppercase; letter-spacing: .2em; }
