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

    background-image: url('MECQUE/makkah4.jpg');
    background-size: cover; 
    background-position: center;
    background-attachment: fixed;
}

/* body {
    font-family: 'Arial', sans-serif;
   background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    min-height: 100vh;
    color: #333;
} */

.header {
    background-image: url('MECQUE/makkah4.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
 /* background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); */
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
   
}

.logo-image {
    width: 60px;  /* Ajustez cette valeur selon vos besoins */
    height: 60px; /* Gardez la même valeur pour un ratio carré */
    object-fit: contain; /* Pour garder les proportions */
    margin-right: 15px; /* Espace entre le logo et le texte */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
/* ANCIEN LOGO
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}*/

.logo h1 {
    /*color: #0f4c3a;*/
    /*color: #a1811b;*/
    color:white;
    font-size: 1.5rem;
    font-weight: bold;
}

.language-selector {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 8px 12px;
    background: transparent;
    border: 2px solid  #f1d711;
    border-radius: 20px;
    color: #f1d711;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.lang-btn:hover,
.lang-btn.active {
    background: #0f4c3a;
    color: white;
}

.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
     opacity: 80%;  /* <--- opacity à changer si besoin */
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
    color: white;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 50px;
}

.search-bar button {
    background: #0f4c3a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background: #1e6b4f;
    transform: scale(1.05);
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #0f4c3a;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

.section-title {
    color: white;
    text-align: center;
    font-size: 2rem;
    margin: 3rem 0 2rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.category-card h3 {
    color: #0f4c3a;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.category-card p {
    color: #666;
    text-align: center;
    line-height: 1.6;
}

.footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    
}
/*.footer ul li a {
    text-decoration-color: red;
    text-decoration-line: 2px;
    padding-bottom: 3px;
    background-color: #1e6b4f;
    font-size: 20px;
    border-radius: 10px;

}*/

/* Page catégorie */
.breadcrumb {
    color: white;
    margin-bottom: 2rem;
    background-color: #8b4513;
    padding: 10px;
    border-radius: 15px;
    
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    background-color: #8b4513;
    padding: 10px;
    border-radius: 15px;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

.category-header {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-header .category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.category-header h1 {
    color: #0f4c3a;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-header p {
    color: #666;
    font-size: 1.1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-header h3 {
    color: #0f4c3a;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.article-preview {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.article-link {
    display: inline-block;
    color: #0f4c3a;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.article-link:hover {
    color: #1e6b4f;
    transform: translateX(5px);
}

/* Page article */
.article-container {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-title {
    color: #0f4c3a;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #666;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.article-content {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content h2 {
    color: #0f4c3a;
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
}

.article-content h3 {
    color: #1e6b4f;
    font-size: 1.4rem;
    margin: 1.5rem 0 0.8rem 0;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: #0f4c3a;
    font-weight: 600;
}

.back-button {
    display: inline-block;
    background:  linear-gradient(135deg, #f5deb3 0%, #d2b48c 50%, #8b4513 100%);
    color: rgb(74, 4, 4);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    font-size: 2.1rem;
}

.back-button:hover {
    background: linear-gradient(135deg, #f5deb3 0%, #d2b48c 50%, #8b4513 100%);
    transform: translateX(-5px);
}

/* Messages */
.loading-message, .error-message {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.error-message h3 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-message button {
    background: #0f4c3a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .categories-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-container {
        padding: 1.5rem;
    }

    .article-title {
        font-size: 1.8rem;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] .article-content ul,
[dir="rtl"] .article-content ol {
    margin-right: 2rem;
    margin-left: 0;
}
/* ============================================
   MODE SOMBRE
   ============================================ */

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

body.dark-mode .header {
    background: rgba(30, 30, 46, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .logo h1 {
    color: #d4af37;
}

body.dark-mode .lang-btn {
    border-color: #d4af37;
    color: #d4af37;
}

body.dark-mode .lang-btn:hover,
body.dark-mode .lang-btn.active {
    background: #d4af37;
    color: #1a1a2e;
}

body.dark-mode .hero-section h1,
body.dark-mode .hero-section p,
body.dark-mode .section-title {
    color: #e0e0e0;
}

body.dark-mode .search-bar {
    background: #2d2d44;
}

body.dark-mode .search-bar input {
    background: #2d2d44;
    color: #e0e0e0;
}

body.dark-mode .search-bar button {
    background: #d4af37;
    color: #1a1a2e;
}

body.dark-mode .stat-card,
body.dark-mode .category-card,
body.dark-mode .article-card,
body.dark-mode .article-container,
body.dark-mode .category-header {
    background: #2d2d44;
    color: #e0e0e0;
}

body.dark-mode .stat-number {
    color: #d4af37;
}

body.dark-mode .category-card h3,
body.dark-mode .article-title,
body.dark-mode .category-header h1 {
    color: #d4af37;
}

body.dark-mode .category-card p,
body.dark-mode .stat-label,
body.dark-mode .article-meta,
body.dark-mode .article-preview {
    color: #b0b0b0;
}

body.dark-mode .article-link {
    color: #d4af37;
}

body.dark-mode .article-link:hover {
    color: #f4d03f;
}

body.dark-mode .back-button {
    background: #d4af37;
    color: #1a1a2e;
}

body.dark-mode .footer {
    background: rgba(0, 0, 0, 0.4);
}

body.dark-mode .breadcrumb,
body.dark-mode .breadcrumb a {
    color: #b0b0b0;
}

body.dark-mode .article-content {
    color: #d0d0d0;
}

body.dark-mode .article-content h2,
body.dark-mode .article-content strong {
    color: #d4af37;
}

body.dark-mode .article-content h3 {
    color: #f4d03f;
}

/* ============================================
   BOUTONS FLOTTANTS (BONUS FEATURES)
   ============================================ */

.back-to-top,
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: #0f4c3a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.back-to-top {
    right: 90px;
    bottom: 90px;
}

.dark-mode-toggle {
    right: 90px;
    opacity: 1;
    pointer-events: all;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover,
.dark-mode-toggle:hover {
    background: #1e6b4f;
    transform: scale(1.1);
}

body.dark-mode .back-to-top,
body.dark-mode .dark-mode-toggle {
    background: #d4af37;
    color: #1a1a2e;
}

/* Barre de progression */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4af37, #f4d03f);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Responsive pour les boutons flottants */
@media (max-width: 768px) {
    .back-to-top,
    .dark-mode-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 20px;
    }
    
    .back-to-top {
        right: 75px;
        bottom: 75px;
    }
    
    .dark-mode-toggle {
        right: 75px;
    }
}
/* ============================================
   BOUTONS DE NAVIGATION ENTRE CATÉGORIES
   ============================================ */

.category-nav-btn {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: #0f4c3a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
}

.category-nav-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.category-nav-btn:hover {
    background: #1e6b4f;
    transform: scale(1.1);
}

.category-prev-btn {
    right: 150px;
}

.category-next-btn {
    right: 27px;
}

body.dark-mode .category-nav-btn {
    background: #d4af37;
    color: #1a1a2e;
}

body.dark-mode .category-nav-btn:hover {
    background: #f4d03f;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .category-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 20px;
    }
    
    .category-prev-btn {
        right: 135px;
    }
    
    .category-next-btn {
        right: 15px;
    }
}
/* Tooltip pour les boutons de navigation */
.category-nav-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: normal;
}

.category-nav-btn:hover::before {
    opacity: 1;
}

.category-nav-btn::after {
    content: '';
    position: absolute;
    bottom: 50px;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-nav-btn:hover::after {
    opacity: 1;
}
/* ============================================
   BOUTONS DE NAVIGATION ENTRE ARTICLES
   ============================================ */

.article-nav-btn {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: #0f4c3a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
}

.article-nav-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.article-nav-btn:hover {
    background: #1e6b4f;
    transform: scale(1.1);
}

.article-prev-btn {
    right: 150px;
}

.article-next-btn {
    right: 30px;
}

body.dark-mode .article-nav-btn {
    background: #d4af37;
    color: #1a1a2e;
}

body.dark-mode .article-nav-btn:hover {
    background: #f4d03f;
}

/* Tooltip pour les boutons de navigation d'articles */
.article-nav-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: normal;
    max-width: 200px;
    text-align: center;
}

.article-nav-btn:hover::before {
    opacity: 1;
}

.article-nav-btn::after {
    content: '';
    position: absolute;
    bottom: 50px;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-nav-btn:hover::after {
    opacity: 1;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .article-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 20px;
    }
    
    .article-prev-btn {
        right: 135px;
    }
    
    .article-next-btn {
        right: 15px;
    }
}

/* Bouton de téléchargement */
.download-page-btn {
    position: fixed;
    bottom: 30px;
    right: 210px;
    width: 50px;
    height: 50px;
    background: #0f4c3a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}

.download-page-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.download-page-btn:hover {
    background: #1e6b4f;
    transform: scale(1.1);
}

body.dark-mode .download-page-btn {
    background: #d4af37;
    color: #1a1a2e;
}

body.dark-mode .download-page-btn:hover {
    background: #f4d03f;
}

/* Tooltip pour le bouton de téléchargement */
.download-page-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: normal;
}

.download-page-btn:hover::before {
    opacity: 1;
}

.download-page-btn::after {
    content: '';
    position: absolute;
    bottom: 50px;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.download-page-btn:hover::after {
    opacity: 1;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .download-page-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 20px;
        right: 195px;
    }
}

