/* Céleste V4 — onglet « Thèmes » (celeste-v4-themes.js). */
#celeste-v4-root .c4-nav.c4-nav-5{grid-template-columns:repeat(5,1fr)}
#celeste-v4-root .c4-nav button[hidden]{display:none}
/* 5 onglets sur 320–375 px, 16 langues : une ligne, libellé raccourci (…) plutôt que débordement. */
#celeste-v4-root .c4-nav.c4-nav-5 button{min-width:0;padding-left:2px;padding-right:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#celeste-v4-root .c4-th-up{gap:6px;margin-top:4px}
#celeste-v4-root .c4-th-up .c4-btn{width:100%}
#celeste-v4-root .c4-th-up-hint{display:block;margin:-2px 0 4px;text-align:center;font-size:11px;color:rgba(245,232,211,.6)}
#celeste-v4-root .c4-th-limit{margin-bottom:14px}
#celeste-v4-root .c4-th-sheet .c4-th-up+.c4-compare{align-self:center}
#celeste-v4-root.c4-light .c4-th-up-hint{color:var(--c4l-muted)}
#celeste-v4-root .c4-th-head{margin:6px 2px 14px}
#celeste-v4-root .c4-th-head h2{margin:2px 0 6px;font:400 40px/1.05 'Cormorant Garamond',serif;color:#f3e4ca}
#celeste-v4-root .c4-th-head p{margin:0;max-width:640px;font-size:13px;line-height:1.55;color:rgba(245,232,211,.66)}
#celeste-v4-root .c4-th-head .c4-th-owner{margin-top:10px;display:inline-block;padding:5px 11px;border-radius:999px;border:1px dashed rgba(201,178,255,.45);color:#d9c6ff;font-size:11px;background:rgba(160,120,255,.08)}
#celeste-v4-root .c4-th-quota{display:flex;gap:9px;align-items:flex-start;margin:0 0 14px;padding:11px 14px;border-radius:16px;border:1px solid rgba(239,204,137,.22);background:linear-gradient(120deg,rgba(239,204,137,.08),rgba(120,70,150,.1));font-size:12.5px;line-height:1.5;color:#efdcbb}
#celeste-v4-root .c4-th-quota span{color:#f0c777}
#celeste-v4-root .c4-th-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#celeste-v4-root .c4-th-card{position:relative;display:flex;flex-direction:column;gap:12px;min-height:220px;padding:16px 15px 14px;border-radius:22px;border:1px solid rgba(239,204,137,.16);background:radial-gradient(circle at 85% 0%,rgba(150,95,190,.22),transparent 55%),linear-gradient(160deg,#1a0f25,#0c0714);color:#f5e8cf;text-align:left;cursor:pointer;transition:transform .2s ease,border-color .2s ease}
#celeste-v4-root .c4-th-card:hover{transform:translateY(-2px);border-color:rgba(239,204,137,.38)}
#celeste-v4-root .c4-th-card:focus-visible,#celeste-v4-root .c4-th-period:focus-visible{outline:2px solid #f0c777;outline-offset:2px}
#celeste-v4-root .c4-th-copy{display:flex;flex-direction:column;gap:5px;flex:1}
#celeste-v4-root .c4-th-copy strong{font:500 24px/1.05 'Cormorant Garamond',serif;color:#f6e7cb}
#celeste-v4-root .c4-th-copy em{font-style:normal;font-size:11px;line-height:1.45;color:rgba(245,232,211,.58)}
#celeste-v4-root .c4-th-states{display:flex;flex-direction:column;gap:3px;margin-top:auto;padding-top:8px;border-top:1px solid rgba(239,204,137,.1)}
#celeste-v4-root .c4-th-st{display:flex;align-items:center;gap:7px;font:500 10.5px Inter,sans-serif;color:rgba(245,232,211,.62)}
#celeste-v4-root .c4-th-st i{width:7px;height:7px;flex:0 0 7px;border-radius:50%;border:1px solid rgba(239,204,137,.5)}
#celeste-v4-root .c4-th-st.is-ready{color:#a8e3b6}
#celeste-v4-root .c4-th-st.is-ready i{background:#7fd39a;border-color:#7fd39a}
#celeste-v4-root .c4-th-st.is-gen{color:#d9c6ff}
#celeste-v4-root .c4-th-st.is-gen i{background:#b99cff;border-color:#b99cff;animation:c4thPulse 1.4s ease-in-out infinite}
#celeste-v4-root .c4-th-st.is-err{color:#ffb9a6}
#celeste-v4-root .c4-th-st.is-lock{color:rgba(245,232,211,.42)}
#celeste-v4-root .c4-th-st.is-lock i{border-style:dashed}
@keyframes c4thPulse{50%{opacity:.35}}
#celeste-v4-root .c4-th-ico{display:grid;place-items:center;width:50px;height:50px;flex:0 0 50px;border-radius:50%;border:1px solid rgba(239,204,137,.4);background:radial-gradient(circle at 35% 30%,#4a2a63,#1c0f29 70%);box-shadow:0 0 0 4px rgba(239,204,137,.05),0 10px 26px rgba(0,0,0,.35);color:#f0c777}
#celeste-v4-root .c4-th-ico svg{width:60%;height:60%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#celeste-v4-root .c4-th-ico-lg{width:64px;height:64px;flex-basis:64px;align-self:center}
#celeste-v4-root .c4-th-ico-xl{width:96px;height:96px;flex:0 0 96px}
#celeste-v4-root .c4-ms-hero.c4-th-hero{display:flex;align-items:center;gap:18px;padding:20px 20px;background:radial-gradient(circle at 12% 50%,rgba(150,95,190,.28),transparent 45%),linear-gradient(160deg,#1a0f25,#0c0714)}
#celeste-v4-root .c4-ms-hero.c4-th-hero>div{padding:0;background:none;min-width:0}
#celeste-v4-root.c4-light .c4-ms-hero.c4-th-hero{background:radial-gradient(circle at 12% 50%,rgba(107,74,154,.12),transparent 45%),linear-gradient(160deg,var(--c4l-surface),var(--c4l-surface-2))}
#celeste-v4-root .c4-modal-sheet.c4-th-modal{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#celeste-v4-root .c4-th-sheet{display:flex;flex-direction:column;gap:9px;text-align:center}
#celeste-v4-root .c4-th-sheet h3{margin:0;font:500 28px/1.1 'Cormorant Garamond',serif;color:#f3e4ca}
#celeste-v4-root .c4-th-sheet p{margin:0;font-size:13px;line-height:1.5;color:#eadcc4}
#celeste-v4-root .c4-th-sheet .c4-label{margin:4px 0 0}
#celeste-v4-root .c4-th-left{padding:8px 12px;border-radius:12px;background:rgba(239,204,137,.08);color:#f0d9a8!important;font-size:12px!important}
#celeste-v4-root .c4-th-left.is-lock{background:rgba(255,255,255,.04);color:rgba(245,232,211,.62)!important}
#celeste-v4-root .c4-th-periods{display:flex;flex-direction:column;gap:8px;margin:4px 0}
#celeste-v4-root .c4-th-period{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:58px;padding:11px 14px;border-radius:16px;border:1px solid rgba(239,204,137,.22);background:rgba(255,255,255,.03);color:#f5e8cf;text-align:left;cursor:pointer;font:inherit}
#celeste-v4-root .c4-th-period:hover:not([disabled]){border-color:rgba(239,204,137,.5);background:rgba(239,204,137,.07)}
#celeste-v4-root .c4-th-period-copy{display:flex;flex-direction:column;gap:2px}
#celeste-v4-root .c4-th-period-copy b{font:500 19px 'Cormorant Garamond',serif;color:#f6e7cb}
#celeste-v4-root .c4-th-period-copy small{font-size:10.5px;color:rgba(245,232,211,.55)}
#celeste-v4-root .c4-th-period-act{flex:0 0 auto;padding:6px 12px;border-radius:999px;border:1px solid rgba(239,204,137,.35);font:600 11px Inter,sans-serif;color:#f0c777;white-space:nowrap}
#celeste-v4-root .c4-th-period.is-ready .c4-th-period-act{border-color:rgba(140,214,160,.5);color:#a8e3b6;background:rgba(120,200,140,.1)}
#celeste-v4-root .c4-th-period.is-gen .c4-th-period-act{border-color:rgba(200,170,255,.5);color:#d9c6ff;background:rgba(160,120,255,.12)}
#celeste-v4-root .c4-th-period.is-err .c4-th-period-act{border-color:rgba(255,160,140,.45);color:#ffb9a6}
#celeste-v4-root .c4-th-period[disabled]{cursor:not-allowed;opacity:.55}
#celeste-v4-root .c4-th-period[disabled] .c4-th-period-act{border-style:dashed;color:rgba(245,232,211,.5)}
#celeste-v4-root .c4-th-lock{margin-bottom:14px}
@media(max-width:1100px){#celeste-v4-root .c4-th-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){#celeste-v4-root .c4-th-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#celeste-v4-root .c4-th-card{min-height:200px;padding:13px 12px 12px;border-radius:18px;gap:9px}#celeste-v4-root .c4-th-copy strong{font-size:21px}#celeste-v4-root .c4-th-copy em{font-size:10.5px}#celeste-v4-root .c4-th-head h2{font-size:34px}#celeste-v4-root .c4-th-ico{width:44px;height:44px;flex-basis:44px}#celeste-v4-root .c4-th-ico-lg{width:58px;height:58px;flex-basis:58px}#celeste-v4-root .c4-th-ico-xl{width:76px;height:76px;flex-basis:76px}}
@media(max-width:370px){#celeste-v4-root .c4-th-st{font-size:9.5px}#celeste-v4-root .c4-th-copy em{display:none}}
@media(prefers-reduced-motion:reduce){#celeste-v4-root .c4-th-card{transition:none}#celeste-v4-root .c4-th-st.is-gen i{animation:none}}
#celeste-v4-root[dir=rtl] .c4-th-card,#celeste-v4-root[dir=rtl] .c4-th-period{text-align:right}

/* Thème clair (parchemin ivoire) */
#celeste-v4-root.c4-light .c4-th-head h2,#celeste-v4-root.c4-light .c4-th-copy strong,#celeste-v4-root.c4-light .c4-th-sheet h3,#celeste-v4-root.c4-light .c4-th-period-copy b{color:var(--c4l-head)}
#celeste-v4-root.c4-light .c4-th-head p,#celeste-v4-root.c4-light .c4-th-copy em,#celeste-v4-root.c4-light .c4-th-period-copy small{color:var(--c4l-muted)}
#celeste-v4-root.c4-light .c4-th-sheet p{color:var(--c4l-soft)}
#celeste-v4-root.c4-light .c4-th-head .c4-th-owner{color:var(--c4l-lilac);border-color:rgba(107,74,154,.4);background:rgba(107,74,154,.07)}
#celeste-v4-root.c4-light .c4-th-quota{border-color:var(--c4l-line-2);background:linear-gradient(120deg,rgba(168,117,46,.1),rgba(107,74,154,.06));color:var(--c4l-text)}
#celeste-v4-root.c4-light .c4-th-quota span{color:var(--c4l-gold)}
#celeste-v4-root.c4-light .c4-th-card{background:radial-gradient(circle at 85% 0%,rgba(107,74,154,.12),transparent 55%),linear-gradient(160deg,var(--c4l-surface),var(--c4l-surface-2));border-color:var(--c4l-line);color:var(--c4l-text);box-shadow:0 10px 30px rgba(90,60,30,.1)}
#celeste-v4-root.c4-light .c4-th-card:hover{border-color:var(--c4l-line-2)}
#celeste-v4-root.c4-light .c4-th-states{border-top-color:var(--c4l-line)}
#celeste-v4-root.c4-light .c4-th-st{color:var(--c4l-muted)}
#celeste-v4-root.c4-light .c4-th-st i{border-color:var(--c4l-gold-2)}
#celeste-v4-root.c4-light .c4-th-st.is-ready{color:#2e7a4c}
#celeste-v4-root.c4-light .c4-th-st.is-ready i{background:#3d9a62;border-color:#3d9a62}
#celeste-v4-root.c4-light .c4-th-st.is-gen{color:var(--c4l-lilac)}
#celeste-v4-root.c4-light .c4-th-st.is-gen i{background:var(--c4l-lilac);border-color:var(--c4l-lilac)}
#celeste-v4-root.c4-light .c4-th-st.is-err{color:#a3402a}
#celeste-v4-root.c4-light .c4-th-ico{border-color:rgba(150,104,40,.45);background:radial-gradient(circle at 35% 30%,#fffaf0,#efe0c4 75%);box-shadow:0 0 0 4px rgba(168,117,46,.06),0 8px 20px rgba(90,60,30,.14);color:var(--c4l-gold)}
#celeste-v4-root.c4-light .c4-th-left{background:rgba(168,117,46,.1);color:var(--c4l-gold)!important}
#celeste-v4-root.c4-light .c4-th-left.is-lock{background:rgba(42,31,51,.05);color:var(--c4l-muted)!important}
#celeste-v4-root.c4-light .c4-th-period{background:rgba(255,252,246,.7);border-color:var(--c4l-line-2);color:var(--c4l-text)}
#celeste-v4-root.c4-light .c4-th-period:hover:not([disabled]){background:rgba(168,117,46,.08)}
#celeste-v4-root.c4-light .c4-th-period-act{border-color:var(--c4l-line-2);color:var(--c4l-gold)}
#celeste-v4-root.c4-light .c4-th-period.is-ready .c4-th-period-act{border-color:rgba(46,130,80,.4);color:#2e7a4c;background:rgba(46,130,80,.08)}
#celeste-v4-root.c4-light .c4-th-period.is-gen .c4-th-period-act{border-color:rgba(107,74,154,.4);color:var(--c4l-lilac);background:rgba(107,74,154,.08)}
#celeste-v4-root.c4-light .c4-th-period.is-err .c4-th-period-act{color:#a3402a;border-color:rgba(163,64,42,.35)}
#celeste-v4-root.c4-light .c4-th-period[disabled] .c4-th-period-act{color:var(--c4l-muted)}
