/**
 * ========================================
 * ORI BIBLE - READING PLAN PANEL STYLES
 * ========================================
 * Design moderne, épuré et élégant
 * Version 2.0 - Refonte complète
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

#plans-row { display: none !important; }

:root {
    --rp-primary: #2563eb;
    --rp-primary-light: #3b82f6;
    --rp-text: #1f2937;
    --rp-text-muted: #6b7280;
    --rp-border: #e5e7eb;
    --rp-bg: #ffffff;
    --rp-bg-subtle: #f9fafb;
    --rp-success: #10b981;
    --rp-radius: 4px;
}

/* === OVERLAY === */
.reading-plan-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.reading-plan-overlay.visible { opacity: 1; }
.reading-plan-overlay[hidden] { display: none; }

/* === PANEL === */
.reading-plan-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 94%;
    max-width: 580px;
    height: 90vh;
    max-height: 820px;
    background: var(--rp-bg);
    border-radius: var(--rp-radius);
    display: flex;
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
    overflow-x: hidden !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    font-family: 'DM Sans', -apple-system, sans-serif;
    color: var(--rp-text);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.reading-plan-panel.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.reading-plan-panel[hidden] { display: none; }
.reading-plan-panel,
.reading-plan-panel * {
    box-sizing: border-box;
}
.reading-plan-panel * {
    font-family: 'DM Sans', -apple-system, sans-serif;
}
.reading-plan-panel i[class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}
body.reading-plan-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

/* === HEADER === */
.rp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rp-border);
    background: var(--rp-bg);
    flex-shrink: 0;
    width: 100%;
    overflow: hidden;
}
.rp-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rp-header-icon {
    width: 40px; height: 40px;
    background: var(--rp-primary);
    border-radius: var(--rp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}
.rp-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
.rp-close-btn {
    width: 36px; height: 36px;
    border: none;
    background: transparent;
    color: var(--rp-text-muted);
    font-size: 20px;
    cursor: pointer;
    border-radius: var(--rp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.rp-close-btn:hover {
    background: var(--rp-bg-subtle);
    color: var(--rp-text);
}

/* === BODY === */
.rp-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* === WELCOME === */
.rp-welcome {
    padding: 40px 32px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: var(--rp-bg);
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}
.rp-welcome[hidden] { display: none !important; }
.rp-welcome-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--rp-primary) 0%, var(--rp-primary-light) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    margin-bottom: 24px;
    flex-shrink: 0;
}
.rp-welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--rp-text);
    margin: 0 0 12px;
    word-wrap: break-word;
    max-width: 100%;
}
.rp-welcome-subtitle {
    font-size: 15px;
    color: var(--rp-text-muted);
    margin: 0 0 32px;
    line-height: 1.6;
    max-width: 380px;
    word-wrap: break-word;
    padding: 0 16px;
    box-sizing: border-box;
}
.rp-welcome-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
}
.rp-stat { text-align: center; }
.rp-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--rp-primary);
}
.rp-stat-label {
    font-size: 12px;
    color: var(--rp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rp-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--rp-primary);
    color: white;
    border: none;
    border-radius: var(--rp-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.rp-start-btn:hover {
    background: var(--rp-primary-light);
    transform: translateY(-1px);
}

/* === MAIN === */
.rp-main {
    display: none;
    flex-direction: column;
    height: 100%;
    background: var(--rp-bg-subtle);
}
.rp-main.active { display: flex; }

/* === TABS === */
.rp-tabs {
    display: flex;
    background: var(--rp-bg);
    border-bottom: 1px solid var(--rp-border);
    padding: 0 16px;
    flex-shrink: 0;
}
.rp-tab {
    flex: 1;
    padding: 14px 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--rp-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
.rp-tab:hover { color: var(--rp-text); }
.rp-tab.active {
    color: var(--rp-primary);
    border-bottom-color: var(--rp-primary);
}
.rp-tab i { font-size: 14px; }

/* === TAB CONTENT === */
.rp-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.rp-tab-content.active { display: block; }

/* === CATEGORY FILTER === */
.rp-category-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.rp-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.rp-category-btn {
    padding: 6px 8px;
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    color: var(--rp-text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rp-category-btn:hover {
    border-color: var(--rp-primary);
    color: var(--rp-primary);
}
.rp-category-btn.active {
    background: var(--rp-primary);
    border-color: var(--rp-primary);
    color: white;
}
.rp-category-btn.full-width {
    grid-column: 1 / -1;
    background: var(--rp-bg-subtle);
    border: 1px dashed var(--rp-border);
    color: var(--rp-text-muted);
    font-size: 13px;
    padding: 12px;
}
.rp-category-btn.full-width:hover {
    background: var(--rp-bg);
    border-style: solid;
    border-color: var(--rp-primary);
    color: var(--rp-primary);
}
.rp-category-btn.full-width.active {
    background: var(--rp-primary);
    border-style: solid;
    border-color: var(--rp-primary);
    color: white;
}

/* === PLANS GRID === */
.rp-plans-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === PLAN CARD === */
.rp-plan-card {
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.rp-plan-card:hover {
    border-color: var(--rp-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}
.rp-plan-card.in-progress {
    border-color: var(--rp-success);
    background: linear-gradient(to right, rgba(16, 185, 129, 0.03), transparent);
}
.rp-plan-status {
    position: absolute;
    top: 12px; right: 12px;
    padding: 4px 8px;
    background: var(--rp-success);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--rp-radius);
    text-transform: uppercase;
}
.rp-plan-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.rp-plan-icon {
    width: 44px; height: 44px;
    border-radius: var(--rp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.rp-plan-info { flex: 1; min-width: 0; }
.rp-plan-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--rp-text);
    padding-right: 70px;
}
.rp-plan-subtitle {
    font-size: 13px;
    color: var(--rp-text-muted);
    margin: 0;
}
.rp-plan-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.rp-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--rp-text-muted);
}
.rp-plan-badge svg { opacity: 0.6; }
.rp-plan-progress {
    margin-top: 12px;
    padding: 0px 10px;
    border-top: 1px solid var(--rp-border);
}
.rp-plan-progress-bar {
    height: 4px;
    background: var(--rp-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}
.rp-plan-progress-fill {
    height: 100%;
    background: var(--rp-success);
    border-radius: 2px;
}
.rp-plan-progress-text {
    font-size: 12px;
    color: var(--rp-text-muted);
}
.rp-plan-features {
    display: none;
}

/* === ACTIVE PLAN === */
.rp-active-plan {
    display: none;
    flex-direction: column;
    height: 100%;
    background: var(--rp-bg);
}
.rp-active-plan.visible { display: flex; }

.rp-active-header {
    padding: 16px 20px;
    background: var(--rp-bg);
    border-bottom: 1px solid var(--rp-border);
}
.rp-active-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.rp-active-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--rp-text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--rp-radius);
    transition: all 0.2s;
    flex-shrink: 0;
}
.rp-active-back:hover {
    color: var(--rp-primary);
    background: rgba(37, 99, 235, 0.1);
}
.rp-active-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rp-active-icon {
    width: 32px; height: 32px;
    background: var(--rp-primary);
    border-radius: var(--rp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}
.rp-active-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* === PROGRESS CARD === */
.rp-progress-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.rp-progress-circle {
    width: 72px; height: 72px;
    position: relative;
    flex-shrink: 0;
}
.rp-progress-circle svg {
    width: 72px; height: 72px;
    transform: rotate(-90deg);
}
.rp-progress-circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 6;
}
.rp-progress-circle-fill {
    fill: none;
    stroke: var(--rp-primary);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}
.rp-progress-circle-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
    color: var(--rp-text);
}
.rp-progress-info { flex: 1; }
.rp-progress-days {
    font-size: 14px;
    color: var(--rp-text);
    margin-bottom: 4px;
}
.rp-progress-label {
    font-size: 12px;
    color: var(--rp-text-muted);
}
.rp-progress-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.rp-abandon-btn {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #fecaca;
    border-radius: var(--rp-radius);
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.rp-abandon-btn:hover { background: #fef2f2; }
.rp-abandon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rp-reset-force-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.rp-reset-force-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

/* Objectif du programme */
.rp-plan-goal {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}
.rp-plan-goal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}
.rp-plan-goal-header i {
    color: var(--rp-primary);
    font-size: 11px;
}
.rp-plan-goal-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.rp-plan-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rp-primary), #6366f1);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}
.rp-plan-goal-text {
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

/* Old reset button - hide */
.rp-reset-btn { display: none !important; }

/* === ACTIVE CONTENT === */
.rp-active-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* === TODAY === */
.rp-today-section { margin-bottom: 20px; }
.rp-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rp-text);
    margin-bottom: 12px;
}
.rp-section-title .dot {
    width: 8px; height: 8px;
    background: var(--rp-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.rp-today-card {
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    overflow: hidden;
}
.rp-today-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--rp-bg-subtle);
    border-bottom: 1px solid var(--rp-border);
}
.rp-today-day {
    font-size: 14px;
    font-weight: 600;
    color: var(--rp-text);
}
.rp-today-date {
    font-size: 12px;
    color: var(--rp-text-muted);
}
.rp-today-passages { padding: 8px; }
.rp-passage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rp-radius);
    cursor: pointer;
    transition: background 0.2s;
}
.rp-passage-item:hover { background: var(--rp-bg-subtle); }
.rp-passage-item.completed { opacity: 0.6; }
.rp-passage-check {
    width: 28px; height: 28px;
    border: 2px solid var(--rp-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--rp-text-muted);
    flex-shrink: 0;
}
.rp-passage-item.completed .rp-passage-check {
    background: var(--rp-success);
    border-color: var(--rp-success);
    color: white;
}
.rp-passage-name {
    flex: 1;
    font-size: 14px;
    color: var(--rp-text);
}
.rp-passage-arrow {
    color: var(--rp-text-muted);
    font-size: 12px;
}

/* Bouton Lire le passage */
.rp-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--rp-primary), #6366f1);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.rp-read-btn:hover {
    background: linear-gradient(135deg, #4f46e5, var(--rp-primary));
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.rp-read-btn i {
    font-size: 11px;
}
.rp-passage-item.completed .rp-read-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.rp-passage-item.completed .rp-read-btn:hover {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.rp-today-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--rp-border);
}
.rp-mark-done-btn {
    width: 100%;
    padding: 12px;
    background: var(--rp-primary);
    border: none;
    border-radius: var(--rp-radius);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.rp-mark-done-btn:hover { background: var(--rp-primary-light); }
.rp-mark-done-btn:disabled { background: var(--rp-success); cursor: default; }

/* === NOTES SECTION === */
.rp-notes-section {
    padding: 12px 16px;
    border-top: 1px solid var(--rp-border);
    background: var(--rp-card-bg);
}
.rp-notes-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-text);
}
.rp-notes-header i {
    color: var(--rp-primary);
}
.rp-notes-saved {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--rp-success);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.rp-notes-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--rp-border);
    border-radius: 8px;
    background: var(--rp-bg);
    color: var(--rp-text);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rp-notes-textarea:focus {
    outline: none;
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.rp-notes-textarea::placeholder {
    color: var(--rp-text-muted);
    opacity: 0.7;
}

/* === JOURNAL DE NOTES (Onglet Progression) === */
.rp-notes-journal-section {
    margin-top: 20px;
    padding: 16px;
    background: #eeeeee;
    border-radius: 4px;
    border: none;
    position: relative;
}

/* Style uniforme pour tous les titres h4 de l'onglet Progression */
.rp-goal-section h4,
.rp-chart-section h4,
.rp-active-plans-section h4,
.rp-notes-journal-section h4,
.rp-achievements h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.rp-goal-section h4 i,
.rp-chart-section h4 i,
.rp-active-plans-section h4 i,
.rp-notes-journal-section h4 i,
.rp-achievements h4 i {
    font-size: 13px;
    color: var(--rp-primary);
    opacity: 0.9;
}

.rp-notes-journal {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rp-notes-empty-state {
    text-align: center;
    padding: 28px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}
.rp-notes-empty-state i {
    font-size: 36px;
    color: #94a3b8;
    opacity: 0.5;
    margin-bottom: 12px;
    display: block;
}
.rp-notes-empty-state p {
    margin: 0 0 4px;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
}
.rp-notes-empty-state span {
    font-size: 12px;
    color: #94a3b8;
}
.rp-journal-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rp-journal-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.rp-journal-action-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}
.rp-note-entry {
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 4px;
    border-left: 3px solid var(--rp-primary);
    position: relative;
    transition: all 0.2s ease;
}
.rp-note-entry:hover {
    background: #f8fafc;
}
.rp-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.rp-note-plan {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}
.rp-note-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rp-note-day {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
}
.rp-note-delete-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: #fee2e2;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    opacity: 1;
}
.rp-note-delete-btn:hover {
    background: #ef4444;
    color: white;
}
.rp-note-text {
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
    word-break: break-word;
}

/* === START SECTION === */
.rp-start-section {
    text-align: center;
    padding: 40px 20px;
}
.rp-start-icon {
    margin-bottom: 8px;
}
.rp-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--rp-primary);
    border: none;
    border-radius: var(--rp-radius);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.rp-start-btn:hover {
    background: var(--rp-primary-light);
    transform: translateY(-1px);
}

/* === SHARE === */
.rp-share-section,
.rp-share-joy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
}
.rp-share-joy h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--rp-text-muted);
    margin: 0;
}
.rp-share-joy h4 i { display: none; }
.rp-share-buttons {
    display: flex;
    gap: 6px;
}
.rp-share-btn {
    width: 36px; height: 36px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-bg);
    color: var(--rp-text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.rp-share-btn i {
    font-size: 16px;
    line-height: 1;
}
.rp-share-btn.whatsapp { color: #25d366; }
.rp-share-btn.facebook { color: #1877f2; }
.rp-share-btn.twitter { color: #000; }
.rp-share-btn.copy { color: #666; }
.rp-share-btn:hover { border-color: #ccc; }
.rp-share-btn.whatsapp:hover { background: #25d366; color: white; border-color: #25d366; }
.rp-share-btn.facebook:hover { background: #1877f2; color: white; border-color: #1877f2; }
.rp-share-btn.twitter:hover { background: #000; color: white; border-color: #000; }
.rp-share-btn.copy:hover { background: #666; color: white; border-color: #666; }

/* === BIBLE READER INSIDE PANEL === */
.rp-bible-reader {
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}
.rp-reader-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--rp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--rp-bg-subtle);
}
.rp-reader-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--rp-text);
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rp-reader-back {
    background: none;
    border: none;
    color: var(--rp-primary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--rp-radius);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.rp-reader-back:hover {
    background: rgba(37, 99, 235, 0.1);
}
.rp-reader-content {
    flex: 1;
    overflow-y: visible;
    overflow-x: hidden;
    padding: 16px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--rp-text);
    transition: opacity 0.3s ease;
    font-family: 'Inter', -apple-system, sans-serif;
}
.rp-reader-content.rp-font-serif {
    font-family: 'Georgia', 'Times New Roman', serif !important;
}
.rp-reader-content.rp-font-sans {
    font-family: 'Inter', -apple-system, sans-serif !important;
}
.rp-reader-content.loading-state {
    opacity: 0.5;
}
.rp-reader-content .verse {
    margin-bottom: 12px;
    line-height: 1.8;
    animation: fadeInVerse 0.3s ease forwards;
    opacity: 0;
}
@keyframes fadeInVerse {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.rp-reader-content .verse:nth-child(1) { animation-delay: 0.02s; }
.rp-reader-content .verse:nth-child(2) { animation-delay: 0.04s; }
.rp-reader-content .verse:nth-child(3) { animation-delay: 0.06s; }
.rp-reader-content .verse:nth-child(4) { animation-delay: 0.08s; }
.rp-reader-content .verse:nth-child(5) { animation-delay: 0.1s; }
.rp-reader-content .verse:nth-child(n+6) { animation-delay: 0.12s; }

.rp-reader-content .verse-num {
    display: inline-block;
    min-width: 20px;
    font-size: 10px;
    font-weight: 700;
    color: var(--rp-primary);
    vertical-align: baseline;
    margin-right: 6px;
    text-align: right;
}
.rp-reader-content .loading {
    text-align: center;
    color: var(--rp-text-muted);
    padding: 40px;
}

/* === READER TOOLBAR === */
.rp-reader-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 10px 16px;
    background: var(--rp-bg-subtle);
    border-bottom: 1px solid var(--rp-border);
    align-items: center;
    justify-content: space-between;
}
.rp-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rp-toolbar-group label {
    font-size: 11px;
    color: var(--rp-text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.rp-version-select {
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px 6px 3px 3px;
    background: var(--rp-bg);
    color: var(--rp-text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4L6 7.5L9.5 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 240px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rp-version-select:hover {
    border-color: #9ca3af;
}
.rp-version-select:focus {
    outline: none;
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.rp-font-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
.rp-font-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-bg);
    color: var(--rp-text);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.rp-font-btn:hover {
    background: var(--rp-primary);
    color: white;
    border-color: var(--rp-primary);
}
.rp-font-size {
    font-size: 12px;
    font-weight: 600;
    color: var(--rp-text);
    min-width: 20px;
    text-align: center;
}

.rp-reader-nav {
    padding: 12px 16px;
    border-top: 1px solid var(--rp-border);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.rp-reader-nav-btn {
    padding: 8px 16px;
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    color: var(--rp-text);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.rp-reader-nav-btn:hover:not(:disabled) {
    background: var(--rp-bg-subtle);
}
.rp-reader-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.rp-reader-nav-btn.primary {
    background: var(--rp-primary);
    color: white;
    border-color: var(--rp-primary);
}
.rp-reader-nav-btn.primary:hover {
    background: var(--rp-primary-light);
}

/* === ENCOURAGEMENT - HIDE === */
.rp-encouragement { display: none !important; }

/* === PRAYER PROMPT - HIDE === */
.rp-prayer-prompt { display: none !important; }

/* === MY PROGRESS === */
.rp-my-progress {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Stats Grid - Design épuré */
.rp-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.rp-stat-card {
    background: var(--rp-card-bg);
    border: 1px solid var(--rp-border);
    border-radius: 12px;
    padding: 14px 16px;
    position: relative;
}
.rp-stat-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.rp-stat-card .rp-stat-icon {
    font-size: 18px;
    color: var(--rp-primary);
    opacity: 0.85;
    flex-shrink: 0;
}
.rp-stat-card .rp-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}
.rp-stat-card .rp-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}
.rp-stat-card .rp-stat-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Animation Flamme */
.rp-flame-icon {
    transition: all 0.3s ease;
}
.rp-flame-icon.animated {
    color: #f97316 !important;
    animation: flame-pulse 1.5s ease-in-out infinite;
}
.rp-flame-icon.animated i {
    filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.6));
}
@keyframes flame-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* === VERSET DU JOUR === */
.rp-verse-of-day {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-left: 4px solid var(--rp-primary);
}
.rp-verse-icon {
    font-size: 18px;
    color: var(--rp-primary);
    opacity: 0.6;
    flex-shrink: 0;
}
.rp-verse-content {
    flex: 1;
}
.rp-verse-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--rp-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px;
}
.rp-verse-text {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
    margin: 0 0 4px;
}
.rp-verse-reference {
    font-size: 11px;
    font-weight: 600;
    color: #3b82f6;
}

/* === MESSAGE DE MOTIVATION === */
.rp-motivation-message {
    background: #f0fdf4;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-left: 4px solid #10b981;
    animation: fadeIn 0.5s ease;
}
.rp-motivation-message.welcome {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
}
.rp-motivation-message.welcome .rp-motivation-icon i { color: #f59e0b; }
.rp-motivation-message.encourage {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-left-color: #ef4444;
}
.rp-motivation-message.encourage .rp-motivation-icon i { color: #ef4444; }
.rp-motivation-message.champion {
    background: linear-gradient(135deg, #fdf4ff 0%, #f5d0fe 100%);
    border-left-color: #a855f7;
}
.rp-motivation-message.champion .rp-motivation-icon i { color: #a855f7; }
.rp-motivation-message.streak {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border-left-color: #f97316;
}
.rp-motivation-message.streak .rp-motivation-icon i { color: #f97316; }
.rp-motivation-message.growing {
    background: #f0fdf4;
    border-left-color: #10b981;
}
.rp-motivation-message.growing .rp-motivation-icon i { color: #10b981; }
.rp-motivation-message.start {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #3b82f6;
}
.rp-motivation-message.start .rp-motivation-icon i { color: #3b82f6; }
.rp-motivation-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.rp-motivation-icon i {
    color: #10b981;
}
.rp-motivation-text {
    font-size: 12px;
    line-height: 1.5;
    color: #374151;
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === CONFETTIS CELEBRATION === */
.rp-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100001;
    overflow: hidden;
    display: none;
}
.rp-confetti {
    position: absolute;
    top: -20px;
    width: 12px;
    height: 12px;
    animation: confettiFall linear forwards;
}
.rp-confetti-circle {
    border-radius: 50%;
}
.rp-confetti-square {
    border-radius: 2px;
}
.rp-confetti-triangle {
    width: 0;
    height: 0;
    background: transparent !important;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid currentColor;
}
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* Objectif Personnel */
.rp-goal-section {
    background: #eeeeee;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}
.rp-goal-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rp-goal-progress {
    flex: 1;
}
.rp-goal-bar {
    height: 8px;
    background: #d1d5db;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.rp-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    transition: width 0.5s ease;
}
.rp-goal-text {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}
.rp-goal-text span:first-child {
    font-weight: 700;
    color: #1e293b;
}
.rp-goal-edit-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: none;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.rp-goal-edit-btn:hover {
    background: var(--rp-primary);
    color: white;
}
.rp-goal-edit-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    gap: 10px;
}
.rp-goal-edit-panel label {
    font-size: 12px;
    color: #475569;
}
.rp-goal-edit-panel input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}
.rp-goal-save-btn {
    padding: 6px 14px;
    background: var(--rp-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.rp-goal-save-btn:hover {
    background: #2563eb;
}

/* Graphique 7 jours */
.rp-chart-section {
    background: #eeeeee;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}
.rp-week-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
    padding: 16px 8px 8px;
    background: #ffffff;
    border-radius: 4px;
}
.rp-chart-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.rp-chart-bar-container {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 6px;
}
.rp-chart-bar {
    width: 24px;
    height: 20px;
    background: #e2e8f0;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}
.rp-chart-bar.filled {
    height: 50px;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
}
.rp-chart-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}
.rp-chart-day.today .rp-chart-label {
    color: #1e293b;
    font-weight: 600;
}
.rp-chart-check {
    position: absolute;
    top: 8px;
    font-size: 10px;
    color: #22c55e;
}

/* Bouton Export et Menu Dropdown */
.rp-section-header {
    position: relative;
}
.rp-journal-actions .rp-export-dropdown {
    position: relative;
    right: auto;
    top: auto;
}
.rp-export-dropdown {
    position: absolute;
    right: 0;
    top: 0;
}
.rp-export-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: none;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}
.rp-export-btn:hover {
    background: var(--rp-primary);
    color: white;
}
.rp-export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}
.rp-export-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.rp-export-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.rp-export-option:first-child { border-radius: 8px 8px 0 0; }
.rp-export-option:last-child { border-radius: 0 0 8px 8px; }
.rp-export-option:hover {
    background: #f1f5f9;
}
.rp-export-option i {
    width: 16px;
    color: #64748b;
}
.rp-export-option:hover i {
    color: var(--rp-primary);
}

/* Active Plans Section */
.rp-section-header {
    margin-bottom: 12px;
}
.rp-section-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0;
    line-height: 1.4;
}
.rp-active-plans-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rp-no-active {
    font-size: 13px;
    color: var(--rp-text-muted);
    text-align: center;
    padding: 20px;
    background: var(--rp-card-bg);
    border-radius: 8px;
    margin: 0;
}
.rp-active-plan-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--rp-card-bg);
    border: 1px solid var(--rp-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.rp-active-plan-item:hover {
    border-color: var(--rp-primary);
    transform: translateX(4px);
}
.rp-active-plan-item > i {
    color: var(--rp-text-muted);
    font-size: 12px;
}
.rp-active-plan-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.rp-active-plan-info {
    flex: 1;
}
.rp-active-plan-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-text);
    margin-bottom: 4px;
}
.rp-active-plan-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rp-mini-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--rp-border);
    border-radius: 2px;
    overflow: hidden;
}
.rp-mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rp-primary), #2563eb);
    border-radius: 2px;
    transition: width 0.3s;
}
.rp-active-plan-progress span {
    font-size: 11px;
    font-weight: 600;
    color: var(--rp-primary);
    min-width: 32px;
}

/* Legacy streak card - hidden */
.rp-streak-card {
    display: none;
}

.rp-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.rp-badge {
    background: #f8fafc;
    border: none;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px 12px;
    transition: all 0.3s ease;
}
.rp-badge.locked {
    opacity: 0.45;
    filter: grayscale(1);
}
.rp-badge.earned {
    opacity: 1;
    filter: none;
    background: #f8fafc;
}
.rp-badge.earned:nth-child(1) { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.rp-badge.earned:nth-child(2) { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.rp-badge.earned:nth-child(3) { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.rp-badge.earned:nth-child(4) { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }
.rp-badge.earned:nth-child(5) { background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); }
.rp-badge.earned:nth-child(6) { background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%); }
.rp-badge.earned:nth-child(7) { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); }
.rp-badge.earned:nth-child(8) { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }
.rp-badge-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 2px;
}
.rp-badge.earned .rp-badge-icon { color: #1e293b; }
.rp-badge.locked .rp-badge-icon { color: #94a3b8; }
.rp-badge-name {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.rp-badge-desc {
    font-size: 9px;
    font-weight: 400;
    color: #94a3b8;
    text-align: center;
    line-height: 1.3;
    margin-top: 2px;
}

/* === CALENDAR === */
.rp-calendar-section {
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}
.rp-calendar-section .rp-section-header {
    margin-bottom: 16px;
}
.rp-calendar {
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    padding: 16px;
}
.rp-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.rp-calendar-nav {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.rp-calendar-nav:hover:not(:disabled) {
    background: var(--rp-primary);
    color: white;
}
.rp-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.rp-calendar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--rp-text);
}
.rp-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}
.rp-calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--rp-text-muted);
    padding: 4px 0;
    text-transform: uppercase;
}
.rp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.rp-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--rp-text);
    border-radius: var(--rp-radius);
    background: var(--rp-bg-subtle);
    cursor: default;
    transition: all 0.15s ease;
}
.rp-calendar-day.empty {
    background: transparent;
}
.rp-calendar-day.completed {
    background: var(--rp-success);
    color: white;
    font-weight: 600;
}
.rp-calendar-day.today {
    border: 2px solid var(--rp-primary);
    color: var(--rp-primary);
    font-weight: 700;
    background: rgba(37, 99, 235, 0.1);
}
.rp-calendar-day.today.completed {
    background: var(--rp-success);
    border-color: var(--rp-success);
    color: white;
}
.rp-calendar-day.future {
    color: var(--rp-text-muted);
    opacity: 0.5;
}
.rp-calendar-day.missed {
    background: #fef2f2;
    color: #ef4444;
    cursor: pointer;
}
.rp-calendar-day.missed:hover {
    background: #fee2e2;
}

/* Calendar Legend */
.rp-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.rp-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}
.rp-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #e2e8f0;
}
.rp-legend-dot.completed {
    background: var(--rp-success);
}
.rp-legend-dot.today {
    background: rgba(37, 99, 235, 0.1);
    border: 2px solid var(--rp-primary);
}

/* Calendar Stats */
.rp-calendar-stats {
    margin-top: 16px;
    padding: 14px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.rp-stats-row {
    display: flex;
    justify-content: space-around;
}
.rp-stat-item {
    text-align: center;
}
.rp-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--rp-text);
}
.rp-stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* === FOOTER === */
.rp-footer {
    padding: 12px 20px;
    padding-right: 36px;
    border-top: 1px solid var(--rp-border);
    font-size: 9px;
    color: #9ca3af;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rp-footer a {
    color: #9ca3af;
    text-decoration: none;
}
.rp-footer a:hover {
    color: #6b7280;
}

/* === TOAST === */
.rp-reminder-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--rp-text);
    color: white;
    padding: 14px 20px;
    border-radius: var(--rp-radius);
    font-size: 14px;
    z-index: 100003;
    opacity: 0;
    transition: all 0.3s;
}
.rp-reminder-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === COMPLETION === */
.rp-completion-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 16px;
    overflow-y: auto;
}
.rp-completion-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.rp-completion-modal {
    background: var(--rp-bg);
    border-radius: 16px;
    padding: 24px 20px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: completionSlideIn 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes completionSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.rp-completion-badge {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 12px;
    color: white;
}
.rp-completion-badge.gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.rp-completion-badge.silver {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}
.rp-completion-badge.bronze {
    background: linear-gradient(135deg, #92400e, #78350f);
}
.rp-completion-badge.encouraged {
    background: linear-gradient(135deg, var(--rp-primary), #2563eb);
}
.rp-completion-badge.beginner {
    background: linear-gradient(135deg, #10b981, #059669);
}
.rp-completion-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--rp-text);
}
.rp-completion-message {
    font-size: 13px;
    color: var(--rp-text-muted);
    margin: 0 0 12px;
    line-height: 1.5;
}
.rp-completion-verse {
    background: var(--rp-card-bg);
    border-left: 3px solid var(--rp-primary);
    padding: 10px 12px;
    margin: 0 0 12px;
    border-radius: 0 8px 8px 0;
}
.rp-completion-verse-text {
    font-style: normal;
    font-size: 12px;
    color: var(--rp-text);
    margin: 0 0 4px;
    line-height: 1.4;
}
.rp-completion-verse-ref {
    font-size: 11px;
    color: var(--rp-text-muted);
    font-weight: 500;
}
.rp-completion-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--rp-border);
    border-bottom: 1px solid var(--rp-border);
}
.rp-completion-stat {
    text-align: center;
}
.rp-completion-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--rp-primary);
}
.rp-completion-stat-label {
    font-size: 10px;
    color: var(--rp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rp-completion-share {
    margin-bottom: 12px;
}
.rp-completion-invite {
    font-size: 11px;
    color: var(--rp-text-muted);
    margin: 0 0 8px;
}
.rp-completion-share-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.rp-completion-share-btns .rp-share-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--rp-border);
    background: var(--rp-card-bg);
    color: var(--rp-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.rp-completion-share-btns .rp-share-btn:hover {
    background: var(--rp-primary);
    color: white;
    border-color: var(--rp-primary);
}
/* Subtitle for completion */
.rp-completion-subtitle {
    font-size: 13px;
    color: var(--rp-text);
    margin: 0 0 8px;
    font-weight: 500;
}

/* Confetti animation */
.rp-completion-confetti {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    animation: confettiBounce 1s ease-out;
    display: none;
}
@keyframes confettiBounce {
    0% { transform: translateX(-50%) scale(0); opacity: 0; }
    50% { transform: translateX(-50%) scale(1.3); opacity: 1; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Action buttons */
.rp-completion-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.rp-completion-action-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.rp-completion-action-btn i {
    font-size: 16px;
}
.rp-btn-restart {
    background: #10b981;
    color: white;
}
.rp-btn-restart:hover {
    background: #059669;
}
.rp-btn-choose {
    background: var(--rp-card-bg);
    color: var(--rp-text);
    border: 1px solid var(--rp-border);
}
.rp-btn-choose:hover {
    background: var(--rp-border);
}

/* === MESSAGE DE BLOCAGE === */
.rp-blocked-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.rp-blocked-message.visible {
    opacity: 1;
}
.rp-blocked-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.rp-blocked-message.visible .rp-blocked-content {
    transform: scale(1);
}
.rp-blocked-content i {
    font-size: 48px;
    color: #f59e0b;
    margin-bottom: 16px;
    display: block;
}
.rp-blocked-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 24px 0;
    font-weight: 400;
}
.rp-blocked-close {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.rp-blocked-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* === PERFORMANCE OPTIMIZATIONS === */

/* GPU acceleration for animations */
.reading-plan-panel,
.rp-confirm-modal,
.rp-completion-modal,
.rp-blocked-content {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Contain paint for better rendering */
.rp-tab-content,
.rp-active-content,
.rp-reader-content {
    contain: content;
}

/* Optimize scrolling */
.rp-body,
.rp-tab-content,
.rp-active-content,
.rp-reader-content,
.rp-plans-grid {
    overflow-anchor: none;
    overscroll-behavior: contain;
}

/* Reduce repaints on hover */
.rp-plan-card,
.rp-category-btn,
.rp-passage-item,
.rp-badge {
    isolation: isolate;
}

/* Font rendering optimization */
.reading-plan-panel,
.reading-plan-panel * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* === RESPONSIVE - MOBILE & TABLET OPTIMIZATION === */

/* ============================================
   LAPTOPS & TABLETTES - POPUP CENTRÉ
   (601px - 1366px) - iPad Pro, Surface, Laptops
   ============================================ */
@media (min-width: 601px) and (max-width: 1366px) {
    /* Panel en popup centré */
    .reading-plan-panel,
    .reading-plan-panel.visible {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(1) !important;
        width: 94% !important;
        max-width: 580px !important;
        height: 85vh !important;
        max-height: 85vh !important;
        border-radius: 16px !important;
        margin: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Conteneur principal scrollable */
    .rp-main {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .rp-tab-content {
        overflow-y: auto !important;
        flex: 1 !important;
    }
    
    .rp-welcome {
        justify-content: flex-start !important;
        overflow-y: auto !important;
        padding: 30px 24px !important;
    }
    
    .rp-plan-list {
        overflow-y: auto !important;
        max-height: none !important;
    }
    
    /* Overlay caché par défaut */
    .reading-plan-overlay {
        display: none !important;
    }
    /* Afficher l'overlay seulement quand visible */
    .reading-plan-overlay.visible {
        display: flex !important;
        opacity: 1;
    }
    /* Panel caché par défaut */
    .reading-plan-panel {
        display: none !important;
    }
    .reading-plan-panel.visible {
        display: flex !important;
    }
    
    .rp-header {
        padding: 16px 24px;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    .rp-header h1 {
        font-size: 18px;
    }
    
    .rp-tabs {
        padding: 0 20px;
    }
    .rp-tab {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .rp-tab-content {
        padding: 24px;
    }
    
    .rp-category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .rp-category-btn {
        padding: 12px 14px;
        font-size: 14px;
    }
    .rp-category-btn.full-width {
        padding: 14px;
        font-size: 14px;
    }
    
    .rp-plan-card {
        padding: 18px;
    }
    .rp-plan-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .rp-plan-name {
        font-size: 16px;
    }
    .rp-plan-subtitle {
        font-size: 13px;
    }
    .rp-plan-meta span {
        font-size: 12px;
    }
    
    /* Detail view */
    .rp-detail-title {
        font-size: 18px;
    }
    .rp-progress-text {
        font-size: 14px;
    }
    .rp-day-title {
        font-size: 15px;
    }
    .rp-passage-text {
        font-size: 14px;
    }
    .rp-note-text {
        font-size: 14px;
        padding: 14px;
    }
    .rp-mark-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .rp-badges-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .rp-reader-toolbar {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .rp-version-select {
        min-width: 200px;
    }
    
    .rp-footer {
        padding: 14px 24px;
        font-size: 12px;
    }
}

/* ============================================
   MOBILE (max-width: 600px)
   ============================================ */
@media (max-width: 600px) {
    /* BLOQUER TOUT SCROLL HORIZONTAL */
    html, body {
        overflow-x: hidden !important;
    }
    
    /* Panel en plein écran - STRICTEMENT FIXÉ */
    .reading-plan-panel,
    .reading-plan-panel.visible {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        transform: none !important;
        margin: 0 !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
    }
    
    /* Header - FIXÉ EN HAUT, X VISIBLE */
    .rp-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 12px 16px !important;
        z-index: 1000 !important;
        background: var(--rp-bg) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        overflow: hidden !important;
    }
    .rp-header-content {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        overflow: hidden;
    }
    .rp-header-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        flex-shrink: 0;
        font-size: 14px;
    }
    .rp-header h1 {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* Bouton X - TOUJOURS VISIBLE À DROITE */
    .rp-close-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        flex-shrink: 0 !important;
        font-size: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }
    
    /* Body scrollable avec marge pour le header fixe */
    .rp-body {
        flex: 1;
        margin-top: 60px;
        overflow-y: auto;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Welcome screen - PAS DE DÉBORDEMENT */
    .rp-welcome {
        padding: 20px 16px;
        width: 100%;
        max-width: 100%;
        overflow: hidden !important;
    }
    .rp-welcome-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
        margin-bottom: 16px;
    }
    .rp-welcome-title {
        font-size: 20px;
        padding: 0 8px;
        word-wrap: break-word;
    }
    .rp-welcome-subtitle {
        font-size: 13px;
        max-width: 100%;
        padding: 0 8px;
        word-wrap: break-word;
        line-height: 1.5;
    }
    .rp-welcome-stats {
        gap: 24px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .rp-stat-value {
        font-size: 24px;
    }
    
    /* Tabs - navigation compacte en une ligne */
    .rp-tabs {
        padding: 0 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .rp-tabs::-webkit-scrollbar {
        display: none;
    }
    .rp-tab {
        padding: 12px 10px;
        font-size: 12px;
        gap: 4px;
        flex-shrink: 0;
        min-width: auto;
        white-space: nowrap;
    }
    .rp-tab i {
        font-size: 13px;
    }
    
    /* Tab content */
    .rp-tab-content {
        padding: 16px;
    }
    
    /* Category filter - grille 3x3 compacte */
    .rp-category-filter {
        margin-bottom: 16px;
    }
    .rp-category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .rp-category-btn {
        padding: 6px 4px;
        font-size: 10px;
        line-height: 1.2;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        hyphens: auto;
    }
    .rp-category-btn.full-width {
        padding: 10px;
        font-size: 12px;
    }
    
    /* Plan cards */
    .rp-plans-grid {
        gap: 10px;
    }
    .rp-plan-card {
        padding: 14px;
    }
    .rp-plan-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .rp-plan-name {
        font-size: 14px;
        padding-right: 60px;
    }
    .rp-plan-subtitle {
        font-size: 12px;
    }
    .rp-plan-status {
        font-size: 10px;
        padding: 3px 6px;
    }
    .rp-plan-badge {
        font-size: 11px;
    }
    
    /* Active plan view */
    .rp-active-header {
        padding: 12px 16px;
    }
    .rp-active-name {
        font-size: 16px;
    }
    .rp-active-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .rp-active-back {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    /* Progress card compact */
    .rp-progress-card {
        padding: 12px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .rp-progress-circle {
        width: 64px;
        height: 64px;
    }
    .rp-progress-circle svg {
        width: 64px;
        height: 64px;
    }
    .rp-progress-circle-text {
        font-size: 13px;
    }
    .rp-progress-buttons {
        width: 100%;
        justify-content: center;
    }
    .rp-abandon-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    /* Today section */
    .rp-active-content {
        padding: 16px;
    }
    .rp-section-title {
        font-size: 13px;
    }
    .rp-today-header {
        padding: 10px 14px;
    }
    .rp-today-day {
        font-size: 13px;
    }
    .rp-today-date {
        font-size: 11px;
    }
    .rp-today-passages {
        padding: 6px;
    }
    .rp-passage-item {
        padding: 10px;
        gap: 10px;
    }
    .rp-passage-check {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    .rp-passage-name {
        font-size: 13px;
    }
    .rp-read-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    .rp-mark-done-btn {
        padding: 14px;
        font-size: 13px;
    }
    
    /* Bible reader */
    .rp-reader-header {
        padding: 10px 14px;
    }
    .rp-reader-title {
        font-size: 13px;
    }
    .rp-reader-toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 14px;
    }
    .rp-toolbar-group {
        width: 100%;
        justify-content: space-between;
    }
    .rp-version-select {
        flex: 1;
        min-width: auto;
        max-width: 100%;
        padding: 10px 32px 10px 12px;
        font-size: 14px;
    }
    .rp-font-controls {
        flex-shrink: 0;
    }
    .rp-reader-content {
        padding: 14px;
        font-size: 16px;
        line-height: 1.9;
    }
    .rp-reader-nav {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
    }
    .rp-reader-nav-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    /* Progress tab */
    .rp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .rp-stat-card {
        padding: 12px;
    }
    .rp-stat-card .rp-stat-value {
        font-size: 22px;
    }
    .rp-stat-card .rp-stat-label {
        font-size: 12px;
    }
    
    /* Verse of day */
    .rp-verse-of-day {
        padding: 12px 14px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .rp-verse-icon {
        display: none;
    }
    .rp-verse-text {
        font-size: 14px;
    }
    
    /* Motivation message */
    .rp-motivation-message {
        padding: 10px 14px;
        gap: 10px;
    }
    .rp-motivation-icon {
        font-size: 18px;
    }
    .rp-motivation-text {
        font-size: 12px;
    }
    
    /* Goal section */
    .rp-goal-section,
    .rp-chart-section,
    .rp-notes-journal-section {
        padding: 14px;
    }
    .rp-goal-section h4,
    .rp-chart-section h4,
    .rp-notes-journal-section h4,
    .rp-active-plans-section h4,
    .rp-achievements h4 {
        font-size: 12px;
    }
    
    /* Week chart */
    .rp-week-chart {
        padding: 12px 4px 8px;
        gap: 4px;
    }
    .rp-chart-bar {
        width: 20px;
    }
    .rp-chart-label {
        font-size: 10px;
    }
    
    /* Badges grid */
    .rp-badges-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .rp-badge {
        padding: 10px 4px 8px;
    }
    .rp-badge-icon {
        font-size: 18px;
    }
    .rp-badge-name {
        font-size: 9px;
    }
    .rp-badge-desc {
        display: none;
    }
    
    /* Calendar */
    .rp-calendar-section {
        padding: 14px;
    }
    .rp-calendar {
        padding: 12px;
    }
    .rp-calendar-title {
        font-size: 14px;
    }
    .rp-calendar-day {
        font-size: 12px;
    }
    .rp-calendar-weekday {
        font-size: 10px;
    }
    
    /* Share section */
    .rp-share-joy {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .rp-share-buttons {
        justify-content: center;
    }
    
    /* Notes section */
    .rp-notes-section {
        padding: 12px 14px;
    }
    .rp-notes-textarea {
        min-height: 70px;
        font-size: 14px;
    }
    
    /* Journal notes */
    .rp-note-entry {
        padding: 10px;
    }
    .rp-note-plan {
        font-size: 11px;
    }
    .rp-note-text {
        font-size: 12px;
    }
    
    /* Footer */
    .rp-footer {
        padding: 10px 16px;
        font-size: 8px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
        align-items: center;
    }
    
    /* Ambient control - centré sur mobile */
    .rp-ambient-control {
        gap: 6px;
        order: -1;
    }
    .rp-ambient-label {
        display: none;
    }
    .rp-ambient-btn {
        width: 36px;
        height: 36px;
    }
    .rp-ambient-waves span {
        width: 3px;
    }
    
    /* Modals */
    .rp-confirm-modal {
        padding: 24px 20px;
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    .rp-confirm-title {
        font-size: 18px;
    }
    .rp-confirm-message {
        font-size: 14px;
    }
    .rp-confirm-actions {
        flex-direction: column;
    }
    .rp-confirm-btn {
        width: 100%;
    }
    
    /* Completion modal */
    .rp-completion-modal {
        padding: 20px 16px;
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    .rp-completion-title {
        font-size: 16px;
    }
    .rp-completion-message {
        font-size: 12px;
    }
    
    /* Blocked message */
    .rp-blocked-content {
        padding: 24px 20px;
        margin: 16px;
    }
    .rp-blocked-content i {
        font-size: 40px;
    }
    .rp-blocked-content p {
        font-size: 14px;
    }
    
    /* Active plans in progress tab */
    .rp-active-plans-section {
        margin-top: 16px;
    }
    .rp-active-plan-item {
        padding: 10px;
        gap: 10px;
    }
    .rp-active-plan-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .rp-active-plan-name {
        font-size: 12px;
    }
}

/* ============================================
   TRÈS PETIT MOBILE (max-width: 380px)
   ============================================ */
@media (max-width: 380px) {
    .rp-header h1 {
        font-size: 14px;
    }
    
    .rp-tab {
        padding: 10px 8px;
        font-size: 11px;
    }
    .rp-tab i {
        display: none;
    }
    
    .rp-category-btn {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    .rp-plan-name {
        font-size: 13px;
    }
    
    .rp-badges-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .rp-badge {
        padding: 8px 2px 6px;
    }
    .rp-badge-icon {
        font-size: 16px;
    }
    .rp-badge-name {
        font-size: 8px;
    }
    
    .rp-stats-grid {
        gap: 8px;
    }
    .rp-stat-card .rp-stat-value {
        font-size: 20px;
    }
    
    .rp-week-chart {
        gap: 2px;
    }
    .rp-chart-bar {
        width: 16px;
    }
    .rp-chart-bar-container {
        height: 50px;
    }
}

/* ============================================
   AMÉLIORATION PERFORMANCES - TOUCH DEVICES
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter les zones tactiles */
    .rp-close-btn {
        width: 44px;
        height: 44px;
    }
    
    .rp-tab {
        min-height: 44px;
    }
    
    .rp-category-btn {
        min-height: 40px;
    }
    
    .rp-plan-card {
        padding: 16px;
    }
    
    .rp-passage-item {
        min-height: 48px;
    }
    
    .rp-read-btn {
        padding: 8px 14px;
        min-height: 36px;
    }
    
    .rp-font-btn {
        width: 36px;
        height: 36px;
    }
    
    .rp-share-btn {
        width: 44px;
        height: 44px;
    }
    
    .rp-calendar-nav {
        width: 40px;
        height: 40px;
    }
    
    /* Désactiver les effets hover sur touch */
    .rp-plan-card:hover,
    .rp-category-btn:hover,
    .rp-passage-item:hover {
        transform: none;
    }
    
    /* Smooth scrolling */
    .rp-tab-content,
    .rp-active-content,
    .rp-reader-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* ============================================
   ORIENTATION PAYSAGE SUR MOBILE
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .rp-header {
        padding: 8px 16px;
    }
    .rp-header-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .rp-header h1 {
        font-size: 14px;
    }
    
    .rp-welcome {
        padding: 16px;
    }
    .rp-welcome-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin-bottom: 12px;
    }
    .rp-welcome-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    .rp-welcome-stats {
        margin-bottom: 20px;
    }
    
    .rp-tab {
        padding: 10px 8px;
    }
    
    .rp-progress-card {
        flex-direction: row;
        text-align: left;
    }
    
    .rp-confirm-modal,
    .rp-completion-modal {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ============================================
   SAFE AREA POUR NOTCH (iPhone X+)
   ============================================ */
@supports (padding: max(0px)) {
    .reading-plan-panel {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .rp-header {
        padding-top: max(12px, calc(env(safe-area-inset-top) + 8px));
    }
    
    .rp-footer {
        padding-bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px));
    }
}

/* ============================================
   PRINT - HIDDEN
   ============================================ */
@media print {
    .reading-plan-overlay,
    .reading-plan-panel {
        display: none !important;
    }
}

/* === AMBIENT AUDIO CONTROL === */
.rp-ambient-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.rp-ambient-control:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: #3b82f6;
}
.rp-ambient-control.playing {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border-color: #3b82f6;
}
.rp-ambient-control.playing .rp-ambient-title,
.rp-ambient-control.playing .rp-ambient-station {
    color: white;
}
.rp-ambient-control.playing .rp-ambient-btn {
    background: white;
    color: #3b82f6;
}
.rp-ambient-control.playing .rp-ambient-waves span {
    background: white;
}
.rp-ambient-label {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.rp-ambient-title {
    font-size: 9px;
    font-weight: 600;
    color: var(--rp-text);
}
.rp-ambient-station {
    font-size: 8px;
    color: #3b82f6;
    font-weight: 500;
}
.rp-ambient-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.rp-ambient-btn:hover {
    transform: scale(1.1);
}
.rp-ambient-btn .rp-icon-play { display: block; }
.rp-ambient-btn .rp-icon-pause { display: none; }
.rp-ambient-control.playing .rp-ambient-btn .rp-icon-play { display: none; }
.rp-ambient-control.playing .rp-ambient-btn .rp-icon-pause { display: block; }

/* Sound waves animation */
.rp-ambient-waves {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}
.rp-ambient-waves span {
    width: 2px;
    background: #3b82f6;
    border-radius: 1px;
    animation: none;
}
.rp-ambient-waves span:nth-child(1) { height: 4px; }
.rp-ambient-waves span:nth-child(2) { height: 8px; }
.rp-ambient-waves span:nth-child(3) { height: 12px; }
.rp-ambient-waves span:nth-child(4) { height: 6px; }
.rp-ambient-waves span:nth-child(5) { height: 10px; }
.rp-ambient-control.playing .rp-ambient-waves span {
    animation: rp-wave 0.8s ease-in-out infinite;
}
.rp-ambient-control.playing .rp-ambient-waves span:nth-child(1) { animation-delay: 0s; }
.rp-ambient-control.playing .rp-ambient-waves span:nth-child(2) { animation-delay: 0.1s; }
.rp-ambient-control.playing .rp-ambient-waves span:nth-child(3) { animation-delay: 0.2s; }
.rp-ambient-control.playing .rp-ambient-waves span:nth-child(4) { animation-delay: 0.3s; }
.rp-ambient-control.playing .rp-ambient-waves span:nth-child(5) { animation-delay: 0.4s; }

@keyframes rp-wave {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

/* ========================================
   MODAL DE CONFIRMATION PERSONNALISÉE
   ======================================== */

.rp-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.rp-confirm-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.rp-confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 480px;
    width: 92%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    text-align: center;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.25s ease;
}

.rp-confirm-overlay.visible .rp-confirm-modal {
    transform: scale(1) translateY(0);
}

.rp-confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 22px;
}

.rp-confirm-icon-warning {
    background: #fef3c7;
    color: #f59e0b;
}

.rp-confirm-icon-danger {
    background: #fee2e2;
    color: #ef4444;
}

.rp-confirm-icon-info {
    background: #dbeafe;
    color: #3b82f6;
}

.rp-confirm-icon-success {
    background: #d1fae5;
    color: #10b981;
}

.rp-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px;
}

.rp-confirm-message {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 28px;
    line-height: 1.7;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.rp-confirm-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.rp-confirm-btn {
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 120px;
}

.rp-confirm-cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.rp-confirm-cancel:hover {
    background: #e5e7eb;
}

.rp-confirm-ok {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.rp-confirm-ok:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Type danger pour le bouton OK */
.rp-confirm-icon-danger ~ .rp-confirm-actions .rp-confirm-ok {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.rp-confirm-icon-danger ~ .rp-confirm-actions .rp-confirm-ok:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Dark mode */
[data-theme="dark"] .rp-confirm-modal {
    background: #1f2937;
}

[data-theme="dark"] .rp-confirm-title {
    color: #f9fafb;
}

[data-theme="dark"] .rp-confirm-message {
    color: #9ca3af;
}

[data-theme="dark"] .rp-confirm-cancel {
    background: #374151;
    color: #d1d5db;
}

[data-theme="dark"] .rp-confirm-cancel:hover {
    background: #4b5563;
}
