
        :root {
            --dark-text: #222222;
            --blue-accent: #1e4b98;
            --blue-light-gradient: rgba(69, 117, 237, 0.25);
            --yellow-dots: #fccf4d;
            --grey-text: #555555;
            --bg-app: #f4f7fb;
            --surface: #ffffff;
            --danger: #d32f2f;
            --success: #28a745;
            --warning: #f59e0b;
        }

        body { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background-color: var(--bg-app); margin: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; color: var(--dark-text);}

        /* --- NAVBARS --- */
        .navbar { background-color: var(--surface); padding: 15px 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; z-index: 1000; }
        
        #landing-nav { position: fixed; top: 0; width: 100%; background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-sizing: border-box;}
        
        .logo { font-size: 22px; font-weight: 800; color: var(--blue-accent); display: flex; align-items: center; gap: 10px; cursor: pointer;}
        .nav-links { display: flex; gap: 10px; }
        .nav-btn { background: none; border: none; font-size: 15px; font-weight: 600; color: var(--grey-text); cursor: pointer; padding: 10px 15px; border-radius: 6px; transition: 0.2s; font-family: inherit;}
        .nav-btn:hover, .nav-btn.active { color: var(--blue-accent); background-color: #edf2f7; }

        .btn-back { background: none; border: none; color: var(--grey-text); font-size: 15px; font-weight: 600; cursor: pointer; padding: 10px 0; display: flex; align-items: center; gap: 8px; transition: 0.2s; margin-bottom: 20px; font-family: inherit;}
        .btn-back:hover { color: var(--blue-accent); }

        /* --- VIEWS CONTAINER --- */
        .view { display: none; width: 100%; height: calc(100vh - 70px); overflow-y: auto; overflow-x: hidden; box-sizing: border-box; }
        .view.active { display: block; }
        #landing-view.active { height: 100vh; }
        
        /* Les pages d'authentification partagent le même style de centrage */
        #login-view.active, #signup-view.active, #verify-email-view.active { 
            height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg-app); 
        }
        
        #home-view.active { display: flex; flex-direction: column; align-items: center; padding: 60px 20px;}

        /* =========================================================
           --- LANDING PAGE --- 
        ========================================================= */
        .container-lp { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
        
        .hero { padding: 50px 0 60px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%); min-height: 75vh; box-sizing: border-box;}
        .hero-text { flex: 1; min-width: 300px; padding-right: 40px; }
        .hero h1 { font-size: 3.5rem; line-height: 1.15; margin-bottom: 25px; font-weight: 900; color: var(--dark-text); letter-spacing: -1px;}
        
        .highlight { color: var(--blue-accent); position: relative; z-index: 1; white-space: nowrap;}
        .highlight::after { content: ''; position: absolute; bottom: 8px; left: 0; width: 100%; height: 14px; background: var(--yellow-dots); z-index: -1; opacity: 0.9; transform: rotate(-1deg); border-radius: 4px;}
        
        .hero p { font-size: 1.15rem; color: var(--grey-text); margin-bottom: 40px; line-height: 1.6; max-width: 500px;}
        
        .landing-btn { background: var(--blue-accent); color: white; font-size: 16px; font-weight: 800; padding: 16px 32px; border-radius: 50px; border: none; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 12px; font-family: inherit; box-shadow: 0 10px 20px rgba(30, 75, 152, 0.2);}
        .landing-btn:hover { background: #153670; transform: translateY(-3px); box-shadow: 0 15px 25px rgba(30, 75, 152, 0.3); }

        .hero-visual { flex: 1; min-width: 350px; display: flex; justify-content: center; align-items: center; padding: 40px 20px; perspective: 1200px; }
        
        .card-mockup.print-page { margin: 0; transform: rotateY(-15deg) rotateX(5deg) scale(0.7) translateX(-10px); transform-origin: center center; transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: -15px 25px 40px -15px rgba(0, 0, 0, 0.2); border: 1px solid #e0e0e0; cursor: default;}
        .card-mockup.print-page:hover { transform: rotateY(0deg) rotateX(0deg) scale(0.8) translateX(0); box-shadow: 0 35px 60px -15px rgba(30, 75, 152, 0.25); z-index: 10; border-color: var(--blue-accent);}

        .section-lp { padding: 100px 0; background: white; }
        .section-title { text-align: center; margin-bottom: 60px; }
        .section-title h2 { font-size: 2.5rem; font-weight: 900; color: var(--dark-text); margin: 0 0 15px 0; letter-spacing: -0.5px;}
        .section-title p { font-size: 1.15rem; color: var(--grey-text); max-width: 600px; margin: 0 auto;}
        
        .landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px; }
        .feature-card { background: var(--surface); padding: 40px 30px; border-radius: 16px; border: 1px solid #eef2f5; transition: all 0.3s ease; }
        .feature-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); border-color: var(--blue-accent); }
        .feature-card i { font-size: 28px; color: var(--blue-accent); background: #eef2f5; width: 60px; height: 60px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; margin-bottom: 25px; transition: 0.3s;}
        .feature-card:hover i { background: var(--blue-accent); color: white; transform: scale(1.05); }
        .feature-card h3 { font-size: 1.25rem; font-weight: 800; color: var(--dark-text); margin: 0 0 15px 0; }
        .feature-card p { font-size: 0.95rem; color: var(--grey-text); line-height: 1.6; margin: 0; }

        /* --- LOGIN & SIGNUP BOX --- */
        .login-box { background: var(--surface); padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; width: 100%; max-width: 400px; border: 1px solid #e0e0e0; }
        .login-box h2 { margin: 0 0 10px 0; font-size: 24px; font-weight: 800; color: var(--blue-accent); }
        .login-box p { color: var(--grey-text); margin-bottom: 25px; line-height: 1.4; font-size: 14px;}
        .login-box input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; box-sizing: border-box; transition: 0.3s; font-weight: bold; font-family: inherit;}
        .login-box input:focus { border-color: var(--blue-accent); outline: none; }
        .field-help { margin: -8px 0 12px 0; font-size: 12px; color: #64748b; font-weight: 700; text-align: left; line-height: 1.35; }
        .field-error { color: var(--danger); margin-top: -10px; display: none; }
        .field-error.show { display: block; }
        .field-suggestions { display:none; margin:-6px 0 12px 0; text-align:left; }
        .field-suggestions.show { display:block; }
        .suggestion-chip { display:inline-block; background:#eef2f5; color:#334155; border:1px solid #dbe3ee; padding:5px 9px; border-radius:20px; font-size:11px; font-weight:800; cursor:pointer; margin:0 6px 6px 0; }
        .suggestion-chip:hover { background:#e2e8f0; }
        .login-box button { background: var(--blue-accent); color: white; width: 100%; border: none; padding: 14px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 15px; transition: 0.2s; font-family: inherit; margin-bottom: 10px;}
        .login-box button:hover { background: #153670; }

        /* =========================================================
           --- HOME VIEW --- 
        ========================================================= */
        .home-title { font-size: 38px; font-weight: 800; color: var(--blue-accent); margin-bottom: 12px; margin-top: 0; text-align: center;}
        .home-subtitle { font-size: 17px; color: var(--grey-text); margin-bottom: 65px; text-align: center;}
        
        .action-cards { display: flex; gap: 36px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 1200px; margin: 0 auto;}
        
        .action-card { 
            background: var(--surface); padding: 52px 36px; border-radius: 18px; 
            box-shadow: 0 6px 18px rgba(0,0,0,0.03); width: 340px; min-height: 230px; cursor: pointer; 
            transition: 0.3s; display: flex; flex-direction: column; align-items: center; 
            border: 1px solid #e0e0e0; box-sizing: border-box;
        }
        .action-card:hover { transform: translateY(-6px); border-color: var(--blue-accent); box-shadow: 0 14px 30px rgba(0,0,0,0.08);}
        
        .action-card h3 { margin: 0 0 16px 0; font-size: 20px; font-weight: 800; color: var(--blue-accent); text-transform: uppercase;}
        
        .ac-divider { width: 100%; height: 1px; background-color: #e2e8f0; margin: 0 0 20px 0; }
        
        .action-card p { color:var(--grey-text); font-size:15px; margin:0 0 30px 0; line-height: 1.45; text-align: center;}
        
        .ac-icon-wrapper { background-color: #f4f7fb; width: 74px; height: 74px; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: 0.3s; }
        .action-card:hover .ac-icon-wrapper { background-color: #eef2f5; }
        .ac-icon-wrapper i { font-size: 28px; color: var(--blue-accent); }

        /* --- PROFILE VIEW --- */
        #profile-view { padding: 40px 5%; width: 100%; max-width: none; margin: 0; box-sizing: border-box; }
        .profile-page-title { margin-bottom: 16px; }
        .profile-zone-title {
            margin: 18px 0 10px 0;
            font-size: 13px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .4px;
            color: var(--blue-accent);
        }
        .profile-top-actions { display:flex; gap:10px; flex-wrap:wrap; }
        .profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; padding: 22px; border: 1px solid #e2e8f0; border-radius: 14px; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
        .profile-header-social {
            margin-left: auto;
            align-self: flex-start;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        .profile-social-pill {
            background: #f1f5ff;
            border: 1px solid #c7d6f6;
            color: #1e3a8a;
            border-radius: 999px;
            padding: 6px 10px;
            min-width: 112px;
            text-align: center;
            cursor: pointer;
            transition: .18s ease;
        }
        .profile-social-pill:hover { transform: translateY(-1px); background:#e8efff; border-color:#9fb8f0; }
        .profile-social-pill:active { transform: translateY(0); }
        .profile-social-pill .s-label { font-size: 10px; text-transform: uppercase; letter-spacing: .3px; font-weight: 800; opacity: .85; }
        .profile-social-pill .s-value { font-size: 16px; font-weight: 900; line-height: 1.1; margin-top: 2px; }
        .social-list-wrap { display:flex; flex-direction:column; gap:10px; max-height: 400px; overflow-y: auto; overflow-x: hidden; padding-right:4px; }
        .social-popup-card {
            min-height: 78px;
            padding: 10px 12px;
            border: 1px solid #dbe3ee;
            border-left: 4px solid var(--blue-accent);
            border-radius: 12px;
            background: var(--surface);
            display: flex;
            align-items: center;
        }
        .social-popup-row { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; }
        .social-popup-left { display:flex; align-items:center; gap:10px; min-width:0; }
        .social-popup-meta { font-size:11px; color:var(--grey-text); font-weight:700; line-height:1.25; }
        .social-popup-actions { display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-shrink:0; }
        .social-mini-btn {
            border: none;
            border-radius: 8px;
            padding: 8px 14px;
            font-size: 12px;
            font-weight: 800;
            font-family: inherit;
            cursor: pointer;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            height: 36px;
            flex: 0 0 auto;
            align-self: center;
        }
        .social-mini-btn.view { background: var(--blue-accent); color: #fff; padding: 0; width: 56px; min-width: 56px; max-width: 56px; height: 36px; font-size: 11px; border: none; }
        .social-mini-btn.view:hover { background: #153670; }
        .social-mini-btn.unfollow { background: #fef2f2; color: var(--danger); border: none; }
        .social-mini-btn.unfollow:hover { background: var(--danger); color: white; }
        .social-mini-btn.moi { background: #e2e8f0; color: #334155; cursor: default; }
        .social-popup-actions .social-mini-btn.view { order: 1; }
        .social-popup-actions .social-mini-btn.unfollow,
        .social-popup-actions .social-mini-btn.moi { order: 2; }
        .social-list-empty { color:var(--grey-text); text-align:center; padding:10px 0; }
        .avatar { width: 80px; height: 80px; background: var(--blue-accent); color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 30px; font-weight: bold; }
        .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
        .stat-card { background: var(--surface); padding: 20px; border-radius: 12px; text-align: center; border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,0.02);}
        .stat-number { font-size: 34px; font-weight: 800; color: var(--blue-accent); margin: 8px 0 0 0; }
        .profile-layout-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 8px; }
        .profile-plan-grid { grid-template-columns: 1.2fr 1fr; }
        .profile-activity-grid { grid-template-columns: 1fr 1fr; }
        .profile-panel { background: var(--surface); border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px; box-shadow: 0 3px 10px rgba(0,0,0,0.03); }
        .profile-panel h3 { margin-top: 0; font-size: 15px; border: none; padding: 0; text-transform: uppercase; letter-spacing: .4px; color: var(--blue-accent); }
        .profile-kpi-row { display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
        .profile-kpi { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:10px; }
        .profile-kpi .k-label { font-size:11px; color:var(--grey-text); font-weight:800; text-transform:uppercase; }
        .profile-kpi .k-value { font-size:19px; color:var(--dark-text); font-weight:900; margin-top:4px; }
        .profile-overview-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; margin-top:12px; }
        .profile-overview-card {
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #dbe3ee;
            border-radius: 12px;
            padding: 12px;
            min-height: 92px;
            box-shadow: 0 2px 6px rgba(15,23,42,0.05);
            display:flex;
            flex-direction:column;
            justify-content:flex-start;
        }
        .profile-overview-card .ov-label {
            font-size: 10px;
            color: #475569;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .25px;
            line-height: 1.3;
        }
        .profile-overview-card .ov-value {
            margin-top: 6px;
            font-size: 24px;
            color: #0f172a;
            font-weight: 900;
            line-height: 1;
            text-align: center;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .profile-overview-card.primary { border-color:#bfd2f6; background:linear-gradient(180deg, #f5f9ff 0%, #ecf3ff 100%); }
        .profile-overview-card.primary .ov-label { color:#33588f; }
        .profile-overview-card.primary .ov-value { color:#1e3a8a; }
        .profile-overview-card.last-activity {
            grid-column: 1 / -1;
            min-height: 42px;
            padding: 7px 12px;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
        }
        .profile-overview-card.last-activity .ov-label {
            margin: 0;
            line-height: 1;
            white-space: nowrap;
        }
        .profile-overview-card.last-activity .ov-value {
            margin: 0;
            flex: 0;
            display: block;
            font-size: 18px;
            line-height: 1;
            text-align: right;
            white-space: nowrap;
        }
        .profile-list { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
        .profile-item { border:1px solid #e2e8f0; border-radius:10px; padding:10px 12px; display:flex; justify-content:space-between; gap:10px; align-items:center; background:#fcfdff; }
        .profile-item.upcoming-day { background:#eaf1ff; border-color:#bfd3f5; }
        .profile-item-title { font-weight:800; color:var(--dark-text); font-size:13px; }
        .profile-item-sub { font-size:12px; color:var(--grey-text); font-weight:700; }
        .profile-badge { font-size:11px; font-weight:800; padding:4px 8px; border-radius:20px; background:#eef2f5; color:#334155; white-space:nowrap; }
        .profile-actions { display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
        .profile-action-btn { border:none; border-radius:8px; padding:10px 14px; cursor:pointer; font-weight:800; font-family:inherit; font-size:13px; }
        .profile-action-primary { background:var(--blue-accent); color:white; }
        .profile-action-soft { background:#eef2f5; color:#334155; }
        .profile-action-soft:hover { background:#e2e8f0; }
        .profile-logout-btn { background:#fee2e2; color:var(--danger); border:none; padding:10px 16px; border-radius:8px; cursor:pointer; font-weight:800; font-family:inherit; }
        .profile-heat { margin-top:12px; display:grid; gap:8px; }
        .profile-heat-row { display:grid; grid-template-columns: 100px 1fr auto; gap:10px; align-items:center; }
        .profile-heat-label { font-size:12px; color:var(--grey-text); font-weight:800; }
        .profile-heat-bar { height:10px; border-radius:999px; background:#e5eaf1; overflow:hidden; }
        .profile-heat-fill { height:100%; background: linear-gradient(90deg, #4f7cd6 0%, #1e4b98 100%); border-radius:999px; }
        .profile-heat-val { font-size:12px; color:var(--dark-text); font-weight:900; min-width:38px; text-align:right; }
        .profile-chart { margin-top: 14px; display:flex; gap:8px; align-items:flex-end; height:120px; }
        .profile-chart-col { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:6px; }
        .profile-chart-bar { width:100%; border-radius:8px 8px 4px 4px; background: linear-gradient(180deg, #5d86db 0%, #1e4b98 100%); min-height: 6px; }
        .profile-chart-label { font-size:10px; color:var(--grey-text); font-weight:800; text-transform: uppercase; letter-spacing:.2px; }
        .profile-chart-value { font-size:10px; color:#334155; font-weight:800; }
        .avatar.has-image { background-size: cover; background-position: center; color: transparent; }
        .profile-inline-meta { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
        .profile-chip { font-size:11px; font-weight:800; color:#334155; background:#eef2f5; padding:4px 8px; border-radius:20px; }
        @media (max-width: 1024px) {
            .stats-grid { grid-template-columns: repeat(2, 1fr); }
            .profile-layout-grid { grid-template-columns: 1fr; }
            .profile-kpi-row { grid-template-columns: 1fr 1fr; }
            .profile-overview-grid { grid-template-columns: 1fr 1fr; }
        }
        @media (max-width: 640px) {
            .profile-header { flex-wrap: wrap; }
            .stats-grid { grid-template-columns: 1fr; }
            .profile-kpi-row { grid-template-columns: 1fr; }
            .profile-overview-grid { grid-template-columns: 1fr; }
        }

        /* --- GALLERY VIEW (PLANS & PROGRAMS) --- */
        #gallery-view, #programs-view, #community-view, #calendar-view { padding: 40px 5%; width: 100%; text-align: left; box-sizing: border-box; }
        .gallery-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .gallery-header h2 { font-size: 24px; font-weight: 800; margin: 0; color: var(--blue-accent);}
        
        .filters { display: flex; gap: 10px; margin-bottom: 30px; overflow-x: auto; padding-bottom: 10px; justify-content: flex-start; }
        .filter-btn { padding: 8px 16px; border: 1px solid #ddd; background: var(--surface); border-radius: 20px; cursor: pointer; font-weight: 600; color: var(--grey-text); transition: 0.2s; white-space: nowrap; font-size: 13px; font-family: inherit;}
        .filter-btn.active, .filter-btn:hover { background: var(--blue-accent); color: white; border-color: var(--blue-accent); }
        
        .plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
        @media (max-width: 1024px) { .plans-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 768px) { .plans-grid { grid-template-columns: 1fr; } }

        /* --- COMMUNITY REFINEMENTS --- */
        #community-view .gallery-header { margin-bottom: 24px; }
        #community-view #community-search-results:empty { margin-bottom: 0 !important; }
        #community-view #community-tabs { margin-bottom: 12px !important; }
        #community-view #community-category-filters { margin-bottom: 28px !important; }
        #community-view #community-dashboard-grid { align-items: stretch; }
        #community-view .plan-card { transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
        #community-view .plan-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,0.08); border-color: #cfd8e3; }
        #community-view .plan-card .plan-card-actions { margin-top: auto; }
        #community-view .plan-card .btn-action { min-height: 36px; }
        .community-author { display:flex; align-items:center; gap:10px; margin: 0 0 12px 0; }
        .community-author-avatar { width:30px; height:30px; border-radius:50%; background: var(--blue-accent); color:white; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:900; }
        .community-author-name { font-size:12px; font-weight:800; color: var(--grey-text); text-transform: uppercase; letter-spacing: 0.3px; }
        .community-search-clear { position:absolute; right:10px; top:50%; transform:translateY(-50%); border:none; background:#eef2f5; color:#475569; width:22px; height:22px; border-radius:50%; cursor:pointer; display:none; align-items:center; justify-content:center; font-size:11px; }
        .community-search-clear:hover { background:#e2e8f0; }
        .community-search-cancel { display:none; white-space:nowrap; border:none; background:#f1f5f9; color:#334155; padding:10px 14px; border-radius:8px; cursor:pointer; font-weight:700; font-family:inherit; }
        .community-search-cancel:hover { background:#e2e8f0; }
        .community-suggest-card {
            min-height: 84px !important;
            padding: 12px 14px !important;
            border-left-color: var(--warning);
            display:flex;
            align-items:center;
        }
        .community-suggest-row { display:flex; align-items:center; gap:10px; justify-content:space-between; width:100%; }
        .community-suggest-left { display:flex; align-items:center; gap:10px; min-width:0; }
        .community-suggest-meta { font-size:11px; color:var(--grey-text); font-weight:700; line-height:1.25; }

        .skeleton-card { border-left-color: #cbd5e1 !important; }
        .skeleton-line { background: linear-gradient(90deg, #eef2f7 25%, #e4e9f1 37%, #eef2f7 63%); background-size: 400% 100%; animation: shimmer 1.15s ease-in-out infinite; border-radius: 6px; }
        .skeleton-line.lg { height: 16px; width: 70%; margin-bottom: 10px; }
        .skeleton-line.md { height: 12px; width: 45%; margin-bottom: 16px; }
        .skeleton-line.sm { height: 11px; width: 30%; margin-bottom: 12px; }
        .skeleton-actions { display:flex; gap:10px; border-top:1px solid #eee; padding-top:15px; }
        .skeleton-btn { flex:1; height:36px; border-radius:6px; }
        .like-count-pop { animation: likePop 0.22s ease-out; }
        .like-heart-pop { animation: heartPop 0.28s ease-out; }
        .like-btn-liked { background:#fee2e2 !important; color:#991b1b !important; }

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

        @keyframes likePop {
            0% { transform: scale(1); }
            40% { transform: scale(1.22); }
            100% { transform: scale(1); }
        }

        @keyframes heartPop {
            0% { transform: scale(1); }
            45% { transform: scale(1.28); }
            100% { transform: scale(1); }
        }

        .plan-card { background: var(--surface); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; border: 1px solid #e0e0e0; border-left: 5px solid var(--blue-accent); box-shadow: 0 2px 8px rgba(0,0,0,0.03);}
        .card-top { padding-left: 5px; }
        .plan-card-title { font-weight: 800; font-size: 18px; margin: 0 0 5px 0; color: var(--dark-text); line-height: 1.2;}
        .plan-card-sub { color: var(--grey-text); font-weight: normal; font-size: 13px; margin: 0 0 15px 0; word-wrap: break-word; overflow-wrap: break-word; white-space: pre-wrap; line-height: 1.4;}
        .difficulty-badges { display:flex; align-items:center; gap:6px; }
        .difficulty-label { font-size:12px; color:var(--grey-text); font-weight:500; margin-right:4px; }
        .difficulty-dot { width:10px; height:10px; border-radius:50%; background:#e2e8f0; border:1px solid #d1d5db; }
        .difficulty-dot.active { background: var(--yellow-dots); border-color:#eab308; }
        .difficulty-dots-inline { display:inline-flex; align-items:center; gap:4px; vertical-align:middle; }
        .difficulty-dot.small { width:8px; height:8px; }
        .difficulty-filter-row { display:flex; align-items:center; gap:10px; margin: -16px 0 24px 0; flex-wrap:wrap; }
        .difficulty-filter-title { font-size:12px; color:var(--grey-text); font-weight:700; text-transform:uppercase; letter-spacing:.3px; }
        .difficulty-filter-btn { padding:7px 12px; border:1px solid #dbe3ee; background:var(--surface); border-radius:16px; cursor:pointer; font-weight:700; color:#475569; font-size:12px; font-family:inherit; transition:.2s; }
        .difficulty-filter-btn:hover { border-color:#b6c4da; background:#f8fafc; }
        .difficulty-filter-btn.active { background:#eaf1ff; border-color:#93b4f3; color:var(--blue-accent); }
        
        .badges-container { display: flex; gap: 8px; margin-bottom: 12px; }
        .badge-cat { font-size: 11px; padding: 4px 8px; border-radius: 4px; background: #eef2f5; font-weight: bold; color: var(--dark-text);}
        .badge-vis { font-size: 11px; padding: 4px 8px; border-radius: 4px; font-weight: bold; cursor: pointer; transition: 0.2s;}
        .vis-public { background: #dcfce7; color: #065f46; }
        .vis-perso { background: #fee2e2; color: #991b1b; }
        .badge-vis:hover { filter: brightness(0.9); }

        .plan-card-meta { font-size: 12px; color: var(--grey-text); margin-bottom: 20px; display: flex; justify-content: space-between; font-weight: 600;}
        .plan-card-actions { display: flex; gap: 10px; border-top: 1px solid #eee; padding-top: 15px; }
        .btn-action { flex: 1; padding: 8px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 13px; font-family: inherit;}
        .btn-primary { background: var(--blue-accent); color: #ffffff; }
        .btn-primary:hover { background: #153670; color: #ffffff; }
        .btn-print { background: #f1f5f9; color: var(--blue-accent); }
        .btn-print:hover { background: var(--blue-accent); color: white; }
        .btn-neutral { background:#f1f5f9; color:#334155; }
        .btn-neutral:hover { background:#334155; color:#ffffff; }
        .btn-delete { background: #fef2f2; color: var(--danger); }
        .btn-delete:hover { background: var(--danger); color: white; }

        /* --- ÉDITEUR (PLANS & PROGRAMS) --- */
        #editor-view { display: flex !important; flex-direction: row; text-align: left; height: 100vh; }
        #editor-view:not(.active) { display: none !important; }
        .editor-panel { width: 40%; padding: 30px; background: white; overflow-y: auto; z-index: 10; box-shadow: 2px 0 10px rgba(0,0,0,0.1);}
        h1.app-title { margin-top: 0; color: var(--blue-accent); font-size: 22px; border-bottom: 2px solid var(--blue-accent); padding-bottom: 12px; margin-bottom: 20px; font-weight: 800;}
        h3 { color: var(--blue-accent); margin-top: 25px; border-bottom: 1px solid #eee; padding-bottom: 5px; font-size: 15px; text-transform: uppercase; font-weight: 800;}
        .editor-section { border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; margin-bottom: 20px; background-color: #fff; position: relative; }
        .editor-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
        .section-controls { display: flex; gap: 5px; }
        .form-group { margin-bottom: 15px; }
        label { display: block; font-size: 12px; font-weight: bold; margin-bottom: 5px; color: var(--dark-text); text-transform: uppercase;}
        input[type="text"], input[type="number"], select, textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; font-size: 14px; font-family: inherit; font-weight: bold; transition: 0.2s; color: var(--dark-text);}
        input:focus, select:focus, textarea:focus { border-color: var(--blue-accent); outline: none; }
        .difficulty-control { display: flex; gap: 10px; cursor: pointer; }
        .diff-dot-btn { width: 25px; height: 25px; border-radius: 50%; border: 2px solid #ddd; background-color: white; display: flex; justify-content: center; align-items: center; font-size: 10px; color: #ccc; font-weight: bold;}
        .diff-dot-btn.active { background-color: var(--yellow-dots); border-color: #eab308; color: var(--dark-text); }
        .btn-icon { background: #eef2f5; border: none; cursor: pointer; color: var(--dark-text); width: 28px; height: 28px; border-radius: 4px; display: flex; justify-content: center; align-items: center; transition: all 0.2s; }
        .btn-icon:hover { background-color: #e0e0e0; }
        .btn-icon.danger:hover { background-color: #fee2e2; color: var(--danger); }
        .btn-main-add { background-color: var(--success); color: white; width: 100%; padding: 12px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; margin-bottom: 20px; font-size: 14px; font-family: inherit;}
        .btn-main-add:hover { background-color: #218838; }
        .row-inputs { display: grid; grid-template-columns: 0.6fr 1fr 2fr 30px; gap: 8px; margin-bottom: 8px; align-items: center; }
        button.btn-save-plan { background-color: var(--blue-accent); color: white; border: none; padding: 15px 25px; font-size: 15px; font-weight: bold; border-radius: 8px; cursor: pointer; width: 100%; margin-top: 20px; transition: 0.3s; font-family: inherit;}
        button.btn-save-plan:hover { background-color: #153670; }

        .preview-panel { width: 60%; background-color: #555555; display: flex; flex-direction: column; align-items: center; padding: 40px; overflow-y: auto; }
        #print-area { display: flex; flex-direction: column; gap: 30px; padding-bottom: 50px; }

        /* --- PROGRAM EDITOR & VIEWER --- */
        #program-editor-view, #program-detail-view { padding: 40px 5%; width: 100%; box-sizing: border-box; text-align: left; }
        #program-editor-view .program-container, #program-detail-view .program-container { max-width: 1200px; margin: 0 auto; }
        .program-container { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid #e0e0e0;}
        .program-week-header { font-size: 16px; font-weight: 800; color: var(--blue-accent); margin-bottom: 10px; padding-bottom: 5px; border-bottom: 2px solid #eee; display:flex; justify-content: space-between; align-items:center;}
        .program-day-row { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; background: #f9f9f9; padding: 10px 12px; border-radius: 6px; border: 1px solid #eee;}
        .program-day-label { font-weight: bold; color: var(--blue-accent); width: 65px; text-transform: uppercase; font-size: 11px;}

        /* --- STYLE DE LA CARTE (A6) --- */
        .print-page { background-color: white; width: 105mm; height: 148mm; padding: 10mm; box-sizing: border-box; position: relative; overflow: hidden; color: var(--dark-text); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; transform: scale(1.2); transform-origin: top center; box-shadow: 0 10px 20px rgba(0,0,0,0.3); margin-bottom: 30mm; page-break-after: always; text-align: left; border-radius: 2px;}
        .print-page::before { content: ''; position: absolute; top: 30%; right: -20%; width: 80mm; height: 80mm; background: radial-gradient(circle, var(--blue-light-gradient) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; pointer-events: none; z-index: 0; }
        .badge { position: absolute; top: 10mm; right: 0; background-color: var(--blue-accent); color: white; border-top-left-radius: 5mm; border-bottom-left-radius: 5mm; width: 8mm; height: auto; padding: 3mm 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; z-index: 2; }
        .badge-dots { display: flex; flex-direction: column; gap: 1.5mm; margin-bottom: 2mm; }
        .dot { width: 3mm; height: 3mm; background-color: rgba(255,255,255,0.3); border-radius: 50%; }
        .dot.active { background-color: var(--yellow-dots); box-shadow: 0 0 2px rgba(0,0,0,0.2); }
        .badge-text { writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); font-weight: bold; font-size: 10px; letter-spacing: 1px; white-space: nowrap; margin-top: 1mm; }
        .header { margin-bottom: 5mm; padding-right: 15mm; position: relative; z-index: 1;}
        .pdf-logo { display:flex; align-items:center; gap:6px; margin-bottom: 2.5mm; color: var(--blue-accent); font-size: 8.5pt; font-weight: 900; text-transform: uppercase; letter-spacing: 0.4px; }
        h1.card-title { font-size: 16pt; font-weight: 800; margin: 0; line-height: 1.1; text-transform: uppercase; color: #111; letter-spacing: -0.5px;}
        h2.card-subtitle { font-size: 10pt; color: var(--blue-accent); margin: 3px 0 0 0; font-weight: 800; text-transform: uppercase;}
        .content-area { position: relative; z-index: 1; }
        .section-wrapper { margin-bottom: 3mm; }
        .section-title-print { font-size: 9pt; font-weight: 800; text-transform: uppercase; margin-bottom: 2.5mm; border-bottom: 1px solid #eee; padding-bottom: 1mm; color: #333;}
        .workout-row { display: flex; align-items: baseline; margin-bottom: 1.8mm; font-size: 9pt; line-height: 1.3; }
        .w-num { width: 6mm; color: #777; font-weight: bold;}
        .w-type { width: 12mm; font-weight: 800; color: #111;}
        .w-dist { width: 18mm; font-weight: 600; color: #333;}
        .w-notes { flex: 1; font-size: 7.5pt; color: #666; font-weight: 500; }
        .footer { position: absolute; bottom: 8mm; left: 10mm; right: 10mm; display: flex; justify-content: space-between; align-items: flex-end; border-top: 2px solid #eee; padding-top: 2.5mm; z-index: 1; }
        .footer-stats { font-size: 9pt; font-weight: 800; display: flex; gap: 5mm; align-items: center; color: #333;}
        .page-indicator { color: var(--blue-accent); font-size: 8pt; font-weight: bold;}
        .page-number { font-size: 20pt; color: var(--blue-accent); font-weight: 900; line-height: 0.9; }

        /* Notification */
        .toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: var(--dark-text); color: white; padding: 12px 25px; border-radius: 50px; font-weight: bold; transition: 0.3s; z-index: 1000; display: flex; align-items: center; gap: 10px; font-size: 14px;}
        .toast i { color: var(--success); font-size: 16px;}
        .toast.show { bottom: 30px; }
        .confirm-modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 20px; box-sizing: border-box; }
        .confirm-modal-overlay.show { display: flex; }
        .confirm-modal { width: 100%; max-width: 430px; background: var(--surface); border-radius: 14px; border: 1px solid #e2e8f0; box-shadow: 0 20px 40px rgba(0,0,0,0.2); padding: 22px; }
        .confirm-modal-title { margin: 0 0 8px 0; color: var(--dark-text); font-size: 20px; font-weight: 900; }
        .confirm-modal-text { margin: 0 0 20px 0; color: var(--grey-text); font-size: 14px; line-height: 1.5; font-weight: 600; }
        .confirm-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
        .btn-confirm-cancel { border: none; background: #f1f5f9; color: #334155; padding: 10px 14px; border-radius: 8px; font-weight: 800; cursor: pointer; font-family: inherit; }
        .btn-confirm-danger { border: none; background: var(--danger); color: white; padding: 10px 14px; border-radius: 8px; font-weight: 800; cursor: pointer; font-family: inherit; }
        .btn-confirm-save { border: none; background: var(--blue-accent); color: white; padding: 10px 14px; border-radius: 8px; font-weight: 800; cursor: pointer; font-family: inherit; }
        .profile-edit-grid { display:grid; gap:12px; margin-top:8px; }
        .planner-controls { display:grid; gap:10px; margin-top:10px; }
        .planner-days { display:flex; gap:8px; flex-wrap:wrap; }
        .planner-day-btn { border:1px solid #dbe3ee; background:#f8fafc; color:#334155; padding:7px 10px; border-radius:20px; font-size:12px; font-weight:800; cursor:pointer; font-family:inherit; }
        .planner-day-btn.active { background: var(--blue-accent); color:white; border-color: var(--blue-accent); }
        .planner-summary { margin-top:12px; border:1px solid #e2e8f0; background:#fcfdff; border-radius:10px; padding:12px; }
        .planner-summary-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:10px; margin-top:8px; }
        .planner-metric { background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:10px; text-align:center; }
        .planner-metric .m-label { font-size:11px; color:var(--grey-text); font-weight:800; text-transform:uppercase; }
        .planner-metric .m-value { font-size:18px; color:var(--dark-text); font-weight:900; margin-top:4px; }
        .setup-week-row { border:1px solid #e2e8f0; border-radius:10px; padding:12px; margin-top:10px; background:#fafcff; }
        .setup-session-row { display:grid; grid-template-columns: 1fr; gap:8px; margin-top:8px; }
        .setup-session-pill { border:1px solid #dbe3ee; background:#fff; border-radius:10px; padding:8px 10px; }
        .setup-session-head { display:flex; justify-content:space-between; align-items:center; gap:10px; }
        .setup-session-right { display:flex; align-items:center; gap:8px; }
        .setup-session-pill .title { font-size:14px; font-weight:900; color:#111827; }
        .setup-session-pill .meta { font-size:12px; font-weight:700; color:#64748b; margin-top:2px; display:flex; gap:8px; flex-wrap:wrap; }
        .setup-assign-select { min-width: 220px; border:1px solid #dbe3ee; background:#f8fafc; padding:9px 10px; border-radius:8px; font-weight:800; font-family:inherit; color:#334155; }
        .setup-date-box { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
        .setup-date-input { min-width: 180px; border:1px solid #dbe3ee; background:#fff; padding:10px 12px; border-radius:10px; font-weight:800; font-family:inherit; }
        .setup-date-btn { border:1px solid #dbe3ee; background:#f8fafc; color:#334155; padding:8px 10px; border-radius:8px; cursor:pointer; font-weight:800; font-size:12px; font-family:inherit; }
        .setup-view-btn { border:none; background:var(--blue-accent); color:#fff; width:42px; height:42px; border-radius:10px; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px; box-shadow:0 4px 10px rgba(30,75,152,0.22); transition:.2s; }
        .setup-view-btn:hover { background:#153670; transform:translateY(-1px); }
        .calendar-setup-inline { margin-top:18px; background:#ffffff; border:1px solid #dbe3ee; border-radius:14px; padding:18px; box-shadow:0 6px 16px rgba(0,0,0,0.04); }
        .calendar-setup-inline.hidden { display:none; }
        .calendar-page-panel { margin-top: 14px; background: var(--surface); color: var(--dark-text); border-radius: 12px; padding: 22px; border: 1px solid #e0e0e0; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
        .calendar-page-header { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:8px; }
        .calendar-page-title { font-size:34px; font-weight:900; margin:0 0 6px 0; line-height:1; color: var(--blue-accent); border-bottom: 2px solid #eef2f5; padding-bottom: 8px; display:inline-block; min-width: 220px; }
        .calendar-page-substats { display:flex; gap:28px; margin-top:10px; flex-wrap:wrap; }
        .calendar-page-substats .label { font-size:13px; color:var(--grey-text); font-weight:700; }
        .calendar-page-substats .value { font-size:28px; color:var(--dark-text); font-weight:900; }
        .calendar-kpi-card {
            background: #f8fafc;
            border-radius: 12px;
            border: 1px solid #dbe3ee;
            padding: 8px 12px;
            min-width: 170px;
            height: 58px;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .calendar-kpi-card .label { color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; font-weight: 800; }
        .calendar-kpi-card .value { color: #0f172a; font-size: 26px; line-height: 1; margin-top: 2px; font-weight: 900; }
        .calendar-page-header-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
        .calendar-month-kpi-row { display:flex; justify-content:flex-start; align-items:stretch; gap:10px; flex-wrap:wrap; margin: 4px 0 6px 0; }
        .calendar-export-btn {
            border: none;
            background: var(--blue-accent);
            color: #ffffff;
            padding: 0 16px;
            border-radius: 10px;
            font-weight: 800;
            font-size: 13px;
            font-family: inherit;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 10px rgba(30,75,152,0.2);
            transition: .2s;
            width: auto;
            min-width: 165px;
            height: 42px;
        }
        .calendar-export-btn:hover { background: #153670; transform: translateY(-1px); }
        .calendar-download-row { margin-top: 0; display: flex; justify-content: flex-end; }
        .monthly-print-sheet {
            width: 210mm;
            min-height: 297mm;
            box-sizing: border-box;
            padding: 16mm;
            background: #ffffff;
            color: #0f172a;
            font-family: Inter, Arial, sans-serif;
        }
        .monthly-print-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
        .monthly-print-brand { font-size:20px; font-weight:900; color:#1e3a8a; }
        .monthly-print-sub { font-size:12px; color:#475569; font-weight:700; margin-top:2px; }
        .monthly-print-kpi { border:1px solid #dbeafe; background:#eff6ff; border-radius:10px; padding:8px 12px; text-align:right; min-width:150px; }
        .monthly-print-kpi .kpi-label { font-size:10px; color:#1d4ed8; font-weight:800; text-transform:uppercase; }
        .monthly-print-kpi .kpi-value { font-size:30px; color:#1e3a8a; font-weight:900; line-height:1; margin-top:3px; }
        .monthly-print-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:6px; }
        .monthly-print-weekday { background:#f1f5f9; border:1px solid #e2e8f0; border-radius:6px; text-align:center; padding:6px 0; font-size:11px; font-weight:900; color:#334155; }
        .monthly-print-cell {
            min-height: 32mm;
            border:1px solid #e2e8f0;
            border-radius:8px;
            padding:7px;
            background:#ffffff;
            display:flex;
            flex-direction:column;
            gap:5px;
        }
        .monthly-print-cell.outside { background:#f8fafc; color:#94a3b8; }
        .monthly-print-date { font-size:14px; font-weight:900; color:#0f172a; }
        .monthly-print-line { font-size:10px; color:#334155; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .monthly-print-line.done { color:#15803d; }
        .monthly-print-line.todo { color:#1e3a8a; }
        .monthly-print-line.more { color:#f59e0b; }
        .calendar-page-grid { margin-top:30px; }
        .calendar-page-weekdays, .calendar-page-days { display:grid; grid-template-columns: repeat(7, 1fr); gap:10px; }
        .calendar-page-weekdays div { text-align:center; color:var(--grey-text); font-weight:800; font-size:15px; }
        .calendar-page-day { border-radius:999px; width:52px; height:52px; display:flex; align-items:center; justify-content:center; margin:0 auto; font-weight:800; font-size:22px; color:#334155; border:1px solid #e2e8f0; background:#f8fafc; position:relative; cursor:pointer; transition:.2s; }
        .calendar-page-day:hover { border-color:#cbd5e1; transform:translateY(-1px); }
        .calendar-page-day.outside { color:#94a3b8; border-color:transparent; background:transparent; cursor:default; }
        .calendar-page-day.today { border:3px solid #0f172a; }
        .calendar-page-day.scheduled { background:#1e3a8a; border-color:#1e3a8a; color:#ffffff; }
        .calendar-page-day.completed { background:#16a34a; border-color:#16a34a; color:#ffffff; }
        .calendar-page-day.today.scheduled,
        .calendar-page-day.today.completed { border:3px solid #0f172a; box-shadow: 0 0 0 2px #ffffff inset; }
        .calendar-page-day.has-multi { background:#f59e0b !important; border-color:#f59e0b !important; color:#ffffff !important; }
        .calendar-page-nav-btn { border:none; background:#eef2f5; color:#334155; width:34px; height:34px; border-radius:8px; cursor:pointer; font-size:16px; }
        .calendar-page-legend-row { margin-top: 12px; display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
        .calendar-page-legend { margin-top: 0; display:flex; gap:14px; flex-wrap:wrap; font-size:12px; font-weight:700; color:var(--grey-text); }
        .calendar-page-dot { display:inline-flex; width:10px; height:10px; border-radius:999px; margin-right:6px; }
        .calendar-day-event-row { border:1px solid #e2e8f0; border-radius:10px; padding:10px; display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; background:#f8fafc; }
        .calendar-day-event-title { font-size:13px; font-weight:800; color:var(--dark-text); }
        .calendar-day-event-sub { font-size:11px; color:#64748b; font-weight:700; }
        .calendar-day-action-btn { border:none; background:#eef2f5; color:#334155; padding:7px 10px; border-radius:8px; cursor:pointer; font-weight:800; font-size:11px; font-family:inherit; transition:.2s; }
        .calendar-day-action-btn:hover { background:#334155; color:#ffffff; transform:translateY(-1px); }
        .calendar-day-open-btn { border:none; background:var(--blue-accent); color:#fff; padding:7px 10px; border-radius:8px; cursor:pointer; font-weight:800; font-size:11px; font-family:inherit; transition:.2s; }
        .calendar-day-open-btn:hover { background:#153670; color:#ffffff; transform:translateY(-1px); }
        .calendar-day-delete-btn { border:none; background:#fee2e2; color:#b91c1c; padding:7px 10px; border-radius:8px; cursor:pointer; font-weight:800; font-size:11px; font-family:inherit; transition:.2s; }
        .calendar-day-delete-btn:hover { background:#dc2626; color:#ffffff; transform:translateY(-1px); }
        .profile-edit-grid label { margin-bottom:4px; }

        /* --- VISUALISATION DE SÉANCE SEULE --- */
        #plan-detail-view { padding-top: 40px; }
        .pdf-viewer-header { width: 126mm; max-width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; background: white; padding: 15px 25px; border-radius: 12px; box-sizing: border-box; border: 1px solid #e0e0e0; box-shadow: 0 4px 10px rgba(0,0,0,0.03);}

        /* --- MODE IMPRESSION (PDF NATIVE) --- */
        #hidden-print-container { position: absolute; left: -9999px; top: 0; width: 100%; } 
        @media print {
            body > *:not(#hidden-print-container) { display: none !important; }
            #hidden-print-container { position: static !important; left: 0 !important; display: block !important;}
            #hidden-print-container .print-page { transform: none !important; box-shadow: none !important; margin: 0 !important; width: 105mm; height: 148mm; page-break-after: always; break-after: page; border-radius: 0;}
            #hidden-print-container .monthly-print-sheet { width: 210mm !important; min-height: 297mm !important; margin: 0 !important; border-radius: 0 !important; page-break-after: always; break-after: page; }
            * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
        }

        /* ===================================================
           MOBILE RESPONSIVE — Mobile-First additions
           Breakpoints: 768px (tablet/mobile) | 480px (small phone)
        =================================================== */

        /* --- HAMBURGER BUTTON (hidden on desktop) --- */
        .hamburger-btn {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            padding: 10px;
            color: var(--blue-accent);
            font-size: 22px;
            border-radius: 8px;
            min-width: 44px;
            min-height: 44px;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        /* --- MOBILE NAV BACKDROP OVERLAY --- */
        .mobile-nav-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 999;
        }
        .mobile-nav-overlay.open { display: block; }

        /* ===================== 768px breakpoint ===================== */
        @media (max-width: 768px) {

            /* --- HAMBURGER VISIBLE ON MOBILE --- */
            .hamburger-btn { display: flex; }

            /* --- SLIDE-IN NAV DRAWER --- */
            .nav-links {
                position: fixed;
                top: 0;
                right: -100%;
                width: 270px;
                height: 100vh;
                background: var(--surface);
                flex-direction: column;
                padding: 72px 16px 32px;
                gap: 4px;
                box-shadow: -4px 0 24px rgba(0, 0, 0, 0.14);
                z-index: 1001;
                transition: right 0.28s ease;
                overflow-y: auto;
                box-sizing: border-box;
            }
            .nav-links.open { right: 0; display: flex; }
            .nav-btn {
                padding: 13px 16px;
                min-height: 44px;
                font-size: 15px;
                width: 100%;
                text-align: left;
                border-radius: 8px;
            }

            /* --- VIEWS PADDING --- */
            #gallery-view,
            #programs-view,
            #community-view,
            #calendar-view { padding: 24px 4%; }
            #profile-view { padding: 24px 4%; }
            #public-profile-view > div { padding: 24px 4%; }
            #home-view.active { padding: 36px 16px; }
            #program-editor-view,
            #program-detail-view { padding: 24px 4%; }
            #plan-detail-view { padding-top: 24px; }

            /* --- GALLERY HEADER --- */
            .gallery-header { flex-wrap: wrap; gap: 10px; }
            .gallery-header h2 { font-size: 20px; }

            /* --- ACTION CARDS (home) --- */
            .action-cards { gap: 16px; }
            .action-card { width: 100%; min-height: auto; padding: 28px 22px; }
            .home-title { font-size: 28px; }
            .home-subtitle { font-size: 15px; margin-bottom: 36px; }

            /* --- TOUCH TARGETS (min 44×44) --- */
            .btn-action { min-height: 44px; }
            .filter-btn { min-height: 44px; padding: 10px 16px; }
            .btn-confirm-cancel,
            .btn-confirm-danger,
            .btn-confirm-save { min-height: 44px; padding: 12px 16px; }
            .btn-back { min-height: 44px; }
            .landing-btn { min-height: 44px; }
            .btn-icon { width: 36px; height: 36px; }
            .login-box input,
            input[type="text"],
            input[type="number"],
            input[type="email"],
            input[type="password"],
            select,
            textarea { min-height: 44px; padding: 12px; }
            .plan-card-actions { flex-wrap: wrap; }

            /* --- HERO LANDING PAGE --- */
            .hero { padding: 40px 0 48px; min-height: auto; }
            .hero-text { padding-right: 0; min-width: unset; }
            .hero h1 { font-size: 2.2rem; letter-spacing: -0.5px; }
            .hero p { font-size: 1.05rem; }
            .hero-visual { min-width: unset; padding: 20px 0 10px; }
            .card-mockup.print-page { transform: rotateY(-8deg) rotateX(3deg) scale(0.55) translateX(-5px); }

            /* --- LANDING FEATURES SECTION --- */
            .section-lp { padding: 64px 0; }
            .section-title h2 { font-size: 1.9rem; }
            .landing-features { grid-template-columns: 1fr; gap: 20px; }

            /* --- LOGIN / SIGNUP BOX --- */
            .login-box { padding: 28px 20px; max-width: 100%; margin: 0 16px; }

            /* --- EDITOR VIEW: stacked layout on mobile --- */
            #editor-view { flex-direction: column; height: auto; min-height: 100vh; overflow-y: auto; }
            .editor-panel { width: 100%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
            .preview-panel {
                width: 100%;
                padding: 20px 10px;
                overflow-x: hidden;
                min-height: 320px;
            }
            .preview-panel .print-page {
                transform: scale(0.82);
                transform-origin: top center;
                margin-bottom: 0;
            }

            /* --- CALENDAR VIEW --- */
            .calendar-page-header { flex-wrap: wrap; gap: 10px; }
            .calendar-page-title { font-size: 26px; min-width: unset; }
            .calendar-month-kpi-row { gap: 8px; }
            .calendar-kpi-card { min-width: unset; flex: 1; }
            .calendar-kpi-card .value { font-size: 22px; }
            .calendar-page-day { width: 40px; height: 40px; font-size: 16px; }
            .calendar-page-weekdays div { font-size: 12px; }
            .calendar-page-weekdays,
            .calendar-page-days { gap: 6px; }
            .calendar-page-legend-row { flex-direction: column; align-items: flex-start; gap: 10px; }
            .calendar-download-row { width: 100%; justify-content: flex-start; }
            .calendar-export-btn { width: 100%; justify-content: center; }

            /* --- PROGRAM ROWS --- */
            .program-day-row { flex-wrap: wrap; gap: 8px; }
            .program-day-label { width: 100%; margin-bottom: 2px; }
            .setup-assign-select { min-width: unset; width: 100%; }
            .setup-date-input { min-width: unset; flex: 1; }

            /* --- PROFILE VIEW --- */
            .profile-top-actions { gap: 8px; }
            .profile-header { flex-wrap: wrap; gap: 14px; }
            .profile-header-social { margin-left: 0; width: 100%; justify-content: flex-start; }

            /* --- MODALS --- */
            .confirm-modal { padding: 18px; }
            .confirm-modal-actions { flex-wrap: wrap; }
            .confirm-modal-actions button { flex: 1; min-height: 44px; }

            /* --- TOAST (full-width on mobile) --- */
            .toast {
                width: calc(100% - 32px);
                text-align: center;
                font-size: 13px;
                padding: 12px 16px;
            }

            /* --- COMMUNITY SEARCH --- */
            #community-view .gallery-header { flex-direction: column; align-items: stretch; gap: 12px; }

            /* --- PDF DETAIL HEADER --- */
            .pdf-viewer-header { width: 100%; padding: 12px 16px; margin-bottom: 20px; }

            /* --- PLAN DETAIL CONTAINER --- */
            #plan-detail-container { padding-bottom: 30px; }
        }

        /* ===================== 480px breakpoint ===================== */
        @media (max-width: 480px) {

            /* --- HERO --- */
            .hero h1 { font-size: 1.8rem; }
            .hero p { font-size: 0.95rem; }
            .landing-btn { padding: 13px 22px; font-size: 14px; }
            .hero-visual { display: none; }

            /* --- SECTION LP --- */
            .section-title h2 { font-size: 1.6rem; }

            /* --- HOME --- */
            .home-title { font-size: 24px; }
            .action-card { padding: 22px 18px; }

            /* --- PLAN CARDS --- */
            .plan-card-title { font-size: 16px; }
            .plan-card-actions { gap: 8px; }

            /* --- LOGIN BOX --- */
            .login-box { padding: 22px 14px; }

            /* --- CALENDAR --- */
            .calendar-page-day { width: 34px; height: 34px; font-size: 13px; }
            .calendar-page-weekdays div { font-size: 10px; }
            .calendar-page-weekdays,
            .calendar-page-days { gap: 4px; }
            .calendar-page-grid { margin-top: 18px; }

            /* --- PROFILE STATS --- */
            .stats-grid { grid-template-columns: repeat(2, 1fr); }
            .profile-overview-grid { grid-template-columns: 1fr 1fr; }

            /* --- MODAL ACTIONS STACK --- */
            .confirm-modal-actions { flex-direction: column; }
            .confirm-modal-actions button { width: 100%; }

            /* --- EDITOR PREVIEW (smaller scale) --- */
            .preview-panel .print-page {
                transform: scale(0.68);
                transform-origin: top center;
            }

            /* --- SOCIAL POPUP CARD --- */
            .social-popup-row { flex-wrap: wrap; gap: 8px; }
            .social-popup-actions { width: 100%; justify-content: flex-start; }
        }
