:root {
    --primary: #4A148C;
    --primary-light: #8E24AA;
    --secondary: #FFB300;
    --accent: #8E24AA;
    --bg-light: #FFF8E1;
    --text: #2C3E50;
    --success: #7CB342;
    --shadow: 0 10px 40px rgba(74, 20, 140, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg-light); line-height: 1.6; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--primary); }
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page-container { padding: 40px 20px; }
.page-container h1 { margin-bottom: 20px; }
.page-intro { color: #718096; margin-bottom: 30px; }

/* HEADER */
.main-header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 1000; }
.header-top { background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%); color: #fff; padding: 8px 0; font-size: 13px; }
.header-top .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.top-actions a { color: #fff; margin-left: 15px; text-decoration: none; }
.top-actions a:hover { color: var(--secondary); }
.main-nav .container { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { font-size: 28px; }
.logo-text { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 22px; color: var(--primary); }
.nav-menu { display: flex; list-style: none; gap: 22px; align-items: center; }
.nav-menu > li { position: relative; }
.nav-menu a { color: var(--text); text-decoration: none; font-weight: 500; padding: 8px 0; display: block; }
.nav-menu a:hover { color: var(--primary-light); text-decoration: none; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: var(--shadow); padding: 10px; border-radius: 10px; min-width: 260px; max-height: 400px; overflow-y: auto; z-index: 100; }
.has-dropdown:hover .dropdown { display: block; }
.dropdown li { list-style: none; }
.dropdown a { padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.dropdown a:hover { background: var(--bg-light); }
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--primary); }

/* FLASH */
.flash { padding: 12px 0; font-weight: 500; }
.flash-success { background: #c6f6d5; color: #22543d; }
.flash-error { background: #fed7d7; color: #c53030; }

/* CARROUSEL */
.hero-carousel { position: relative; height: 500px; overflow: hidden; }
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .9s ease; color: #fff; padding: 30px; background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); }
.carousel-slide.active { opacity: 1; }
.slide-content { max-width: 700px; text-align: center; }
.slide-content h1 { color: #fff; font-size: 42px; margin: 15px 0; line-height: 1.2; }
.slide-content p { font-size: 17px; margin-bottom: 25px; opacity: .95; }
.badge { display: inline-block; background: var(--secondary); color: var(--primary); padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.btn-primary {
    display: inline-block; background: var(--secondary); color: var(--primary);
    padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: 700;
    transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); text-decoration: none; }
.carousel-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; transition: background .3s; }
.dot.active { background: var(--secondary); }

/* SECTIONS */
section { padding: 60px 0; }
section h2 { font-size: 32px; text-align: center; margin-bottom: 40px; }

.stats-section { background: #fff; padding: 40px 0; }
.stats-section .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { text-align: center; padding: 25px; background: var(--bg-light); border-radius: 15px; }
.stat-num { display: block; font-size: 40px; font-weight: 700; color: var(--primary); font-family: 'Playfair Display', serif; }
.stat-label { color: var(--text); font-size: 14px; }

.search-section { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); color: #fff; padding: 60px 0; }
.search-section h2 { color: #fff; margin-bottom: 10px; }
.search-sub { text-align: center; margin-bottom: 30px; opacity: .9; }
.search-form { display: flex; max-width: 600px; margin: 0 auto; gap: 10px; }
.search-form input { flex: 1; padding: 15px 20px; border: none; border-radius: 30px; font-size: 16px; }
.search-form button { padding: 15px 30px; border: none; border-radius: 30px; background: var(--secondary); color: var(--primary); font-weight: 700; cursor: pointer; }

.search-form-lg { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }
.search-form-lg input, .search-form-lg select { padding: 12px 15px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 15px; }
.search-form-lg input { flex: 1; min-width: 200px; }
.search-form-lg button { padding: 12px 25px; border: none; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; }
.result-count { color: #718096; margin-bottom: 20px; font-size: 14px; }

/* FICHES GRID */
.fiches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.fiche-card { background: #fff; padding: 25px; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,.05); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.fiche-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.fiche-card-header { margin-bottom: 12px; }
.fiche-theme { font-size: 12px; font-weight: 600; color: var(--primary-light); text-transform: uppercase; }
.fiche-card h3 { font-size: 18px; margin-bottom: 12px; line-height: 1.3; }
.fiche-card h3 a { color: var(--primary); text-decoration: none; }
.fiche-card p { font-size: 14px; color: #4a5568; flex: 1; margin-bottom: 15px; }
.fiche-card-footer { display: flex; justify-content: space-between; font-size: 13px; color: #718096; padding-top: 12px; border-top: 1px solid #edf2f7; }

/* THEMES */
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.theme-card { background: #fff; padding: 25px; border-radius: 15px; text-decoration: none; color: var(--text); box-shadow: 0 4px 20px rgba(0,0,0,.05); border-left: 4px solid var(--theme-color, #4A148C); transition: transform .2s; }
.theme-card:hover { transform: translateY(-3px); text-decoration: none; }
.theme-icone { font-size: 32px; display: block; margin-bottom: 12px; }
.theme-card h3 { font-size: 18px; margin-bottom: 8px; }
.theme-card p { font-size: 13px; color: #718096; margin-bottom: 12px; }
.theme-count { font-size: 12px; font-weight: 600; color: var(--primary-light); }

.theme-header { background: #fff; padding: 30px; border-radius: 15px; margin: 20px 0 30px; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.theme-icone-lg { font-size: 42px; display: block; margin-bottom: 10px; }
.theme-header h1 { margin-bottom: 8px; }

/* FICHE DÉTAIL */
.fiche-priere { max-width: 900px; margin: 40px auto; padding: 40px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.breadcrumb { font-size: 13px; color: #718096; margin-bottom: 25px; }
.breadcrumb a { color: var(--primary-light); }
.fiche-header { text-align: center; padding-bottom: 30px; border-bottom: 2px solid var(--bg-light); margin-bottom: 30px; }
.fiche-header h1 { font-size: 34px; margin-bottom: 15px; line-height: 1.25; }
.fiche-meta { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; color: #718096; font-size: 14px; margin-bottom: 20px; }
.btn-youtube { display: inline-block; background: #FF0000; color: #fff; padding: 10px 25px; border-radius: 25px; text-decoration: none; font-weight: 600; }
.btn-youtube:hover { text-decoration: none; background: #cc0000; }
.note-analyse { background: #e2e8f0; padding: 12px 18px; border-radius: 10px; margin-top: 15px; font-size: 14px; text-align: left; }
.btn-favori { margin-top: 15px; padding: 10px 20px; background: var(--secondary); color: var(--primary); border: none; border-radius: 25px; cursor: pointer; font-weight: 600; }
.btn-favori.active { background: var(--primary); color: #fff; }

.fiche-part { margin-bottom: 40px; }
.fiche-part h2 { font-size: 22px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--secondary); }
.part-content { line-height: 1.85; color: #4a5568; white-space: pre-wrap; font-size: 15px; }
.priere-box {
    background: linear-gradient(135deg, #fef9e7 0%, #fff 100%);
    border-left: 4px solid var(--secondary);
    padding: 30px; border-radius: 10px;
    font-style: italic; line-height: 1.9;
    white-space: pre-wrap;
    color: #4a148c;
    font-size: 15px;
}
.btn-print { margin-top: 20px; padding: 12px 25px; background: var(--primary); color: #fff; border: none; border-radius: 25px; cursor: pointer; font-weight: 600; }
.btn-print:hover { background: var(--primary-light); }

/* TEMOIGNAGES */
.temoignages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.temoignage-card { background: #fff; padding: 25px; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,.05); border-top: 4px solid var(--secondary); }
.temoignage-header { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--primary); font-size: 14px; }
.temoignage-card h4 { font-size: 16px; margin-bottom: 10px; }
.temoignage-card p { font-size: 14px; color: #4a5568; line-height: 1.6; }

/* FAQ */
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item { background: #fff; margin-bottom: 12px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.05); overflow: hidden; }
.faq-item summary { padding: 20px; cursor: pointer; font-weight: 600; color: var(--primary); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; font-size: 22px; font-weight: 300; transition: transform .3s; }
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 20px 20px; color: #4a5568; }

/* PROFIL */
.profil-container { padding: 40px 20px; }
.profil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.profil-card { background: #fff; padding: 30px; border-radius: 15px; box-shadow: var(--shadow); }
.profil-card h2 { font-size: 20px; margin-bottom: 20px; }
.favoris-list { list-style: none; }
.favoris-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #edf2f7; }
.favoris-list li:last-child { border-bottom: none; }
.theme-badge { font-size: 12px; color: #718096; }

/* ACTUALITÉS */
.actualites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.actualite-card { background: #fff; padding: 25px; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.actualite-card h3 { margin: 15px 0; }
.actualite-meta { display: flex; gap: 15px; font-size: 13px; color: #718096; margin-top: 15px; }
.actualite-full { max-width: 800px; margin: 40px auto; background: #fff; padding: 40px; border-radius: 20px; box-shadow: var(--shadow); }
.actualite-full h1 { margin: 15px 0; }
.actualite-content { margin-top: 25px; line-height: 1.8; color: #4a5568; white-space: pre-wrap; }

/* FOOTER */
.main-footer { background: #1a042e; color: #cbb8e8; padding: 50px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.main-footer h4 { color: var(--secondary); font-size: 16px; margin-bottom: 15px; }
.main-footer ul { list-style: none; }
.main-footer ul li { margin-bottom: 8px; }
.main-footer a { color: #cbb8e8; text-decoration: none; font-size: 14px; }
.main-footer a:hover { color: var(--secondary); }
.main-footer .small { font-size: 12px; opacity: .7; margin-top: 10px; }
.footer-bottom { background: #12011f; padding: 15px 0; text-align: center; font-size: 13px; }

/* CONTACT */
.contact-form { max-width: 600px; margin: 20px auto; background: #fff; padding: 30px; border-radius: 15px; box-shadow: var(--shadow); }
.contact-form .form-group { margin-bottom: 15px; }
.contact-form label { display: block; margin-bottom: 5px; font-weight: 500; }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px; border: 2px solid #e2e8f0; border-radius: 8px; font-family: inherit; }
.contact-form .btn-primary { margin-top: 10px; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .profil-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px; box-shadow: var(--shadow); gap: 5px; }
    .nav-menu.open { display: flex; }
    .slide-content h1 { font-size: 26px; }
    .carousel-slide { padding: 20px; }
    .stats-section .container { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .fiche-header h1 { font-size: 24px; }
    .fiche-priere { padding: 25px; }
    .search-form { flex-direction: column; }
}