:root {
    --bg-color: #fcf9f2;
    --text-main: #4a5d4e;
    --text-light: #7a8b7d;
    --primary-color: #e6b9a6;
    --secondary-color: #d9c5b2;
    --accent-color: #8c9e8e;
    --bg-gradient: linear-gradient(135deg, #fdfbf7 0%, #f4eee0 100%);
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-soft: 'Quicksand', sans-serif;
    --font-poetic: 'Cormorant Garamond', serif;
    --font-arabic: 'Amiri', serif;
    --font-brand: 'Philosopher', sans-serif;
    --font-brand-ar: 'Reem Kufi', sans-serif;
    --soft-shadow: 0 10px 30px rgba(140, 158, 142, 0.15);
}

/* --- Styles spécifiques à l'arabe (Amiri) --- */
.lang-ar button,
.lang-ar .btn-primary,
.lang-ar .action-btn,
.lang-ar .action-btn-small,
.lang-ar select,
.lang-ar input,
.lang-ar textarea,
.lang-ar .main-title,
.lang-ar h2,
.lang-ar h3,
.lang-ar .slogan,
.lang-ar .subtitle,
.lang-ar .quote-box,
.lang-ar .reading-body,
.lang-ar .date-display,
.lang-ar .note-content,
.lang-ar .note-date,
.lang-ar .badge,
.lang-ar #breathing-instruction {
    font-family: var(--font-arabic) !important;
}

.lang-ar .main-title {
    font-family: var(--font-brand-ar) !important;
    font-size: 5.5rem;
}

.lang-ar .action-btn, .lang-ar .btn-primary {
    font-size: 1.3rem;
    font-weight: 700;
}

.lang-ar .quote-box {
    border: 1px solid rgba(140, 158, 142, 0.15);
    border-radius: 24px;
    text-align: center;
}

.lang-ar .reading-body {
    text-align: center;
}

.lang-ar .reading-header {
    text-align: center;
}

.lang-ar .btn-back svg {
    transform: rotate(180deg);
}


[data-theme="yin"] {
    --bg-color: #f0f4f8;
    --text-main: #3b4d61;
    --text-light: #6a7b8e;
    --primary-color: #a6c0e6;
    --secondary-color: #b2cdd9;
    --accent-color: #7a9e9f;
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e0eaf5 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: var(--font-sans); background-color: var(--bg-color); color: var(--text-main); min-height: 100vh; overflow-x: hidden; transition: background 1.5s ease, color 1.5s ease; }
body::before {
    content: '';
    position: fixed;
    top: -2%; left: -2%;
    width: 104%; height: 104%;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
    z-index: -1;
    animation: gentleBreeze 12s infinite alternate ease-in-out;
    pointer-events: none;
}
@keyframes gentleBreeze {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-15px, 8px) scale(1.03); }
}

#app { width: 100%; height: 100vh; position: relative; }

.view { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity 1s ease-in-out; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding-top: 2rem; overflow-y: auto; }
.view.active { opacity: 1; pointer-events: all; z-index: 10; }
.view.hidden, .hidden { display: none !important; }
#auth-modal:not(.hidden) { display: flex !important; flex-direction: column; justify-content: center; align-items: center; }

/* Splash Screen */
#splash-screen { text-align: center; padding: 2rem; }
.splash-content { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 100%; }
.app-logo { width: 220px; height: 220px; object-fit: contain; margin-bottom: 0.5rem; animation: fadeInDown 1.5s ease forwards; mix-blend-mode: multiply; }
.container { width: 90%; max-width: 600px; background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(25px); border-radius: 30px; padding: 3rem; box-shadow: var(--soft-shadow); text-align: center; border: 1px solid rgba(255,255,255,0.4); margin-bottom: 2rem; }

/* Onboarding container plus large sur desktop */
.onboarding-container {
    max-width: 820px;
    padding: 3.5rem 4rem;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(30px);
}

/* Texte principal d'onboarding — grand, lisible, premium */
.onboarding-main-text {
    font-family: var(--font-soft);
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Bloc notification : heure + bouton */
.onboarding-notif-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    border: 1px solid rgba(140, 158, 142, 0.15);
}

.onboarding-time-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.onboarding-time-label {
    font-family: var(--font-soft);
    font-size: 1rem;
    color: var(--text-light);
    white-space: nowrap;
}

.onboarding-time-input {
    padding: 0.9rem 1.2rem;
    text-align: center;
    font-size: 1.1rem;
    min-width: 140px;
    border-radius: 14px;
}

.onboarding-notif-btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1rem;
    justify-content: center;
}

.onboarding-start-btn {
    width: 100%;
    font-size: 1.15rem;
    padding: 1.3rem 2rem;
    border-radius: 50px;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}
.dashboard-container { margin-top: 3rem; }
.main-title { font-family: var(--font-brand); font-size: 4.5rem; font-style: italic; color: var(--accent-color); margin-bottom: 1rem; animation: fadeInDown 2s ease forwards; }
.subtitle { font-family: var(--font-soft); font-size: 1.3rem; margin-bottom: 3rem; opacity: 0; letter-spacing: 1px; color: var(--text-main); }
.slogan { font-family: var(--font-poetic); font-size: 1.8rem; font-style: italic; line-height: 1.6; color: var(--text-light); opacity: 0; }
.delay-1 { animation: fadeIn 2.5s ease 1.5s forwards; }
.delay-2 { animation: fadeIn 3s ease 4s forwards; }
.delay-3 { animation: fadeIn 2s ease 8s forwards; }

.btn-primary { background: var(--primary-color); color: #fff; border: none; padding: 1.2rem 3rem; border-radius: 50px; font-size: 1.1rem; cursor: pointer; box-shadow: var(--soft-shadow); transition: all 0.4s ease; opacity: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;}
.btn-primary:hover { transform: translateY(-5px); background: var(--accent-color); }
.btn-primary.show { opacity: 1; }
.btn-secondary { background: transparent; color: var(--text-light); border: 1px solid rgba(140, 158, 142, 0.3); padding: 0.8rem 2rem; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; }
.btn-secondary:hover { background: rgba(255,255,255,0.5); color: var(--text-main); }
.btn-back { background: transparent; border: none; color: var(--text-light); font-size: 1rem; cursor: pointer; text-align: left; margin-bottom: 1rem; font-family: var(--font-sans); transition: color 0.3s; display: block; }
.btn-back:hover { color: var(--accent-color); }
.dashboard-container { text-align: center; }
.dashboard-header { display: flex; justify-content: center; align-items: center; margin-bottom: 0.5rem; }
.date-display { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; font-family: var(--font-serif); font-style: italic; }

.onboarding-step { display: none; flex-direction: column; align-items: center; width: 100%; animation: fadeIn 0.5s ease; }
.onboarding-step.active { display: flex; }
.lang-ar .onboarding-step { text-align: center; }
.lang-ar .onboarding-step label { text-align: center; width: 100%; }
.lang-ar .settings-grid { justify-content: center; }
.settings-grid { display: flex; gap: 1rem; width: 100%; justify-content: center; }
.settings-group { flex: 1; min-width: 140px; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }

.flower-container.small { transform: scale(0.6); margin-bottom: 0; }
.flower.slow { animation: breathe 12s infinite ease-in-out; }
.closure-container h2 { font-family: var(--font-serif); font-style: italic; margin-top: 1rem; }
.closure-subtitle { color: var(--text-light); margin-bottom: 2rem; }
.container h2 { font-family: var(--font-serif); font-size: 2.2rem; color: var(--accent-color); margin-bottom: 0.5rem; }
#quiz-title { margin-bottom: 2rem; }

/* Onboarding */
.settings-group { margin-bottom: 2.5rem; text-align: left; }
.theme-selector { display: flex; gap: 1rem; }
.theme-btn { flex: 1; padding: 1.2rem; border-radius: 16px; border: 2px solid transparent; background: rgba(255,255,255,0.7); cursor: pointer; transition: all 0.3s ease; }
.theme-btn.active { border-color: var(--accent-color); transform: scale(1.02); }
.custom-select { width: 100%; padding: 1.2rem; border-radius: 16px; border: 1px solid rgba(140,158,142,0.2); background: rgba(255,255,255,0.7); cursor: pointer; }

/* Fleur de respiration */
.breathing-container { min-height: 450px; }
#breathing-instruction { font-size: 1.2rem; transition: opacity 1s ease; color: var(--text-light); margin-bottom: 2rem;}
.flower-container { position: relative; width: 150px; height: 150px; margin: 3rem auto; display: flex; justify-content: center; align-items: center; }
.flower { position: relative; width: 50px; height: 50px; animation: breathe 10s infinite ease-in-out; }
.petal { position: absolute; width: 50px; height: 50px; background: var(--primary-color); border-radius: 50% 50% 0 50%; opacity: 0.6; transform-origin: bottom right; mix-blend-mode: multiply; transition: background 1.5s ease;}
[data-theme="yin"] .petal { background: var(--primary-color); }
.p1 { transform: rotate(0deg) translate(-50%, -50%); }
.p2 { transform: rotate(60deg) translate(-50%, -50%); }
.p3 { transform: rotate(120deg) translate(-50%, -50%); }
.p4 { transform: rotate(180deg) translate(-50%, -50%); }
.p5 { transform: rotate(240deg) translate(-50%, -50%); }
.p6 { transform: rotate(300deg) translate(-50%, -50%); }
.center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; background: #fff; border-radius: 50%; z-index: 10; box-shadow: 0 0 20px rgba(255,255,255,0.8); }
@keyframes breathe { 0%, 100% { transform: scale(0.8) rotate(0deg); } 50% { transform: scale(2) rotate(90deg); } }

/* Dashboard & Cards */
.card { background: rgba(255, 255, 255, 0.7); border-radius: 20px; padding: 2rem; margin-top: 1.5rem; }
.date-display { font-family: var(--font-sans); color: var(--text-light); font-size: 1.1rem; margin-bottom: 1rem; }
.slider-group { margin-bottom: 2rem; text-align: left; }
.slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.slider-header label { margin-bottom: 0; font-weight: 500; font-family: var(--font-sans); color: var(--text-main); }
.slider-value { background: var(--accent-color); color: white; padding: 2px 10px; border-radius: 12px; font-size: 0.9rem; font-weight: bold; min-width: 25px; text-align: center; }

.slider-controls { display: flex; align-items: center; gap: 0.8rem; }
.slider-icon { font-size: 1.2rem; color: var(--text-light); font-weight: bold; width: 20px; text-align: center; }
.slider-icon.plus { color: var(--accent-color); }

input[type=range].quiz-range { 
    -webkit-appearance: none; 
    width: 100%; 
    height: 8px; 
    border-radius: 10px; 
    background: rgba(140, 158, 142, 0.2); 
    outline: none;
    transition: all 0.3s ease;
}

input[type=range].quiz-range::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    height: 24px; 
    width: 24px; 
    border-radius: 50%; 
    background: white; 
    border: 3px solid var(--accent-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer; 
    transition: transform 0.2s ease;
}

input[type=range].quiz-range::-webkit-slider-thumb:active {
    transform: scale(1.2);
}
.quote-box { 
    font-family: var(--font-serif); 
    font-size: 1.15rem; 
    font-style: italic; 
    color: var(--accent-color); 
    padding: 2rem 1.5rem; 
    background: rgba(255,255,255,0.6); 
    border-radius: 24px; 
    width: 100%;
    margin: 1.5rem 0;
    line-height: 1.6;
    text-align: center;
    border: 1px solid rgba(140, 158, 142, 0.15);
}
.action-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.action-btn { background: rgba(255,255,255,0.8); backdrop-filter: blur(5px); border: 1px solid rgba(140, 158, 142, 0.2); padding: 1rem; border-radius: 16px; font-size: 1.1rem; color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: all 0.3s ease; width: 100%; text-decoration: none; }
.action-btn:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }

.lang-btn { font-size: 1.3rem; padding: 1.5rem; border-radius: 20px; }

/* Coaching Section douce */
.coaching-wrapper { width: 100%; margin-top: 1rem; }
.action-btn-small { background: rgba(255,255,255,0.4); border: 1px solid rgba(140, 158, 142, 0.2); padding: 0.6rem 1rem; border-radius: 30px; font-size: 0.9rem; color: var(--text-main); cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.3s ease; }
.action-btn-small:hover { background: rgba(255,255,255,0.8); }

#coaching-panel { overflow: hidden; transition: max-height 0.5s ease-out, opacity 0.5s ease; }
.coaching-panel-hidden { max-height: 0; opacity: 0; pointer-events: none; }
.coaching-panel-visible { max-height: 500px; opacity: 1; pointer-events: auto; }

.coaching-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(5px); border: 1px solid rgba(140, 158, 142, 0.2); border-radius: 16px; padding: 1rem; text-align: left; }
.coaching-header { display: flex; align-items: center; gap: 0.5rem; color: var(--text-main); font-size: 1.1rem; margin-bottom: 0.8rem; font-family: var(--font-serif); font-weight: 600; }
.coaching-options { display: flex; flex-direction: column; gap: 0.5rem; max-height: 350px; overflow-y: auto; padding-right: 5px; }
.coaching-option { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.8); padding: 0.8rem 1rem; border-radius: 12px; text-decoration: none; color: var(--text-main); transition: all 0.3s ease; font-family: var(--font-sans); flex-shrink: 0; }
.coaching-option:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }
.coaching-option-featured { padding: 1.2rem; font-weight: 700; border: 1.5px solid var(--accent-color); background: rgba(255,255,255,1); }
.coaching-title { font-size: 0.95rem; }
.coaching-price { font-size: 0.9rem; opacity: 0.8; font-style: italic;}

/* Jardin de Notes */
.jardin-list { display: grid; grid-template-columns: 1fr; gap: 1.5rem; padding-bottom: 2rem; }
.note-card { background: rgba(255,255,255,0.7); backdrop-filter: blur(5px); border: 1px solid rgba(140, 158, 142, 0.2); border-radius: 20px; padding: 1.5rem; position: relative; animation: fadeIn 0.5s ease-out; box-shadow: var(--soft-shadow); }
.note-date { font-family: var(--font-serif); font-style: italic; color: var(--accent-color); font-size: 0.9rem; margin-bottom: 0.8rem; display: block; border-bottom: 1px solid rgba(140, 158, 142, 0.1); padding-bottom: 0.5rem; }
.note-content { font-family: var(--font-sans); color: var(--text-main); line-height: 1.6; white-space: pre-wrap; font-size: 1rem; }
.note-delete { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: #cc8888; cursor: pointer; padding: 5px; opacity: 0.5; transition: opacity 0.3s; }
.note-delete:hover { opacity: 1; }
.note-actions { display: flex; gap: 0.8rem; margin-top: 1rem; border-top: 1px solid rgba(140, 158, 142, 0.1); padding-top: 0.8rem; justify-content: flex-end; }
.note-btn { background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(140, 158, 142, 0.2); padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.85rem; color: var(--text-main); cursor: pointer; transition: all 0.3s ease; }
.edit-btn:hover { background: var(--primary-color); color: white; }
.delete-btn { color: #e07a5f; }
.delete-btn:hover { background: #e07a5f; color: white; }
.empty-jardin { text-align: center; padding: 3rem; color: var(--text-light); font-style: italic; }

/* --- Journaling --- */
.journal-container { position: relative; overflow: visible; transition: background 0.5s ease; padding-bottom: 4rem; }
.journal-decor-selector { margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; font-size: 0.9rem; }
.icon { font-size: 1.5rem; display: flex; align-items: center; justify-content: center; color: var(--accent-color); }
.icon svg { stroke: var(--accent-color); }
.lang-ar .icon { margin-right: 0; margin-left: 1rem; }
.small-select { padding: 0.5rem; font-size: 0.9rem; width: auto; flex: 1; margin-left: 1rem; }
#journal-entry { width: 100%; height: 200px; padding: 1.5rem; border-radius: 16px; border: 1px solid rgba(140, 158, 142, 0.3); background: rgba(255,255,255,0.6); font-family: var(--font-serif); font-size: 1.2rem; color: var(--text-main); resize: none; margin-bottom: 1.5rem; outline: none; transition: all 0.5s ease; overflow-y: auto; }
#journal-entry:focus { background: rgba(255,255,255,0.9); box-shadow: 0 0 0 3px rgba(140, 158, 142, 0.1); }
#journal-entry.burning { animation: burnEffect 2s forwards; }
.journal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.danger-btn { color: #e07a5f; border-color: rgba(224, 122, 95, 0.3); }
.danger-btn:hover { background: #e07a5f; color: white; }
.success-btn { color: #81b29a; border-color: rgba(129, 178, 154, 0.3); }
.success-btn:hover { background: #81b29a; color: white; }

@keyframes burnEffect {
    0% { transform: scale(1); filter: sepia(0) hue-rotate(0deg); opacity: 1; }
    50% { transform: scale(0.95); filter: sepia(1) hue-rotate(-50deg) saturate(3); opacity: 0.8; background: #ffe6cc; color: transparent; text-shadow: 0 0 5px #e07a5f;}
    100% { transform: scale(0.9) translateY(-20px); filter: blur(5px); opacity: 0; }
}

/* --- Landing Page Premium --- */
#view-landing {
    background: transparent;
    overflow-y: auto;
    height: 100vh;
    position: relative;
}

#view-landing::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
    z-index: -1;
    opacity: 0.8;
}

.landing-hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    text-align: center;
    padding: 2rem;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
}

.landing-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.landing-hero-phrase.large {
    font-size: 2.8rem;
    font-family: var(--font-serif);
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    color: var(--text-main);
}

.landing-subtitle.small {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.landing-mockup-container {
    position: relative;
    z-index: 1;
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: floatPhone 6s infinite ease-in-out;
}

.phone-mockup {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
}

@keyframes floatPhone {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.landing-title {
    font-size: 5rem;
    margin-bottom: 1rem;
    letter-spacing: 5px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.landing-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.landing-nav-top {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 100;
}

.lang-switch-mini {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.mini-lang-btn {
    background: none;
    border: none;
    color: white;
    font-family: var(--font-soft);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    padding: 2px 5px;
}

.mini-lang-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lang-switch-mini .separator {
    opacity: 0.4;
    font-size: 0.8rem;
}

.btn-primary-large {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-primary-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    background: #6a8c7a;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    margin: 2rem auto;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg {
    width: 24px;
    height: 24px;
}

.landing-install-hint {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 2px;
    height: 40px;
    background: rgba(255,255,255,0.5);
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background: white;
    animation: scrollDown 2s infinite ease-in-out;
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(25px); opacity: 0; }
}

.landing-sections {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.landing-intro {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    padding: 0 1rem;
}

#land-intro-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--text-main);
    font-family: var(--font-poetic);
    font-style: italic;
    animation: fadeIn 2s ease forwards;
}

.landing-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem 3rem;
}

.lang-ar #land-intro-text {
    font-family: var(--font-arabic);
    font-size: 1.5rem;
    line-height: 1.6;
}

.landing-card-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 colonnes pour l'harmonie */
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto 4rem;
}

@media (max-width: 600px) {
    .landing-card-section {
        grid-template-columns: 1fr; /* Une seule colonne pour un alignement vertical parfait */
    }
}

.feature-icon.green {
    color: var(--accent-color);
}

.feature-card.compact {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3rem 2rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(140, 158, 142, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover { transform: translateY(-10px); }

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.feature-card:hover p {
    opacity: 1;
    transform: translateY(0);
}

.feature-card h3 {
    transition: transform 0.4s ease;
}

.feature-card:hover h3 {
    transform: translateY(-5px);
}

.philosophy-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid rgba(140, 158, 142, 0.1);
}

.philosophy-section h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.philosophy-section p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-main);
    font-style: italic;
}

/* RTL Adjustment for Landing */
.lang-ar .landing-hero { text-align: right; direction: rtl; }
.lang-ar .philosophy-section { direction: rtl; }
.lang-ar .feature-card { direction: rtl; text-align: center; }
/* Le titre et sous-titre d'onboarding sont visibles en arabe comme en français */
.lang-ar #onboarding-subtitle { text-align: center; font-family: var(--font-arabic); font-size: 1.2rem; line-height: 1.8; }
.lang-ar .info-card { text-align: center !important; }
.lang-ar #onboarding-info-text { text-align: center; }
.lang-ar .breathe-text { text-align: center; }
.lang-ar .settings-group { text-align: center; }
.lang-ar .landing-footer { text-align: center; display: flex; justify-content: center; }
/* --- Landing Page Floral Extensions --- */
.landing-breathe-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    margin: 4rem 0;
    border-radius: 50px;
}

.flower-container, .flower-preview {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flower {
    position: relative;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 50%;
}

.petal {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50% 50% 0 50%;
    opacity: 0.8;
    transform-origin: bottom right;
    transition: all 0.5s ease;
}

.p1 { transform: rotate(0deg) translate(-50%, -50%); }
.p2 { transform: rotate(60deg) translate(-50%, -50%); }
.p3 { transform: rotate(120deg) translate(-50%, -50%); }
.p4 { transform: rotate(180deg) translate(-50%, -50%); }
.p5 { transform: rotate(240deg) translate(-50%, -50%); }
.p6 { transform: rotate(300deg) translate(-50%, -50%); }

.center {
    position: absolute;
    width: 25px;
    height: 25px;
    background: #fff;
    border-radius: 50%;
    z-index: 5;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

@keyframes breathe {
    0%, 100% { transform: scale(0.8); }
    50% { transform: scale(1.4); }
}

.landing-flower {
    animation: breathe 10s infinite ease-in-out;
}

.breathe-text h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.landing-reading-preview {
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
}

.reading-preview-card {
    background: linear-gradient(135deg, #fdfbf7 0%, #f5f1e8 100%);
    padding: 3rem;
    border-radius: 40px;
    max-width: 700px;
    text-align: center;
    border: 1px solid rgba(140, 158, 142, 0.2);
}

.preview-tag {
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reading-preview-card h2 {
    margin-top: 1.5rem;
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--accent-color);
}

.reading-preview-card p {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.8;
}

.landing-quotes {
    padding: 4rem 2rem;
    text-align: center;
}

.quote-item p {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--accent-color);
    font-style: italic;
}

.quote-item span {
    display: block;
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 1rem;
}

/* =============================================
   MOBILE MEDIA QUERIES (Centering & Layout)
   ============================================= */
@media (max-width: 768px) {
    body, #app {
        overflow-x: hidden;
        width: 100%;
    }
    .view, #view-landing {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch; /* Restaurer le défilement fluide iOS/Android */
    }
    .landing-sections {
        padding: 2rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    .container {
        width: 95%; 
        padding: 1.5rem 1rem;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
    .reading-body {
        font-size: 1.25rem !important; /* Texte des articles plus grand sur mobile */
    }
    .lang-ar .reading-body {
        font-size: 1.4rem !important; /* Arabe encore plus grand */
    }
    .quote-box {
        font-size: 1.25rem !important; /* Citation quotidienne plus grande */
    }
    .lang-ar .quote-box {
        font-size: 1.45rem !important;
    }
    #breathing-instruction {
        font-size: 1.35rem !important;
    }
    .landing-hero { 
        flex-direction: column; 
        height: auto; 
        padding: 4rem 1rem 2rem 1rem; /* Corriger les paddings latéraux ! */
        align-items: center;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    .landing-content {
        order: 1;
        margin-bottom: 2rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .landing-mockup-container {
        order: 2;
        width: 85%;
        margin: 0 auto 3rem auto;
    }
    .landing-title { font-size: 3.5rem; text-align: center; }
    .landing-hero-phrase.large { font-size: 2rem; text-align: center; }
    .landing-subtitle { text-align: center; }
    
    /* CTA box centré sur mobile */
    .landing-cta-box {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .landing-breathe-section { 
        flex-direction: column; 
        text-align: center; 
        align-items: center;
        gap: 1.5rem; 
        padding: 2rem 1rem;
    }

    .breathe-text {
        text-align: center;
    }

    .landing-intro p {
        font-size: 1.5rem; /* Agrandir la police sur mobile */
        text-align: center;
    }

    .lang-ar .landing-intro p {
        font-size: 1.5rem; /* Encore plus grand en arabe */
        text-align: center;
    }

    .landing-intro, 
    .landing-testimonials,
    .landing-visual-philosophy {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .landing-intro h2, .landing-testimonials h2 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Centrage explicite de tout le contenu du bas */
    .breathe-explainer-section,
    .landing-reading-preview,
    .landing-quotes {
        text-align: center !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .breathe-explainer-text p,
    .land-read-text,
    .quote-item p {
        text-align: center !important;
    }

    .lang-ar .breathe-explainer-text p,
    .lang-ar .land-read-text,
    .lang-ar .quote-item p {
        text-align: center !important;
    }

    .btn-primary-large {
        margin: 0 auto;
        display: block;
    }

    .landing-footer {
        display: flex;
        justify-content: center;
    }

    /* Testimonials Slider sur Mobile */
    .testimonials-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.2rem;
        padding-bottom: 1.5rem;
        -webkit-overflow-scrolling: touch;
        /* Masquer la scrollbar */
        scrollbar-width: none; 
        margin: 0 -1rem; /* Déborder des marges pour slider */
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .testimonials-grid::-webkit-scrollbar {
        display: none;
    }
    .testimonial-card {
        scroll-snap-align: center;
        flex: 0 0 85%; /* Prendre 85% de la largeur pour voir le suivant */
        min-width: 280px;
    }

    /* --- Corrections centrage AR sur mobile --- */
    /* Spécificité plus haute pour écraser le text-align: right du mode AR */
    body.lang-ar .landing-hero,
    .lang-ar .landing-hero {
        text-align: center !important;
        direction: rtl;
    }

    .lang-ar .landing-content {
        text-align: center !important;
        align-items: center;
        direction: rtl;
    }

    .lang-ar .landing-hero-phrase,
    .lang-ar .landing-subtitle,
    .lang-ar .landing-title {
        text-align: center !important;
    }

    .lang-ar .breathe-text {
        text-align: center !important;
    }

    .lang-ar .philosophy-caption {
        text-align: center !important;
        align-items: center;
    }

    .lang-ar .reading-header {
        text-align: center !important;
    }

    .lang-ar .dashboard-header,
    .lang-ar .date-display {
        text-align: center;
    }

    /* Onboarding AR centré sur mobile */
    .lang-ar .settings-group {
        text-align: center !important;
    }

    .lang-ar .slider-header {
        justify-content: center;
        gap: 1rem;
    }

    /* --- Onboarding responsive mobile --- */
    .onboarding-container {
        padding: 2rem 1.2rem;
        max-width: 100%;
    }

    .onboarding-main-text {
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .onboarding-notif-block {
        padding: 1.2rem 1rem;
    }

    .onboarding-time-row {
        flex-direction: column;
        gap: 0.6rem;
    }
}


#fire-animation { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,0.9); z-index: 20; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
#fire-animation.active { opacity: 1; pointer-events: all; }
#fire-animation p { font-family: var(--font-serif); font-size: 1.2rem; color: #e07a5f; margin-top: 1rem; }
.flames { font-size: 4rem; animation: flicker 1s infinite alternate; }
.flames::before { content: "🔥"; }
@keyframes flicker { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.2); opacity: 1; } }

#seed-animation { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,0.9); z-index: 20; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
#seed-animation.active { opacity: 1; pointer-events: all; }
#seed-animation p { font-family: var(--font-serif); font-size: 1.2rem; color: var(--accent-color); margin-top: 1rem; }
.seed-icon { font-size: 4rem; animation: grow 2s infinite alternate; }
@keyframes grow { 0% { transform: scale(0.8); } 100% { transform: scale(1.1); } }

/* Décors de fond du journal */
.bg-minimal { background: rgba(255, 255, 255, 0.5); }
.bg-watercolor-yin { background: linear-gradient(135deg, rgba(166, 192, 230, 0.4), rgba(255,255,255,0.7)); }
.bg-watercolor-yang { background: linear-gradient(135deg, rgba(230, 185, 166, 0.4), rgba(255,255,255,0.7)); }
.bg-nature-leaves { background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><path d="M50 0 C70 30 90 50 50 100 C10 50 30 30 50 0" fill="%234a5d4e"/></svg>') repeat; background-color: rgba(255, 255, 255, 0.8); }

/* --- Lecture --- */
.reading-header { margin-bottom: 2rem; border-bottom: 1px solid rgba(140, 158, 142, 0.2); padding-bottom: 1rem; }
.badge { display: inline-block; background: var(--accent-color); color: white; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.reading-body { text-align: left; line-height: 1.8; color: var(--text-main); font-size: 1.1rem; }
.reading-body p { margin-bottom: 1rem; }
.premium-block { background: linear-gradient(135deg, #f4eee0 0%, #e6b9a6 100%); padding: 1.5rem; border-radius: 16px; text-align: center; color: #4a5d4e; margin-top: 2rem; border: 2px dashed rgba(255,255,255,0.5); }
.premium-title { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 1rem; }
.btn-premium { background: white; color: var(--text-main); border: none; padding: 0.8rem 1.5rem; border-radius: 50px; font-weight: 600; cursor: pointer; transition: transform 0.2s; }
.btn-premium:hover { transform: scale(1.05); }

/* --- Installation Banner --- */
#install-banner {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(140, 158, 142, 0.2);
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.install-banner-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#install-text {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.4;
}

.install-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-install-mini {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-install-mini:hover {
    background: #6a8c7a;
    transform: scale(1.05);
}

.btn-close-mini {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* iOS Specific Style */
.ios-instructions {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    box-shadow: var(--soft-shadow);
}

.ios-instructions p {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.6;
}

.ios-icon-share {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* Section Philosophie Visuelle */
.landing-visual-philosophy {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto;
    border-radius: 48px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.philosophy-bg {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 1s ease;
}

.landing-visual-philosophy:hover .philosophy-bg {
    transform: scale(1.02);
}

.philosophy-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    /* On crée un dégradé qui se fond dans la partie marron de l'image */
    background: linear-gradient(to top, 
        rgba(40, 26, 22, 0.95) 0%, 
        rgba(40, 26, 22, 0.8) 50%, 
        transparent 100%
    );
    color: #fff;
    text-align: center;
}

/* On ajuste l'alignement pour l'arabe */
.lang-ar .philosophy-caption {
    text-align: right;
}

.philosophy-caption h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.philosophy-caption p {
    font-family: var(--font-soft);
    font-size: 1.15rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 850px;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .landing-visual-philosophy {
        margin: 2rem 1rem;
        border-radius: 32px;
    }
    .philosophy-caption {
        padding: 2rem;
        background: rgba(40, 26, 22, 0.9);
        position: relative;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .philosophy-caption h2 {
        font-size: 1.6rem;
    }
    .philosophy-caption p {
        font-size: 1rem;
    }
}

/* Section Témoignages */
.landing-testimonials {
    margin-top: 4rem;
    padding: 2rem 1rem;
    position: relative;
}

.landing-testimonials h2 {
    text-align: center;
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 2.5rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1100px) {
    .testimonials-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.testimonial-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
    font-family: var(--font-soft);
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    opacity: 0.9;
}

.testimonial-text::before {
    content: "“";
    position: absolute;
    top: -30px;
    left: -15px;
    font-size: 5rem;
    color: var(--accent-gold);
    opacity: 0.15;
    font-family: serif;
}

.testimonial-author {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--accent-gold);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    padding-top: 1.2rem;
    display: block;
    line-height: 1.4;
}

/* Jardin Visuel */
.garden-visual-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 3rem 2rem;
    min-height: 200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    border: 1px dashed rgba(140, 158, 142, 0.3);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.garden-item {
    width: 55px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bloom 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 3px 6px rgba(100, 140, 100, 0.2));
}

.garden-item:nth-child(5n+1) { transform: rotate(-8deg); }
.garden-item:nth-child(5n+2) { transform: rotate(12deg); }
.garden-item:nth-child(5n+3) { transform: rotate(-15deg); }
.garden-item:nth-child(5n+4) { transform: rotate(6deg); }
.garden-item:nth-child(5n+5) { transform: rotate(-20deg); }

.garden-item:hover {
    transform: rotate(0deg) scale(1.25) !important;
    filter: drop-shadow(0 5px 10px rgba(100, 140, 100, 0.35));
}

.garden-item svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@keyframes bloom {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.garden-visual-container::after {
    content: "Ton jardin intérieur";
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-family: var(--font-soft);
    font-style: italic;
    opacity: 0.5;
}

/* =============================================
   MODAL D'INSTALLATION PWA
   ============================================= */
.pwa-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: flex-end; /* Slide depuis le bas sur mobile */
    justify-content: center;
    animation: pwaFadeIn 0.3s ease forwards;
}

.pwa-modal-overlay.hidden {
    display: none !important;
}

@keyframes pwaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pwa-modal-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 32px 32px 0 0;
    padding: 2rem 1.8rem 2.5rem;
    width: 100%;
    max-width: 520px;
    animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255,255,255,0.6);
}

@keyframes pwaSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.pwa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.pwa-app-icon {
    width: 64px;
    height: 64px;
    background: rgba(140, 158, 142, 0.08);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(140, 158, 142, 0.15);
}

.pwa-close-btn {
    background: rgba(140, 158, 142, 0.1);
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pwa-close-btn:hover {
    background: rgba(224, 122, 95, 0.15);
    color: #e07a5f;
}

.pwa-modal-title {
    font-family: var(--font-brand);
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
    font-style: italic;
}

.pwa-modal-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Cas 1 : Android — liste des bénéfices */
.pwa-benefit-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}

.pwa-benefit {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-main);
    background: rgba(140, 158, 142, 0.07);
    padding: 0.7rem 1rem;
    border-radius: 12px;
}

.pwa-benefit-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.pwa-btn-primary {
    width: 100%;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(140, 158, 142, 0.3);
    margin-bottom: 1rem;
    font-family: var(--font-soft);
}

.pwa-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(140, 158, 142, 0.4);
    background: #6a8c7a;
}

.pwa-btn-primary:active {
    transform: translateY(0);
}

/* Cas 2 : iOS — étapes illustrées */
.pwa-ios-intro {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 1.2rem;
    font-weight: 600;
    font-family: var(--font-soft);
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(140, 158, 142, 0.06);
    border-radius: 16px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(140, 158, 142, 0.12);
}

.pwa-step-num {
    width: 28px;
    height: 28px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-step-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 0.5rem;
}

.pwa-step-content p {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0;
}

.pwa-step-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(140, 158, 142, 0.2);
    flex-shrink: 0;
}

.pwa-ios-note {
    font-size: 0.82rem;
    color: var(--text-light);
    background: rgba(230, 185, 166, 0.12);
    border: 1px solid rgba(230, 185, 166, 0.3);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

/* Cas 3 : Non supporté */
.pwa-unsupported-box {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(140, 158, 142, 0.06);
    border-radius: 20px;
    margin-bottom: 1.2rem;
}

.pwa-unsupported-box p {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
}

/* Bouton "Plus tard" */
.pwa-btn-later {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(140, 158, 142, 0.25);
    color: var(--text-light);
    padding: 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-soft);
}

.pwa-btn-later:hover {
    background: rgba(140, 158, 142, 0.08);
    color: var(--text-main);
}

/* Support .pwa-case (sections affichées/cachées) */
.pwa-case {
    animation: fadeIn 0.3s ease forwards;
}

/* RTL (Arabe) */
.lang-ar .pwa-modal-card {
    direction: rtl;
    text-align: right;
}

.lang-ar .pwa-modal-header {
    flex-direction: row-reverse;
}

.lang-ar .pwa-benefit {
    flex-direction: row-reverse;
    text-align: right;
}

.lang-ar .pwa-ios-step {
    flex-direction: row-reverse;
}

.lang-ar .pwa-step-content {
    flex-direction: row-reverse;
    text-align: right;
}

/* Desktop — centre le modal plutôt que de le mettre en bas */
@media (min-width: 520px) {
    .pwa-modal-overlay {
        align-items: center;
    }
    .pwa-modal-card {
        border-radius: 32px;
        max-width: 480px;
        margin: 1rem;
    }
    @keyframes pwaSlideUp {
        from { transform: translateY(30px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
}

/* =============================================
   SECTION EXPLICATION SCIENTIFIQUE RESPIRATION
   ============================================= */
.breathe-explainer-section {
    max-width: 820px;
    margin: 0 auto 4rem;
    padding: 0 1.2rem;
}

.breathe-explainer-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(140, 158, 142, 0.2);
    border-radius: 32px;
    padding: 2.5rem 2.8rem;
    box-shadow: 0 8px 40px rgba(140, 158, 142, 0.12);
    position: relative;
    overflow: hidden;
}

.breathe-explainer-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    border-radius: 32px 32px 0 0;
}

.breathe-explainer-icon {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    display: block;
    text-align: center;
}

.breathe-explainer-text p {
    font-family: var(--font-poetic);
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--text-main);
    margin-bottom: 1.4rem;
    text-align: left;
}

.breathe-explainer-text p:last-child {
    margin-bottom: 0;
}

.breathe-explainer-text p strong,
.breathe-explainer-text strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Version arabe */
.lang-ar .breathe-explainer-text p {
    font-family: var(--font-arabic);
    font-size: 1.25rem;
    line-height: 2;
    text-align: right;
    direction: rtl;
}

.lang-ar .breathe-explainer-card {
    direction: rtl;
}

@media (max-width: 768px) {
    .breathe-explainer-card {
        padding: 1.8rem 1.5rem;
        border-radius: 24px;
    }
    .breathe-explainer-text p {
        font-size: 1.05rem;
        line-height: 1.75;
    }
    .lang-ar .breathe-explainer-text p {
        font-size: 1.1rem;
        line-height: 1.9;
    }
}

/* =============================================
   MAGAZINE MODALS
   ============================================= */
.mag-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    z-index: 99998;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: pwaFadeIn 0.3s ease forwards;
}
.mag-modal-overlay.hidden { display: none !important; }

.mag-modal-card {
    background: rgba(255,255,255,0.98);
    border-radius: 32px 32px 0 0;
    padding: 1.8rem 1.8rem 2.5rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: pwaSlideUp 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
    box-shadow: 0 -10px 60px rgba(0,0,0,0.15);
}

.mag-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.mag-header-title { display: flex; align-items: center; gap: 0.6rem; }
.mag-logo-icon { font-size: 1.4rem; }
.mag-modal-title {
    font-family: var(--font-brand);
    font-size: 1.45rem;
    color: var(--accent-color);
    font-style: italic;
    margin: 0;
}
.mag-close-btn {
    background: rgba(140,158,142,0.1);
    border: none; color: var(--text-light);
    width: 34px; height: 34px; border-radius: 50%;
    font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; flex-shrink: 0;
}
.mag-close-btn:hover { background: rgba(224,122,95,0.15); color: #e07a5f; }
.mag-modal-desc { font-size: 0.88rem; color: var(--text-light); margin-bottom: 1.2rem; line-height: 1.5; }

/* --- Plans --- */
.mag-plans { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.4rem; }

.mag-plan {
    position: relative;
    border: 2px solid rgba(140,158,142,0.2);
    border-radius: 18px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.7);
}
.mag-plan:hover { border-color: var(--accent-color); }

.mag-plan-selected {
    border-color: var(--accent-color);
    background: rgba(140,158,142,0.06);
    box-shadow: 0 4px 15px rgba(140,158,142,0.15);
}
.mag-plan-badge-tag {
    position: absolute;
    top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--accent-color); color: white;
    padding: 3px 12px; border-radius: 20px;
    font-size: 0.74rem; font-weight: 600;
    font-family: var(--font-soft); white-space: nowrap;
}
.mag-plan-left { display: flex; align-items: center; gap: 0.8rem; }
.mag-plan-icon { font-size: 1.3rem; }
.mag-plan-name { font-size: 0.95rem; font-weight: 600; color: var(--text-main); font-family: var(--font-soft); }
.mag-plan-price { font-size: 1.05rem; font-weight: 700; color: var(--accent-color); margin-top: 0.15rem; }
.mag-price-alt { font-size: 0.82rem; color: var(--text-light); font-weight: 400; }
.mag-plan-radio {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid rgba(140,158,142,0.35);
    flex-shrink: 0; transition: all 0.2s ease;
}
.mag-radio-checked {
    border-color: var(--accent-color);
    background: var(--accent-color);
    box-shadow: inset 0 0 0 4px white;
}

/* --- Paiement --- */
.mag-pay-method-title {
    font-size: 0.78rem; font-weight: 700;
    color: var(--text-light); text-transform: uppercase;
    letter-spacing: 0.6px; margin-bottom: 0.7rem;
    font-family: var(--font-soft);
}
.mag-payment-options { display: flex; flex-direction: column; gap: 0.6rem; }

.mag-pay-btn {
    display: flex; align-items: center; gap: 0.8rem;
    background: rgba(255,255,255,0.8);
    border: 1.5px solid rgba(140,158,142,0.2);
    border-radius: 16px; padding: 0.85rem 1rem;
    cursor: pointer; transition: all 0.25s ease;
    text-align: left; width: 100%;
}
.mag-pay-btn:hover { border-color: var(--accent-color); background: rgba(140,158,142,0.05); transform: translateX(3px); }
.mag-pay-icon { font-size: 1.4rem; flex-shrink: 0; }
.mag-pay-text { display: flex; flex-direction: column; flex: 1; gap: 0.1rem; }
.mag-pay-label { font-size: 0.95rem; font-weight: 600; color: var(--text-main); font-family: var(--font-soft); }
.mag-pay-sub { font-size: 0.8rem; color: var(--text-light); }
.mag-arrow { color: var(--text-light); flex-shrink: 0; }

.mag-pay-local { border-color: rgba(229,61,66,0.2); }
.mag-pay-local:hover { border-color: rgba(229,61,66,0.5); }
.mag-pay-wa { border-color: rgba(37,211,102,0.2); }
.mag-pay-wa:hover { border-color: #25D366; }

/* --- Viewer abonné --- */
.mag-viewer-card { }

.mag-subscriber-status {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(140,158,142,0.1);
    padding: 0.6rem 1rem; border-radius: 30px;
    font-size: 0.88rem; color: var(--accent-color);
    font-weight: 600; font-family: var(--font-soft);
    margin-bottom: 1.2rem; width: fit-content;
}
.mag-sub-until { color: var(--text-light); font-weight: 400; }

.mag-cover-card {
    background: linear-gradient(135deg, var(--accent-color) 0%, #5a7a6a 100%);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.mag-cover-deco {
    font-size: 3.5rem;
    opacity: 0.3;
    position: absolute;
    top: -10px; right: -10px;
    transform: rotate(20deg);
}
.mag-cover-brand { color: rgba(255,255,255,0.7); font-size: 0.85rem; font-family: var(--font-arabic); letter-spacing: 2px; margin-bottom: 0.3rem; }
.mag-cover-issue { color: white; font-family: var(--font-serif); font-size: 1.8rem; font-style: italic; margin-bottom: 0.3rem; }
.mag-cover-tagline { color: rgba(255,255,255,0.7); font-size: 0.85rem; font-family: var(--font-soft); }

.mag-viewer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.mag-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.9rem; border-radius: 16px;
    border: none; cursor: pointer; font-size: 0.9rem;
    font-weight: 600; font-family: var(--font-soft);
    transition: all 0.25s ease;
}
.mag-read-btn { background: var(--accent-color); color: white; box-shadow: 0 6px 20px rgba(140,158,142,0.35); }
.mag-read-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(140,158,142,0.45); }
.mag-dl-btn { background: rgba(140,158,142,0.1); color: var(--accent-color); border: 1.5px solid rgba(140,158,142,0.3); }
.mag-dl-btn:hover { background: rgba(140,158,142,0.15); transform: translateY(-2px); }

/* RTL — Arabe */
.lang-ar .mag-modal-card { direction: rtl; text-align: right; }
.lang-ar .mag-modal-header { flex-direction: row-reverse; }
.lang-ar .mag-plan { flex-direction: row-reverse; }
.lang-ar .mag-plan-left { flex-direction: row-reverse; }
.lang-ar .mag-pay-btn { flex-direction: row-reverse; text-align: right; }
.lang-ar .mag-pay-text { align-items: flex-end; }
.lang-ar .mag-pay-btn:hover { transform: translateX(-3px); }
.lang-ar .mag-subscriber-status { flex-direction: row-reverse; }

/* Desktop */
@media (min-width: 520px) {
    .mag-modal-card { border-radius: 32px; max-width: 480px; margin: 1rem; }
    .mag-modal-overlay { align-items: center; }
}

.landing-intro-title {
    font-size: 2.2rem;
    color: var(--text-main);
    font-family: var(--font-brand);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.3;
}
.lang-ar .landing-intro-title {
    font-family: var(--font-brand-ar) !important;
    font-size: 2.5rem;
}

