/* ============================
   PAUSE & BIEN-ETRE - Espace Cocon
   v1.0.0
   ============================ */

/* Container principal - effet cocon */
.wellness-space {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg,
        rgba(var(--accent-rgb, 99,102,241), 0.03) 0%,
        transparent 50%,
        rgba(var(--accent-rgb, 99,102,241), 0.02) 100%);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.wellness-space::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(147, 130, 220, 0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(120, 180, 200, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: wellness-ambient 20s ease-in-out infinite alternate;
}

@keyframes wellness-ambient {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-2%, -1%) rotate(3deg); }
}

.wellness-space > * { position: relative; z-index: 1; }

/* Header */
.wellness-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
}

.wellness-header h1 {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text);
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.wellness-header p {
    color: var(--text-secondary, var(--text));
    opacity: 0.6;
    font-size: 0.95rem;
    font-weight: 300;
    margin: 0;
}

/* Layout grille */
.wellness-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cartes cocon */
.wellness-card {
    background: var(--bg-card, var(--bg-secondary, rgba(255,255,255,0.03)));
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.wellness-card:hover {
    border-color: rgba(147, 130, 220, 0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.wellness-card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wellness-card-title .wc-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* === ROUE DES EMOTIONS === */
.wellness-card--emotions {
    grid-column: 1 / -1;
}

.emotion-wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.emotion-wheel {
    position: relative;
    width: 320px;
    height: 320px;
}

.emotion-wheel svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.emotion-slice {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    transform-origin: 160px 160px;
}

.emotion-slice:hover {
    filter: brightness(1.15);
    transform: scale(1.04);
}

.emotion-slice.active {
    filter: brightness(1.25) saturate(1.2);
    transform: scale(1.08);
}

.emotion-slice text {
    pointer-events: none;
    fill: rgba(255,255,255,0.95);
    font-size: 11px;
    font-weight: 500;
    text-anchor: middle;
    dominant-baseline: central;
}

.emotion-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card, var(--bg-secondary, #1a1a2e));
    border: 2px solid var(--border, rgba(255,255,255,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 2;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.emotion-label {
    text-align: center;
    min-height: 2.4rem;
}

.emotion-label-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.3s ease;
}

.emotion-label-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.emotion-label-sub {
    font-size: 0.82rem;
    color: var(--text-secondary, var(--text));
    opacity: 0.5;
    margin-top: 0.2rem;
}

/* === CITATION === */
.wellness-card--quote {
    display: flex;
    flex-direction: column;
}

.quote-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0;
    min-height: 160px;
}

.quote-text {
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 300;
    color: var(--text);
    line-height: 1.7;
    max-width: 90%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.quote-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.quote-author {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary, var(--text));
    opacity: 0.5;
    font-weight: 400;
}

.quote-refresh-btn {
    align-self: center;
    margin-top: 1rem;
    background: transparent;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    color: var(--text-secondary, var(--text));
    opacity: 0.5;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.quote-refresh-btn:hover {
    opacity: 0.8;
    border-color: rgba(147, 130, 220, 0.3);
}

/* === LECTEUR MEDITATION === */
.wellness-card--meditation {
    display: flex;
    flex-direction: column;
}

.meditation-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.3rem;
    scrollbar-width: thin;
}

.meditation-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
}

.meditation-item:hover {
    background: rgba(147, 130, 220, 0.06);
    border-color: rgba(147, 130, 220, 0.1);
}

.meditation-item.active {
    background: rgba(147, 130, 220, 0.1);
    border-color: rgba(147, 130, 220, 0.2);
}

.meditation-item.playing .med-play-icon {
    color: rgba(147, 130, 220, 0.9);
}

.med-play-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(147, 130, 220, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary, var(--text));
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.meditation-item:hover .med-play-icon {
    background: rgba(147, 130, 220, 0.2);
    opacity: 1;
}

.med-info {
    flex: 1;
    min-width: 0;
}

.med-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.med-duration {
    font-size: 0.75rem;
    color: var(--text-secondary, var(--text));
    opacity: 0.4;
    margin-top: 0.15rem;
}

.meditation-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary, var(--text));
    opacity: 0.4;
    font-size: 0.9rem;
}

/* Player bar */
.meditation-player {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: rgba(147, 130, 220, 0.06);
    border: 1px solid rgba(147, 130, 220, 0.1);
    display: none;
}

.meditation-player.visible {
    display: block;
}

.mp-now-playing {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.8rem;
    text-align: center;
}

.mp-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mp-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(147, 130, 220, 0.15);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mp-btn:hover {
    background: rgba(147, 130, 220, 0.25);
}

.mp-btn--main {
    width: 48px;
    height: 48px;
    background: rgba(147, 130, 220, 0.25);
}

.mp-progress-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mp-progress-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(147, 130, 220, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.mp-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: rgba(147, 130, 220, 0.5);
    width: 0%;
    transition: width 0.2s linear;
}

.mp-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary, var(--text));
    opacity: 0.4;
}

.mp-volume {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mp-volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(147, 130, 220, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.mp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(147, 130, 220, 0.6);
    cursor: pointer;
}

.mp-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(147, 130, 220, 0.6);
    cursor: pointer;
    border: none;
}

/* Humeur badge tags */
.mood-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.mood-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: rgba(147, 130, 220, 0.08);
    color: var(--text-secondary, var(--text));
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .wellness-grid {
        grid-template-columns: 1fr;
    }

    .wellness-space {
        padding: 1rem;
    }

    .emotion-wheel {
        width: 260px;
        height: 260px;
    }

    .emotion-center {
        width: 64px;
        height: 64px;
        font-size: 1.6rem;
    }

    .mp-volume { display: none; }
}


/* Override view-container defaults for full-bleed wellness layout */
#view-pause-bien-etre.view-container {
    padding: 0;
    max-width: none;
    overflow-y: auto;
}

#view-pause-bien-etre.active {
    display: block;
}

/* === Premium quote navigation buttons === */
.wellness-nav-btn {
    background: rgba(147, 130, 220, 0.10);
    border: 1px solid rgba(147, 130, 220, 0.20);
    color: var(--text, #e0e0e0);
    cursor: pointer;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.wellness-nav-btn:hover {
    background: rgba(147, 130, 220, 0.22);
    border-color: rgba(147, 130, 220, 0.45);
    transform: scale(1.12);
    box-shadow: 0 0 16px rgba(147, 130, 220, 0.25);
}
.wellness-nav-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}
.wellness-nav-btn svg {
    opacity: 0.85;
    transition: opacity 0.2s;
}
.wellness-nav-btn:hover svg {
    opacity: 1;
}

.wellness-audio-btn {
    background: rgba(147, 130, 220, 0.12);
    border: 1px solid rgba(147, 130, 220, 0.25);
    color: var(--text, #e0e0e0);
    padding: 0.55rem 1.4rem;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.wellness-audio-btn:hover {
    background: rgba(147, 130, 220, 0.22);
    border-color: rgba(147, 130, 220, 0.45);
    box-shadow: 0 0 20px rgba(147, 130, 220, 0.2);
    transform: translateY(-1px);
}
.wellness-audio-btn:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}
