@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

:root {
    --pharmia-teal: #0D9488;
    --pharmia-black: #000000;
    --bg-light: #ffffff;
    --text-main: #000000;
    --text-muted: #64748b;
    --radius-xl: 32px;
    --radius-lg: 16px;
    --shadow-premium: 0 20px 40px rgba(0,0,0,0.08);
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Roboto', sans-serif; 
    background-color: var(--bg-light); 
    color: var(--text-main); 
    line-height: 1.8; 
    -webkit-font-smoothing: antialiased; 
    font-size: 1.1rem;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; font-weight: 800; letter-spacing: -0.03em; color: var(--pharmia-black); }

/* --- HEADER --- */
.site-header {
    background: #ffffff;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    height: 85px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container img { width: 180px; height: auto; object-fit: contain; }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-link { color: var(--pharmia-black); text-decoration: none; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.3s; }
.nav-link:hover { color: var(--pharmia-teal); }


/* --- HERO --- */
.hero { 
    text-align: center; 
    padding: 8rem 5% 10rem; 
    background: #000000;
    color: #ffffff;
    border-radius: 0 0 60px 60px;
}
.hero h1 { 
    font-size: clamp(2.5rem, 5vw, 4.5rem); 
    font-weight: 800; 
    letter-spacing: -0.04em; 
    line-height: 1.1; 
    margin-bottom: 1.5rem; 
    color: #ffffff;
}
.hero-description { 
    font-size: 1.3rem; 
    color: rgba(255,255,255,0.7); 
    max-width: 800px; 
    margin: 0 auto 3rem; 
}

/* --- SECTIONS --- */
.section-container { max-width: 1250px; margin: 0 auto 6rem; padding: 0 5%; }
.section-header { margin-bottom: 3rem; position: relative; }
.section-header h2 { font-size: 2.25rem; font-weight: 800; color: var(--pharmia-black); letter-spacing: -0.02em; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

/* --- FEATURE CARD (MÉMOFICHES) --- */
.feature-card {
    background: var(--gradient-teal);
    border-radius: 24px;
    padding: 4rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(13, 148, 136, 0.3);
    transition: transform 0.4s ease;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-content { flex: 1; z-index: 2; }
.feature-content h3 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.feature-content p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2.5rem; max-width: 500px; }
.badge { 
    background: rgba(255,255,255,0.2); 
    backdrop-filter: blur(4px); 
    padding: 0.5rem 1rem; 
    border-radius: 100px; 
    font-size: 0.8rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 1.5rem; 
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.3);
}

/* --- GRID CARDS (MASTERCLASS & WEB) --- */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2rem; 
}

.training-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .training-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .training-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-premium);
    border-color: var(--pharmia-teal);
}
.card .category { 
    font-size: 0.75rem; 
    font-weight: 800; 
    color: var(--pharmia-teal); 
    text-transform: uppercase; 
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}
.card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--pharmia-black); }
.card p { color: var(--text-muted); margin-bottom: 2rem; flex-grow: 1; font-size: 1rem; }

/* --- BUTTONS --- */
.btn { 
    display: inline-block; 
    padding: 1rem 2rem; 
    border-radius: 12px; 
    font-weight: 700; 
    text-decoration: none; 
    transition: all 0.3s; 
    cursor: pointer;
    font-size: 1rem;
}
.btn-primary { background: var(--pharmia-teal); color: white; border: none; }
.btn-primary:hover { background: var(--pharmia-teal-dark); transform: scale(1.02); }
.btn-white { background: white; color: var(--pharmia-teal); border: none; }
.btn-white:hover { background: #f8fafc; transform: scale(1.02); }
.btn-outline { border: 2px solid #e2e8f0; color: var(--text-main); }
.btn-outline:hover { border-color: var(--pharmia-teal); color: var(--pharmia-teal); }

/* --- FOOTER --- */
.site-footer { 
    padding: 4rem 5%; 
    text-align: center; 
    border-top: 1px solid #e2e8f0; 
    color: var(--text-muted);
    background: white;
}

/* --- LIBRARY / FILTER LAYOUT --- */
.library-layout { display: flex; min-height: calc(100vh - 80px); align-items: stretch; }
.library-filters { 
    width: 250px; 
    min-width: 250px; 
    flex-shrink: 0; 
    background: #f8fafc; 
    border-right: 1px solid #e5e7eb; 
    padding: 2rem 1rem; 
    position: sticky; 
    top: 80px; 
    height: calc(100vh - 80px); 
}
.library-main { flex-grow: 1; padding: 4rem 5%; min-width: 0; }
.custom-select { 
    width: 100%; 
    padding: 0.7rem 0.5rem; 
    border-radius: 8px; 
    border: 1px solid #d1d5db; 
    background: white; 
    font-size: 0.9rem; 
    text-overflow: clip; 
    white-space: nowrap; 
}

/* --- PLAYER / LMS LAYOUT --- */
.player-layout { display: flex; height: 100vh; overflow: hidden; }
.player-sidebar { width: 300px; background: #f8fafc; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-top { padding: 1.5rem; border-bottom: 1px solid #e2e8f0; }
.sidebar-top h3 { font-size: 1.1rem; margin-top: 0.5rem; }
.sidebar-content { flex-grow: 1; overflow-y: auto; padding: 0.25rem 0; }
.sidebar-module { margin-bottom: 0.75rem; }
.sidebar-module h4 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0.5rem 0 0.25rem 2rem; font-weight: 700; opacity: 0.7; }
.internal-nav { list-style: none; padding: 0; margin: 0; }
.internal-nav li a { display: flex; align-items: center; gap: 10px; padding: 0.5rem 1.5rem; color: var(--text-main); text-decoration: none; font-size: 0.9rem; border-bottom: 1px solid rgba(0,0,0,0.01); }
.internal-nav li.active a { background: white; color: var(--pharmia-teal); font-weight: 700; border-left: 4px solid var(--pharmia-teal); }

.player-main { flex-grow: 1; display: flex; flex-direction: column; background: white; }
.player-header { padding: 0.75rem 2rem; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; background: #fff; min-height: 56px; }
.player-header h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.lesson-category { font-size: 0.7rem; font-weight: 800; color: var(--pharmia-teal); text-transform: uppercase; margin-right: 1rem; opacity: 0.8; }
.player-content-area { flex-grow: 1; overflow-y: auto; padding: 1.5rem 0; }
.content-inner { max-width: 850px; margin: 0 auto; padding: 0 2rem; }

.tab-pane { display: none !important; }
.tab-pane.active { display: block !important; }

/* --- LMS COMPONENTS --- */
.section-title-large { display: flex; align-items: center; gap: 15px; margin-bottom: 1.25rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 1rem; }
.section-title-large h2 { font-size: 1.5rem; font-weight: 800; margin: 0; color: var(--pharmia-black); }
.title-img-large { width: 40px; height: 40px; object-fit: contain; }
.step-content { font-size: 1.05rem; line-height: 1.6; color: #334155; }
.step-content ul, .step-content .standard-list { 
    padding-left: 2rem !important; 
    margin: 1rem 0 !important; 
    list-style-type: disc !important;
    list-style-position: outside !important;
    display: block !important;
}
.step-content li { 
    margin-bottom: 0.6rem !important; 
    list-style-type: disc !important;
    display: list-item !important;
}

/* --- RED FLAGS SPECIAL STYLING --- */
.red-flags-section {
    border: 3px solid #ff4444; /* Rouge vif et épais */
    background-color: #fff5f5;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.red-flags-section .section-title-large {
    border-bottom-color: #fecaca;
}
.red-flags-section .section-title-large h2 {
    color: #b91c1c;
}
.red-flags-section strong, .red-flags-section b {
    color: #dc2626 !important; /* Force le rouge pour les alertes */
}
.red-flags-section .step-content {
    color: #991b1b;
}

.flashcard-wrapper, .quiz-step { display: none !important; }
.flashcard-wrapper.active, .quiz-step.active { display: block !important; }

.flashcard { height: 260px; perspective: 1000px; cursor: pointer; position: relative; }
.flashcard-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; }
.flashcard.is-flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    backface-visibility: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 2.5rem; 
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
    border: 1px solid #e5e7eb; 
    font-size: 1.4rem; 
    font-family: 'Poppins', sans-serif !important; 
    text-align: center;
}
.flashcard-front { 
    background: white; 
    font-weight: 700; 
    color: var(--pharmia-black); 
}
.flashcard-back { 
    background: var(--pharmia-teal); 
    color: white; 
    transform: rotateY(180deg); 
    font-weight: 400 !important; /* Regular */
}

.quiz-option { padding: 1.25rem; background: white; border: 2px solid #e5e7eb; border-radius: 12px; cursor: pointer; font-weight: 600; margin-bottom: 1rem; font-family: 'Poppins', sans-serif; }
.quiz-option.correct { border-color: #10b981; background: #ecfdf5; }
.quiz-option.wrong { border-color: #ef4444; background: #fef2f2; }
.explanation-box { display: none; background: #f0fdf4; border-left: 4px solid #10b981; padding: 1.5rem; margin-top: 1.5rem; border-radius: 8px; }

.player-footer { padding: 1.5rem 3rem; border-top: 1px solid #e5e7eb; background: #fcfcfc; text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.site-footer { padding: 5rem 5%; text-align: center; color: var(--text-muted); border-top: 1px solid #e5e7eb; background: white; }

@media (max-width: 900px) { .player-sidebar, .library-filters { display: none; } }
