/* ================================================================
   TODO PRIVÉE — style.css
   Thème Soleil & Lune avec animations
================================================================ */

/* ----------------------------------------
   1. Variables CSS
---------------------------------------- */
:root {
    --paw-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.6' flood-color='%23000000' flood-opacity='.28'/%3E%3C/filter%3E%3Cg filter='url(%23s)' stroke='%23f7d7e7' stroke-width='1.2'%3E%3Cellipse cx='19.5' cy='24' rx='8.3' ry='6.8' fill='%23ffffff' transform='rotate(-12 19.5 24)'/%3E%3Cellipse cx='11.2' cy='17.8' rx='3.5' ry='4.6' fill='%23ffffff' transform='rotate(-24 11.2 17.8)'/%3E%3Cellipse cx='17.1' cy='12.8' rx='3.5' ry='4.8' fill='%23ffffff' transform='rotate(-8 17.1 12.8)'/%3E%3Cellipse cx='24.2' cy='13.8' rx='3.5' ry='4.8' fill='%23ffffff' transform='rotate(12 24.2 13.8)'/%3E%3Cellipse cx='29.5' cy='19.5' rx='3.5' ry='4.6' fill='%23ffffff' transform='rotate(28 29.5 19.5)'/%3E%3C/g%3E%3Cg fill='%23ff8fbd'%3E%3Cellipse cx='19.6' cy='24.2' rx='4.9' ry='3.6' transform='rotate(-12 19.6 24.2)'/%3E%3Cellipse cx='11.3' cy='17.9' rx='1.7' ry='2.4' transform='rotate(-24 11.3 17.9)'/%3E%3Cellipse cx='17.1' cy='12.9' rx='1.7' ry='2.5' transform='rotate(-8 17.1 12.9)'/%3E%3Cellipse cx='24.2' cy='13.9' rx='1.7' ry='2.5' transform='rotate(12 24.2 13.9)'/%3E%3Cellipse cx='29.4' cy='19.6' rx='1.7' ry='2.4' transform='rotate(28 29.4 19.6)'/%3E%3C/g%3E%3C/svg%3E") 10 10, auto;
    --paw-cursor-closed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.6' flood-color='%23000000' flood-opacity='.3'/%3E%3C/filter%3E%3Cg filter='url(%23s)' stroke='%23f7d7e7' stroke-width='1.2'%3E%3Cellipse cx='20' cy='24' rx='8.8' ry='7.1' fill='%23ffffff' transform='rotate(-8 20 24)'/%3E%3Cellipse cx='14.2' cy='17.8' rx='3.8' ry='4.2' fill='%23ffffff' transform='rotate(-32 14.2 17.8)'/%3E%3Cellipse cx='18.3' cy='14.7' rx='3.7' ry='4.3' fill='%23ffffff' transform='rotate(-10 18.3 14.7)'/%3E%3Cellipse cx='23.3' cy='15.2' rx='3.7' ry='4.3' fill='%23ffffff' transform='rotate(12 23.3 15.2)'/%3E%3Cellipse cx='27.1' cy='18.7' rx='3.8' ry='4.2' fill='%23ffffff' transform='rotate(32 27.1 18.7)'/%3E%3C/g%3E%3Cg fill='%23ff8fbd'%3E%3Cellipse cx='20' cy='24.2' rx='5.2' ry='3.9' transform='rotate(-8 20 24.2)'/%3E%3Cellipse cx='14.2' cy='17.9' rx='1.8' ry='2.2' transform='rotate(-32 14.2 17.9)'/%3E%3Cellipse cx='18.3' cy='14.8' rx='1.8' ry='2.2' transform='rotate(-10 18.3 14.8)'/%3E%3Cellipse cx='23.3' cy='15.3' rx='1.8' ry='2.2' transform='rotate(12 23.3 15.3)'/%3E%3Cellipse cx='27.1' cy='18.8' rx='1.8' ry='2.2' transform='rotate(32 27.1 18.8)'/%3E%3C/g%3E%3C/svg%3E") 10 10, auto;
    --user-accent:    #FF6B35;
    --card-bg:        rgba(255, 248, 230, 0.72);
    --card-border:    rgba(255, 190, 80, 0.35);
    --card-shadow:    rgba(200, 100, 30, 0.18);
    --text-primary:   #2D1B0E;
    --text-secondary: #7A4820;
    --text-muted:     #A06030;
    --accent:         var(--user-accent);
    --accent-hover:   #E55A26;
    --input-bg:       rgba(255, 255, 255, 0.55);
    --input-border:   rgba(255, 160, 60, 0.4);
    --input-focus:    rgba(255, 107, 53, 0.45);
    --btn-secondary:  rgba(255, 200, 100, 0.3);
    --divider:        rgba(255, 160, 60, 0.2);
    --task-done-bg:   rgba(210, 160, 80, 0.2);
    --check-color:    #FF6B35;
    --tag-glow:       rgba(255, 120, 50, 0.3);
    --error-color:    #e74c3c;
    --delete-color:   #c0392b;
    --scrollbar:      rgba(255, 150, 60, 0.3);
}

body.moon-mode {
    --card-bg:        rgba(14, 17, 48, 0.75);
    --card-border:    rgba(110, 90, 210, 0.3);
    --card-shadow:    rgba(50, 35, 150, 0.35);
    --text-primary:   #EDE9F8;
    --text-secondary: #B0A8D0;
    --text-muted:     #7A7090;
    --accent:         var(--user-accent);
    --accent-hover:   #7266E8;
    --input-bg:       rgba(28, 32, 78, 0.55);
    --input-border:   rgba(120, 100, 220, 0.35);
    --input-focus:    rgba(140, 120, 240, 0.45);
    --btn-secondary:  rgba(70, 55, 150, 0.3);
    --divider:        rgba(100, 80, 180, 0.2);
    --task-done-bg:   rgba(55, 45, 100, 0.45);
    --check-color:    #8B7CF8;
    --tag-glow:       rgba(130, 100, 250, 0.3);
    --error-color:    #ff6b6b;
    --delete-color:   #ff4757;
    --scrollbar:      rgba(100, 80, 200, 0.3);
}

:root {
    --paw-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.5' flood-color='%23000000' flood-opacity='.32'/%3E%3C/filter%3E%3Cg filter='url(%23s)' stroke='%23000000' stroke-width='1.1'%3E%3Cellipse cx='19.5' cy='24' rx='8.3' ry='6.8' fill='%23111111' transform='rotate(-12 19.5 24)'/%3E%3Cellipse cx='11.2' cy='17.8' rx='3.5' ry='4.6' fill='%23111111' transform='rotate(-24 11.2 17.8)'/%3E%3Cellipse cx='17.1' cy='12.8' rx='3.5' ry='4.8' fill='%23111111' transform='rotate(-8 17.1 12.8)'/%3E%3Cellipse cx='24.2' cy='13.8' rx='3.5' ry='4.8' fill='%23111111' transform='rotate(12 24.2 13.8)'/%3E%3Cellipse cx='29.5' cy='19.5' rx='3.5' ry='4.6' fill='%23111111' transform='rotate(28 29.5 19.5)'/%3E%3C/g%3E%3Cg fill='%23ff8fbd'%3E%3Cellipse cx='19.6' cy='24.2' rx='4.9' ry='3.6' transform='rotate(-12 19.6 24.2)'/%3E%3Cellipse cx='11.3' cy='17.9' rx='1.7' ry='2.4' transform='rotate(-24 11.3 17.9)'/%3E%3Cellipse cx='17.1' cy='12.9' rx='1.7' ry='2.5' transform='rotate(-8 17.1 12.9)'/%3E%3Cellipse cx='24.2' cy='13.9' rx='1.7' ry='2.5' transform='rotate(12 24.2 13.9)'/%3E%3Cellipse cx='29.4' cy='19.6' rx='1.7' ry='2.4' transform='rotate(28 29.4 19.6)'/%3E%3C/g%3E%3C/svg%3E") 10 10, auto;
    --paw-cursor-closed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.5' flood-color='%23000000' flood-opacity='.34'/%3E%3C/filter%3E%3Cg filter='url(%23s)' stroke='%23000000' stroke-width='1.1'%3E%3Cellipse cx='20' cy='24' rx='8.8' ry='7.1' fill='%23111111' transform='rotate(-8 20 24)'/%3E%3Cellipse cx='14.2' cy='17.8' rx='3.8' ry='4.2' fill='%23111111' transform='rotate(-32 14.2 17.8)'/%3E%3Cellipse cx='18.3' cy='14.7' rx='3.7' ry='4.3' fill='%23111111' transform='rotate(-10 18.3 14.7)'/%3E%3Cellipse cx='23.3' cy='15.2' rx='3.7' ry='4.3' fill='%23111111' transform='rotate(12 23.3 15.2)'/%3E%3Cellipse cx='27.1' cy='18.7' rx='3.8' ry='4.2' fill='%23111111' transform='rotate(32 27.1 18.7)'/%3E%3C/g%3E%3Cg fill='%23ff8fbd'%3E%3Cellipse cx='20' cy='24.2' rx='5.2' ry='3.9' transform='rotate(-8 20 24.2)'/%3E%3Cellipse cx='14.2' cy='17.9' rx='1.8' ry='2.2' transform='rotate(-32 14.2 17.9)'/%3E%3Cellipse cx='18.3' cy='14.8' rx='1.8' ry='2.2' transform='rotate(-10 18.3 14.8)'/%3E%3Cellipse cx='23.3' cy='15.3' rx='1.8' ry='2.2' transform='rotate(12 23.3 15.3)'/%3E%3Cellipse cx='27.1' cy='18.8' rx='1.8' ry='2.2' transform='rotate(32 27.1 18.8)'/%3E%3C/g%3E%3C/svg%3E") 10 10, auto;
}

body.moon-mode {
    --paw-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.6' flood-color='%23000000' flood-opacity='.28'/%3E%3C/filter%3E%3Cg filter='url(%23s)' stroke='%23f7d7e7' stroke-width='1.2'%3E%3Cellipse cx='19.5' cy='24' rx='8.3' ry='6.8' fill='%23ffffff' transform='rotate(-12 19.5 24)'/%3E%3Cellipse cx='11.2' cy='17.8' rx='3.5' ry='4.6' fill='%23ffffff' transform='rotate(-24 11.2 17.8)'/%3E%3Cellipse cx='17.1' cy='12.8' rx='3.5' ry='4.8' fill='%23ffffff' transform='rotate(-8 17.1 12.8)'/%3E%3Cellipse cx='24.2' cy='13.8' rx='3.5' ry='4.8' fill='%23ffffff' transform='rotate(12 24.2 13.8)'/%3E%3Cellipse cx='29.5' cy='19.5' rx='3.5' ry='4.6' fill='%23ffffff' transform='rotate(28 29.5 19.5)'/%3E%3C/g%3E%3Cg fill='%23ff8fbd'%3E%3Cellipse cx='19.6' cy='24.2' rx='4.9' ry='3.6' transform='rotate(-12 19.6 24.2)'/%3E%3Cellipse cx='11.3' cy='17.9' rx='1.7' ry='2.4' transform='rotate(-24 11.3 17.9)'/%3E%3Cellipse cx='17.1' cy='12.9' rx='1.7' ry='2.5' transform='rotate(-8 17.1 12.9)'/%3E%3Cellipse cx='24.2' cy='13.9' rx='1.7' ry='2.5' transform='rotate(12 24.2 13.9)'/%3E%3Cellipse cx='29.4' cy='19.6' rx='1.7' ry='2.4' transform='rotate(28 29.4 19.6)'/%3E%3C/g%3E%3C/svg%3E") 10 10, auto;
    --paw-cursor-closed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.6' flood-color='%23000000' flood-opacity='.3'/%3E%3C/filter%3E%3Cg filter='url(%23s)' stroke='%23f7d7e7' stroke-width='1.2'%3E%3Cellipse cx='20' cy='24' rx='8.8' ry='7.1' fill='%23ffffff' transform='rotate(-8 20 24)'/%3E%3Cellipse cx='14.2' cy='17.8' rx='3.8' ry='4.2' fill='%23ffffff' transform='rotate(-32 14.2 17.8)'/%3E%3Cellipse cx='18.3' cy='14.7' rx='3.7' ry='4.3' fill='%23ffffff' transform='rotate(-10 18.3 14.7)'/%3E%3Cellipse cx='23.3' cy='15.2' rx='3.7' ry='4.3' fill='%23ffffff' transform='rotate(12 23.3 15.2)'/%3E%3Cellipse cx='27.1' cy='18.7' rx='3.8' ry='4.2' fill='%23ffffff' transform='rotate(32 27.1 18.7)'/%3E%3C/g%3E%3Cg fill='%23ff8fbd'%3E%3Cellipse cx='20' cy='24.2' rx='5.2' ry='3.9' transform='rotate(-8 20 24.2)'/%3E%3Cellipse cx='14.2' cy='17.9' rx='1.8' ry='2.2' transform='rotate(-32 14.2 17.9)'/%3E%3Cellipse cx='18.3' cy='14.8' rx='1.8' ry='2.2' transform='rotate(-10 18.3 14.8)'/%3E%3Cellipse cx='23.3' cy='15.3' rx='1.8' ry='2.2' transform='rotate(12 23.3 15.3)'/%3E%3Cellipse cx='27.1' cy='18.8' rx='1.8' ry='2.2' transform='rotate(32 27.1 18.8)'/%3E%3C/g%3E%3C/svg%3E") 10 10, auto;
}

/* ----------------------------------------
   2. Reset & Base
---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: color 0.6s ease;
    cursor: var(--paw-cursor);
    --mountain-x: 0px;
    --mountain-y: 0px;
}

body.paw-clicking {
    cursor: var(--paw-cursor-closed);
}

button,
a,
select,
input[type="button"],
input[type="submit"],
.filter-btn,
.task-check,
.task-action,
.task-delete {
    cursor: var(--paw-cursor);
}

body.paw-clicking button,
body.paw-clicking a,
body.paw-clicking select,
body.paw-clicking input[type="button"],
body.paw-clicking input[type="submit"],
body.paw-clicking .filter-btn,
body.paw-clicking .task-check,
body.paw-clicking .task-action,
body.paw-clicking .task-delete {
    cursor: var(--paw-cursor-closed);
}

/* ----------------------------------------
   3. Ciel — deux couches qui se croisent
---------------------------------------- */
.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.sky-layer {
    position: absolute;
    inset: 0;
    transition: opacity 1.4s ease;
}

.sky-sun {
    background: linear-gradient(170deg, #FF8C42 0%, #FFB347 35%, #FFD880 65%, #FFF8E7 100%);
    opacity: 1;
}

.sky-moon {
    background: linear-gradient(170deg, #080C22 0%, #0E1535 40%, #141038 70%, #1A1040 100%);
    opacity: 0;
}

body.moon-mode .sky-sun  { opacity: 0; }
body.moon-mode .sky-moon { opacity: 1; }

/* ----------------------------------------
   4. Canvas Three.js 3D
---------------------------------------- */
#threeCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ----------------------------------------
   5. Soleil
---------------------------------------- */
.celestial-wrap {
    position: absolute;
    top: 36px;
    right: 72px;
    width: 100px;
    height: 100px;
    z-index: 2;
}

.sun {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 1.2s ease, transform 1.2s ease;
    transform: scale(1) translateY(0);
}

body.moon-mode .sun {
    opacity: 0;
    transform: scale(0.4) translateY(-50px);
}

.sun-halo {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 230, 80, 0.35) 0%, transparent 70%);
    animation: haloBreath 4s ease-in-out infinite;
}

@keyframes haloBreath {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%       { transform: scale(1.25); opacity: 1; }
}

.sun-core {
    width: 68px;
    height: 68px;
    background: radial-gradient(circle at 38% 38%, #FFE566, #FFB300 60%, #FF8C00 100%);
    border-radius: 50%;
    box-shadow:
        0 0 22px rgba(255, 210, 60, 0.7),
        0 0 55px rgba(255, 160, 30, 0.45),
        0 0 100px rgba(255, 130, 20, 0.22);
    animation: sunPulse 5s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% {
        box-shadow: 0 0 22px rgba(255,210,60,.7), 0 0 55px rgba(255,160,30,.45), 0 0 100px rgba(255,130,20,.22);
    }
    50% {
        box-shadow: 0 0 34px rgba(255,230,80,.9), 0 0 75px rgba(255,180,50,.6), 0 0 130px rgba(255,150,30,.35);
    }
}

/* ----------------------------------------
   6. Lune
---------------------------------------- */
.moon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.2s ease;
    transform: scale(0.4) translateY(-50px);
}

body.moon-mode .moon {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.moon::before {
    content: '';
    position: absolute;
    width: 74px;
    height: 74px;
    background: radial-gradient(circle at 36% 34%, #F8F2DC, #D8CFA5 55%, #C8BC8A 100%);
    border-radius: 50%;
    box-shadow:
        0 0 22px rgba(230, 220, 175, 0.55),
        0 0 55px rgba(210, 195, 150, 0.22),
        inset -9px -6px 0 rgba(175, 160, 110, 0.38);
    animation: moonGlow 6s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% { box-shadow: 0 0 22px rgba(230,220,175,.55), 0 0 55px rgba(210,195,150,.22), inset -9px -6px 0 rgba(175,160,110,.38); }
    50%       { box-shadow: 0 0 32px rgba(245,235,195,.75), 0 0 75px rgba(225,215,170,.35), inset -9px -6px 0 rgba(175,160,110,.38); }
}

.crater { position: absolute; border-radius: 50%; background: rgba(155, 145, 100, 0.3); }
.c1 { width: 14px; height: 14px; top: 18px; left: 20px; }
.c2 { width: 8px;  height: 8px;  top: 40px; right: 14px; }
.c3 { width: 11px; height: 11px; bottom: 17px; left: 30px; }

/* ----------------------------------------
   7. Nuages
---------------------------------------- */
.clouds-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.cloud {
    position: absolute;
    border-radius: 50px;
    filter: blur(0.5px);
    animation: cloudDrift linear infinite;
    transition: background 1.4s ease, opacity 1.4s ease;
}

body.sun-mode  .cloud { background: rgba(255, 255, 255, 0.88); opacity: 0.85; }
body.moon-mode .cloud { background: rgba(22, 28, 65, 0.6);   opacity: 0.55; }

/* ----------------------------------------
   8b. Montagnes parallax
---------------------------------------- */
.mountain-scene {
    position: absolute;
    inset: auto -5vw 0 -5vw;
    height: min(34vh, 330px);
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.mountain-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
    transition: background 0.8s ease;
    will-change: transform;
}

.mountain-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(
        0 68%, 7% 56%, 13% 64%, 22% 38%, 31% 66%,
        39% 47%, 48% 62%, 57% 31%, 66% 66%,
        76% 44%, 84% 62%, 92% 50%, 100% 68%,
        100% 100%, 0 100%
    );
}

.mountain-back {
    --mx: calc(var(--mountain-x) * -0.18);
    --my: calc(var(--mountain-y) * 0.10);
    opacity: 0.72;
}

.mountain-back::before {
    background: linear-gradient(180deg, rgba(86, 102, 150, 0.82), rgba(46, 58, 105, 0.88));
}

.mountain-mid {
    --mx: calc(var(--mountain-x) * -0.34);
    --my: calc(var(--mountain-y) * 0.16);
    height: 86%;
}

.mountain-mid::before {
    clip-path: polygon(
        0 74%, 8% 54%, 17% 70%, 28% 41%, 38% 72%,
        47% 55%, 55% 69%, 64% 36%, 74% 73%,
        83% 48%, 91% 68%, 100% 55%,
        100% 100%, 0 100%
    );
    background: linear-gradient(180deg, rgba(54, 75, 125, 0.92), rgba(24, 38, 82, 0.96));
}

.mountain-front {
    --mx: calc(var(--mountain-x) * -0.58);
    --my: calc(var(--mountain-y) * 0.22);
    height: 72%;
}

.mountain-front::before {
    clip-path: polygon(
        0 80%, 9% 61%, 17% 78%, 27% 50%, 37% 82%,
        46% 63%, 55% 78%, 67% 44%, 78% 82%,
        87% 60%, 95% 76%, 100% 67%,
        100% 100%, 0 100%
    );
    background: linear-gradient(180deg, rgba(24, 51, 86, 0.96), rgba(13, 23, 57, 1));
}

body.sun-mode .mountain-back::before {
    background: linear-gradient(180deg, rgba(146, 128, 111, 0.64), rgba(101, 95, 105, 0.78));
}

body.sun-mode .mountain-mid::before {
    background: linear-gradient(180deg, rgba(108, 104, 118, 0.74), rgba(70, 78, 105, 0.86));
}

body.sun-mode .mountain-front::before {
    background: linear-gradient(180deg, rgba(58, 87, 106, 0.9), rgba(36, 59, 89, 0.98));
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 { width: 130px; height: 28px; top: 11%; left: -160px; animation-duration: 42s; animation-delay: 0s; }
.cloud-1::before { width: 58px; height: 58px; top: -30px; left: 18px; }
.cloud-1::after  { width: 44px; height: 44px; top: -20px; left: 60px; }

.cloud-2 { width: 95px; height: 22px; top: 26%; left: -120px; animation-duration: 58s; animation-delay: -18s; }
.cloud-2::before { width: 44px; height: 44px; top: -23px; left: 13px; }
.cloud-2::after  { width: 33px; height: 33px; top: -14px; left: 44px; }

.cloud-3 { width: 160px; height: 34px; top: 7%; left: -185px; animation-duration: 70s; animation-delay: -35s; }
.cloud-3::before { width: 70px; height: 70px; top: -36px; left: 24px; }
.cloud-3::after  { width: 54px; height: 54px; top: -24px; left: 80px; }

.cloud-4 { width: 85px; height: 20px; top: 38%; left: -110px; animation-duration: 50s; animation-delay: -22s; }
.cloud-4::before { width: 38px; height: 38px; top: -19px; left: 10px; }
.cloud-4::after  { width: 30px; height: 30px; top: -12px; left: 38px; }

.cloud-5 { width: 110px; height: 24px; top: 18%; left: -135px; animation-duration: 55s; animation-delay: -8s; }
.cloud-5::before { width: 50px; height: 50px; top: -26px; left: 16px; }
.cloud-5::after  { width: 38px; height: 38px; top: -16px; left: 52px; }

@keyframes cloudDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(100vw + 220px)); }
}

/* ----------------------------------------
   8. Étoile filante (créée par JS)
---------------------------------------- */
.shooting-star {
    position: fixed;
    width: 130px;
    height: 1px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    transform: rotate(28deg);
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.9), rgba(255,255,255,0.2));
    animation: shootFly linear forwards;
}

@keyframes shootFly {
    0%   { opacity: 0; transform: rotate(28deg) translateX(0); }
    8%   { opacity: 1; }
    88%  { opacity: 1; }
    100% { opacity: 0; transform: rotate(28deg) translateX(450px); }
}

/* ----------------------------------------
   9. Écrans
---------------------------------------- */
.screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

.lock-screen { padding: 20px; }

.app-screen {
    align-items: flex-start;
    overflow-y: auto;
    padding: 24px 20px;
}

/* ----------------------------------------
   10. Glassmorphism
---------------------------------------- */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px var(--card-shadow);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

/* ----------------------------------------
   11. Écran de verrouillage
---------------------------------------- */
.lock-card {
    width: 100%;
    max-width: 400px;
    padding: 52px 44px;
    text-align: center;
    animation: cardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardIn {
    from { transform: scale(0.88) translateY(24px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.lock-emoji {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    animation: lockFloat 3.5s ease-in-out infinite;
}

@keyframes lockFloat {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%       { transform: translateY(-8px) rotate(4deg); }
}

.app-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.4px;
}

.lock-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.input-row { margin-bottom: 14px; }

.code-field {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    font-size: 20px;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 6px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.6s;
    font-family: inherit;
}

.code-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.code-field::placeholder { letter-spacing: 4px; color: var(--text-muted); font-size: 16px; }

.btn-unlock {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 18px var(--tag-glow);
    font-family: inherit;
}

.btn-unlock:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 7px 22px var(--tag-glow);
}

.btn-unlock:active { transform: translateY(1px); }

.btn-arrow { font-size: 18px; transition: transform 0.2s; }
.btn-unlock:hover .btn-arrow { transform: translateX(5px); }

.error-msg {
    min-height: 22px;
    color: var(--error-color);
    font-size: 13px;
    margin-top: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: 500;
}

.error-msg.visible {
    opacity: 1;
    animation: errShake 0.45s ease;
}

@keyframes errShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-9px); }
    40%       { transform: translateX(9px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

/* ----------------------------------------
   12. Application
---------------------------------------- */
.app-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 48px;
}

/* En-tête */
.app-header {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon {
    font-size: 28px;
    animation: iconSpin 5s ease-in-out infinite;
}

@keyframes iconSpin {
    0%, 80%, 100% { transform: rotate(-5deg); }
    40%           { transform: rotate(8deg) scale(1.1); }
}

.header-text h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.task-count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Indicateur de connexion WebSocket */
.conn-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.4s, box-shadow 0.4s;
}

.conn-dot.connected {
    background: #27ae60;
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.5);
    animation: connPulse 2.5s ease-out infinite;
}

.conn-dot.error {
    background: var(--error-color);
}

@keyframes connPulse {
    0%   { box-shadow: 0 0 0 0   rgba(39, 174, 96, 0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0   rgba(39, 174, 96, 0); }
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1) rotate(-5deg);
    background: var(--btn-secondary);
    box-shadow: 0 4px 14px var(--card-shadow);
}

.icon-btn:active { transform: scale(0.93); }

body.moon-mode #configBtn {
    color: #ffffff;
}

.icon-btn.compact {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 18px;
}

/* Configuration drawer */
.config-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(10, 10, 20, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.config-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.config-panel {
    position: fixed;
    top: 92px;
    right: max(22px, calc((100vw - 620px) / 2));
    z-index: 50;
    width: min(390px, calc(100vw - 28px));
    max-height: calc(100vh - 116px);
    overflow: auto;
    padding: 18px;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.config-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.config-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--divider);
}

.config-head h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.config-head span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--divider);
}

.settings-section:last-child { border-bottom: 0; padding-bottom: 2px; }

.settings-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--text-secondary);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    color: var(--text-primary);
    font-size: 13px;
}

.settings-select,
.settings-input,
.tag-edit-name,
.person-edit-name,
#settingsAccentText {
    min-width: 0;
    padding: 9px 11px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.settings-select { width: 150px; }

.settings-input {
    width: 100%;
}

.settings-select:focus,
.settings-input:focus,
.tag-edit-name:focus,
.person-edit-name:focus,
#settingsAccentText:focus {
    border-color: var(--accent);
}

.settings-toggle {
    width: 42px;
    height: 22px;
    accent-color: var(--accent);
}

.color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-row input[type="color"],
.tag-create-row input[type="color"],
.tag-edit-color {
    width: 38px;
    height: 34px;
    padding: 2px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
}

#settingsAccentText { width: 86px; text-transform: uppercase; }

.tag-create-row,
.person-create-row {
    display: grid;
    gap: 8px;
    align-items: center;
}

.tag-create-row { grid-template-columns: 1fr 38px auto; }
.person-create-row { grid-template-columns: 1fr auto; }

.tag-manager-list,
.person-manager-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag-manager-row,
.person-manager-row {
    display: grid;
    align-items: center;
    gap: 8px;
}

.tag-manager-row { grid-template-columns: 1fr 38px 34px 34px; }
.person-manager-row { grid-template-columns: minmax(0, 1fr) 42px 34px; }

.settings-mini-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--btn-secondary);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.person-save {
    width: 42px;
}

.settings-mini-btn:hover {
    background: var(--input-focus);
    transform: translateY(-1px);
}

.settings-mini-btn.danger {
    color: var(--delete-color);
}

.settings-mini-btn:disabled {
    cursor: not-allowed;
    opacity: 0.35;
    transform: none;
}

.settings-action {
    width: 100%;
}

.settings-status {
    min-height: 18px;
    font-size: 12px;
    color: var(--error-color);
}

.settings-status.ok {
    color: #27ae60;
}

body.glass-soft {
    --card-bg: rgba(255, 248, 230, 0.56);
}

body.moon-mode.glass-soft {
    --card-bg: rgba(14, 17, 48, 0.58);
}

body.glass-strong {
    --card-bg: rgba(255, 248, 230, 0.86);
    --card-border: rgba(255, 190, 80, 0.5);
}

body.moon-mode.glass-strong {
    --card-bg: rgba(14, 17, 48, 0.88);
    --card-border: rgba(110, 90, 210, 0.48);
}

body.fx-paused *,
body.fx-paused *::before,
body.fx-paused *::after {
    animation-play-state: paused !important;
}

/* Formulaire d'ajout */
.add-card {
    padding: 22px 24px;
    position: relative;
    z-index: 30;
}

.add-task-form { display: flex; flex-direction: column; gap: 12px; }

.task-field {
    width: 100%;
    padding: 13px 16px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.6s;
    font-family: inherit;
}

.task-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.task-field::placeholder { color: var(--text-muted); }

.form-bottom { display: flex; gap: 10px; }

.person-select,
.tag-dropdown {
    flex: 1;
    font-size: 14px;
    position: relative;
    min-width: 180px;
    z-index: 1;
}

.tag-dropdown.open {
    z-index: 80;
}

.person-select { max-width: 170px; }

.person-select {
    padding: 11px 14px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: background 0.6s, border-color 0.3s;
    font-family: inherit;
}

.tag-dropdown-btn {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.tag-dropdown-btn span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-dropdown-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

.tag-dropdown-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 90;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px var(--card-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.tag-dropdown.open .tag-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tag-dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.tag-dropdown-option:hover {
    background: var(--input-focus);
}

.tag-dropdown-option input {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--input-border);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.tag-dropdown-option input::before {
    content: "";
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    margin-top: -1px;
    transition: transform 0.14s ease;
}

.tag-dropdown-option input:checked {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.tag-dropdown-option input:checked::before {
    transform: rotate(-45deg) scale(1);
}

.tag-dropdown-option input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.person-select:focus,
.tag-dropdown.open .tag-dropdown-btn,
.tag-dropdown-btn:focus { border-color: var(--accent); }

.btn-add {
    padding: 11px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-add:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 16px var(--tag-glow);
}

.btn-add:active { transform: translateY(1px); }

.divider { height: 1px; background: var(--divider); margin: 14px 0; }

.new-tag-row { display: flex; gap: 10px; }

.tag-field {
    flex: 1;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: background 0.6s, border-color 0.3s;
    font-family: inherit;
}

.tag-field:focus { border-color: var(--accent); }
.tag-field::placeholder { color: var(--text-muted); }

.btn-tag {
    padding: 10px 20px;
    background: var(--btn-secondary);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}

.btn-tag:hover { background: var(--input-focus); transform: translateY(-1px); }

/* ----------------------------------------
   13. Filtres
---------------------------------------- */
.tag-filters,
.person-filters {
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.person-filters {
    margin-top: -4px;
}

.filter-btn {
    padding: 6px 18px;
    background: var(--btn-secondary);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, color 0.2s, border-color 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.filter-btn:hover { transform: translateY(-1px); background: var(--input-focus); }

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 3px 12px var(--tag-glow);
}

/* ----------------------------------------
   14. Liste des tâches
---------------------------------------- */
.task-list { display: flex; flex-direction: column; gap: 10px; }

.task-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 18px var(--card-shadow);
    transition: transform 0.22s, box-shadow 0.22s, background 0.6s, border-color 0.6s, opacity 0.3s;
    cursor: default;
}

.task-card::before,
.task-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.42s ease;
}

.task-card::before {
    width: 190px;
    height: 62px;
    right: -48px;
    top: 12px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 24% 42%, rgba(255,255,255,0.34) 0 22%, transparent 23%),
        radial-gradient(circle at 48% 27%, rgba(255,255,255,0.3) 0 28%, transparent 29%),
        radial-gradient(circle at 71% 47%, rgba(255,255,255,0.24) 0 24%, transparent 25%),
        linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
    filter: blur(0.2px);
    transform: translateX(22px) scale(0.92);
}

.task-card::after {
    inset: 0;
    background:
        radial-gradient(circle at 82% 35%, rgba(255,255,255,0.12), transparent 24%),
        linear-gradient(110deg, transparent 0 48%, rgba(255,255,255,0.07) 58%, transparent 72%);
    transform: translateX(-24px);
}

body.sun-mode .task-card::before {
    width: 118px;
    height: 118px;
    right: -28px;
    top: 50%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255,232,117,0.95) 0 22%, rgba(255,163,53,0.58) 23% 42%, rgba(255,107,53,0.18) 43% 64%, transparent 65%),
        conic-gradient(from 8deg, transparent 0 8deg, rgba(255,196,72,0.42) 9deg 16deg, transparent 17deg 32deg);
    filter: blur(0);
    transform: translate(24px, -50%) scale(0.76) rotate(0deg);
}

body.sun-mode .task-card::after {
    inset: 0;
    background:
        radial-gradient(circle at 88% 50%, rgba(255,217,91,0.34), transparent 28%),
        linear-gradient(100deg, transparent 0 46%, rgba(255,183,77,0.16) 58%, transparent 74%);
    transform: translateX(-18px);
}

body.sun-mode .task-card:hover::before {
    transform: translate(0, -50%) scale(1) rotate(18deg);
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px var(--card-shadow);
}

.task-card:hover::before {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.task-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.task-card > * {
    position: relative;
    z-index: 1;
}

.task-card.task-enter {
    animation: taskIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes taskIn {
    from { opacity: 0; transform: translateY(-14px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.task-card.removing {
    animation: taskOut 0.3s ease forwards;
    pointer-events: none;
}

@keyframes taskOut {
    from { opacity: 1; transform: translateX(0) scale(1);   max-height: 100px; }
    to   { opacity: 0; transform: translateX(50px) scale(0.9); max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; }
}

.task-card.done { background: var(--task-done-bg); opacity: 0.72; }
.task-card.done .task-text { text-decoration: line-through; color: var(--text-muted); }
.task-card.editing { align-items: stretch; }
.task-card.editing:hover { transform: none; }

/* Checkbox */
.task-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
    font-size: 12px;
    color: transparent;
    font-weight: 700;
}

.task-check:hover { border-color: var(--check-color); transform: scale(1.15); }

.task-card.done .task-check {
    background: var(--check-color);
    border-color: var(--check-color);
    color: #fff;
}

.task-check.pop {
    animation: checkPop 0.32s ease;
}

@keyframes checkPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Corps de la tâche */
.task-body { flex: 1; min-width: 0; }

.task-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
    transition: color 0.3s;
}

.task-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.task-tag,
.task-person {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.4px;
}

.task-person {
    background: rgba(255, 107, 181, 0.18);
    color: #d63384;
    border: 1px solid rgba(255, 107, 181, 0.32);
}

.task-date { font-size: 11px; color: var(--text-muted); }

.task-edit-form {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) minmax(120px, 180px);
    gap: 10px;
}

.task-edit-input,
.task-edit-person {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-primary);
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.task-edit-tags {
    width: 100%;
    min-width: 0;
}

.task-edit-tags .tag-dropdown-btn {
    min-height: 36px;
    padding: 8px 10px;
    border-width: 1px;
}

.task-edit-input:focus,
.task-edit-person:focus,
.task-edit-tags.open .tag-dropdown-btn,
.task-edit-tags .tag-dropdown-btn:focus {
    border-color: var(--accent);
    background: var(--input-focus);
}

.task-action {
    width: 34px;
    height: 34px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    cursor: pointer;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.78;
    transition: opacity 0.2s, background 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    color: var(--text-primary);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.task-edit {
    font-size: 13px;
    color: #2f80ed;
}

.task-save {
    color: var(--check-color);
    opacity: 0.95;
}

.task-cancel,
.task-delete {
    color: var(--delete-color);
}

.task-card:hover .task-action,
.task-card.editing .task-action { opacity: 1; }
.task-save:hover {
    opacity: 1 !important;
    background: rgba(46, 204, 113, 0.16);
    border-color: rgba(46, 204, 113, 0.35);
    transform: scale(1.08);
    box-shadow: 0 5px 14px rgba(46, 204, 113, 0.18);
}

.task-edit:hover {
    opacity: 1 !important;
    background: rgba(47, 128, 237, 0.16);
    border-color: rgba(47, 128, 237, 0.36);
    transform: scale(1.08);
    box-shadow: 0 5px 14px rgba(47, 128, 237, 0.18);
}
.task-cancel:hover,
.task-delete:hover {
    opacity: 1 !important;
    background: rgba(192, 57, 43, 0.16);
    border-color: rgba(192, 57, 43, 0.35);
    transform: scale(1.08);
    box-shadow: 0 5px 14px rgba(192, 57, 43, 0.18);
}

/* ----------------------------------------
   15. État vide
---------------------------------------- */
.empty-state {
    padding: 52px 24px;
    text-align: center;
    display: none;
}

.empty-icon {
    font-size: 52px;
    margin-bottom: 16px;
    animation: emptyBounce 3.5s ease-in-out infinite;
}

@keyframes emptyBounce {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50%       { transform: translateY(-10px) rotate(6deg); }
}

.empty-state p    { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.empty-state span { font-size: 13px; color: var(--text-muted); }

/* ----------------------------------------
   16. Couleurs des tags
---------------------------------------- */
.tag-voyage   { background: rgba(91,164,207,.2);  color: #2980b9; border: 1px solid rgba(91,164,207,.35); }
.tag-chill    { background: rgba(130,224,170,.2); color: #27ae60; border: 1px solid rgba(130,224,170,.35); }
.tag-important{ background: rgba(255,107,107,.2); color: #c0392b; border: 1px solid rgba(255,107,107,.35); }
.tag-maison   { background: rgba(243,156,18,.2);  color: #e67e22; border: 1px solid rgba(243,156,18,.35); }
.tag-travail  { background: rgba(155,89,182,.2);  color: #8e44ad; border: 1px solid rgba(155,89,182,.35); }
.tag-custom   { background: rgba(130,120,200,.2); color: #7c6ff7; border: 1px solid rgba(130,120,200,.3); }

body.moon-mode .tag-voyage    { color: #5dade2; background: rgba(93,173,226,.15);  border-color: rgba(93,173,226,.25); }
body.moon-mode .tag-chill     { color: #52be80; background: rgba(82,190,128,.15);  border-color: rgba(82,190,128,.25); }
body.moon-mode .tag-important { color: #ec7063; background: rgba(236,112,99,.15);  border-color: rgba(236,112,99,.25); }
body.moon-mode .tag-maison    { color: #f0b27a; background: rgba(240,178,122,.15); border-color: rgba(240,178,122,.25); }
body.moon-mode .tag-travail   { color: #a569bd; background: rgba(165,105,189,.15); border-color: rgba(165,105,189,.25); }
body.moon-mode .tag-custom    { color: #b39dfa; background: rgba(140,130,220,.18); border-color: rgba(140,130,220,.3); }
body.moon-mode .task-person   { color: #ff8bd1; background: rgba(255,107,181,.14); border-color: rgba(255,107,181,.28); }

/* ----------------------------------------
   17. Responsive
---------------------------------------- */
@media (max-width: 580px) {
    .lock-card   { padding: 38px 26px; }
    .app-header  { padding: 14px 18px; }
    .add-card    { padding: 18px 18px; }
    .form-bottom { flex-direction: column; }
    .person-select { max-width: none; }
    .btn-add     { width: 100%; }
    .task-card   { padding: 13px 15px; }
    .task-action { opacity: 0.9; }
    .task-edit-form { grid-template-columns: 1fr; }
    .header-actions { gap: 6px; }
    .icon-btn { width: 36px; height: 36px; }
    .config-panel {
        top: 74px;
        right: 14px;
        max-height: calc(100vh - 92px);
    }
    .settings-row {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }
    .settings-select { width: 100%; }
    .tag-create-row { grid-template-columns: 1fr 38px; }
    .tag-create-row .btn-tag { grid-column: 1 / -1; }
    .tag-manager-row { grid-template-columns: 1fr 38px 34px 34px; }
    .person-create-row { grid-template-columns: 1fr; }
    .person-manager-row { grid-template-columns: minmax(0, 1fr) 42px 34px; }

    .celestial-wrap {
        top: 16px;
        right: 20px;
        width: 68px;
        height: 68px;
    }
    .sun-core { width: 50px; height: 50px; }
    .moon::before { width: 52px; height: 52px; }
}

/* ----------------------------------------
   18. Scrollbar
---------------------------------------- */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 4px; }

/* ================================================================
   EXTENSIONS VISUELLES — Three.js + FX
================================================================ */

/* ----------------------------------------
   A. Curseur custom
---------------------------------------- */
@media (hover: hover) and (pointer: fine) {
    input[type="text"],
    input[type="password"],
    textarea {
        cursor: text;
    }
}

@media (hover: hover) and (pointer: fine) {
    body,
    button,
    a,
    input[type="button"],
    input[type="submit"],
    .filter-btn,
    .task-card,
    .task-check,
    .task-action,
    .task-delete {
        cursor: var(--paw-cursor);
    }

    body.paw-clicking,
    body.paw-clicking button,
    body.paw-clicking a,
    body.paw-clicking input[type="button"],
    body.paw-clicking input[type="submit"],
    body.paw-clicking .filter-btn,
    body.paw-clicking .task-card,
    body.paw-clicking .task-check,
    body.paw-clicking .task-action,
    body.paw-clicking .task-delete {
        cursor: var(--paw-cursor-closed);
    }
}

.cursor-dot {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #111;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: background 0.3s, transform 0.12s;
    mix-blend-mode: difference;
}

body.moon-mode .cursor-dot {
    background: #fff;
}

.cursor-dot.clicking  { transform: translate(-50%, -50%) scale(0.55); }
.cursor-dot.hovering  { transform: translate(-50%, -50%) scale(1.6); }

.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #111;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    opacity: 0.55;
    transition: border-color 0.3s, width 0.2s, height 0.2s, opacity 0.2s;
}

body.moon-mode .cursor-ring {
    border-color: #fff;
}

.cursor-ring.hovering {
    width: 52px; height: 52px; opacity: 0.35;
}

/* Sparkle trail */
.cursor-trail {
    position: fixed;
    display: none;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    transform: translate(-50%, -50%);
    animation: trailFly 0.65s ease-out forwards;
}

.cursor-trail.trail-star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    border-radius: 0;
}

@keyframes trailFly {
    0%   { opacity: 0.9; transform: translate(calc(-50% + 0px), calc(-50% + 0px)) scale(1); }
    100% { opacity: 0;   transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(0.2); }
}

/* ----------------------------------------
   B. Ripple sur boutons
---------------------------------------- */
.ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0);
    animation: rippleOut 0.65s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleOut {
    to { transform: scale(1); opacity: 0; }
}

/* ----------------------------------------
   C. Progress ring SVG
---------------------------------------- */
.progress-ring {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--card-border);
    stroke-width: 3;
    transition: stroke 0.5s;
}

.ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke 0.5s;
    filter: drop-shadow(0 0 4px var(--accent));
}

/* ----------------------------------------
   D. Task card — will-change & tilt support
---------------------------------------- */
.task-card {
    will-change: transform;
    transform-style: preserve-3d;
    background-image: none; /* overridden by FX shimmer */
}

/* Disable CSS hover transform when JS tilt is active (handled by FX) */
@media (hover: hover) and (pointer: fine) {
    .task-card:hover {
        transform: none; /* FX.js handles it */
        box-shadow: 0 4px 18px var(--card-shadow);
    }
}

/* ----------------------------------------
   E. App title — gradient animé
---------------------------------------- */
.app-title {
    background: linear-gradient(90deg, var(--accent), #ff9a44, var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradShift 4s linear infinite;
}

body.moon-mode .app-title {
    background: linear-gradient(90deg, #8B7CF8, #b39dfa, #64b5f6, #8B7CF8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradShift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ----------------------------------------
   F. Glow ambiant sur les cartes (moon)
---------------------------------------- */
body.moon-mode .glass-card {
    box-shadow:
        0 8px 32px var(--card-shadow),
        0 0 0 1px rgba(139, 124, 248, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.moon-mode .task-card:not(.done) {
    box-shadow:
        0 4px 18px var(--card-shadow),
        0 0 20px rgba(100, 80, 220, 0.08);
}

body.moon-mode .btn-add,
body.moon-mode .btn-unlock {
    box-shadow: 0 4px 18px rgba(139, 124, 248, 0.4), 0 0 30px rgba(100, 80, 220, 0.2);
}

/* ----------------------------------------
   G. Lock screen — halo derrière la carte
---------------------------------------- */
.lock-screen::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,180,60,.18) 0%, transparent 70%);
    pointer-events: none;
    transition: background 1.2s;
}

body.moon-mode .lock-screen::before {
    background: radial-gradient(circle, rgba(139,124,248,.18) 0%, transparent 70%);
}

/* ----------------------------------------
   H. Header — boutons icône refonte
---------------------------------------- */
.icon-btn {
    will-change: transform;
    transition: background 0.2s, box-shadow 0.2s; /* transform géré par FX magnétisme */
}

/* ----------------------------------------
   I. Filter-btn — shimmer au hover
---------------------------------------- */
.filter-btn.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    pointer-events: none;
}

.filter-btn { position: relative; overflow: hidden; }

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ----------------------------------------
   J. Responsive additions
---------------------------------------- */
@media (max-width: 580px) {
    .progress-ring { width: 34px; height: 34px; }
    .cursor-dot, .cursor-ring { display: none; }
}
