/* ==== css/variables.css ==== */
:root {
    /* === Palette Mosaïque Persane === */
    --mosaic-emerald: #006d5b;
    --mosaic-emerald-light: #00a381;
    --mosaic-emerald-dark: #004d40;
    --mosaic-turquoise: #2d8f8f;
    --mosaic-turquoise-light: #4db8b8;
    --mosaic-turquoise-dark: #1a6666;
    --mosaic-gold: #d4af37;
    --mosaic-gold-light: #f4e4bc;
    --mosaic-gold-dark: #b8941f;
    --mosaic-cream: #faf8f0;
    --mosaic-ivory: #f5f0e1;

    /* === Alias rétrocompatibles === */
    --primary-gold: var(--mosaic-gold);
    --primary-gold-light: var(--mosaic-gold-light);
    --primary-green: var(--mosaic-emerald);
    --primary-green-dark: var(--mosaic-emerald-dark);

    /* === Fonds === */
    --bg-dark: #0a1a1a;
    --bg-darker: #051212;
    --bg-card: rgba(8, 24, 22, 0.92);
    --bg-card-hover: rgba(10, 30, 28, 0.95);

    /* === Texte === */
    --text-light: #e8ebe8;
    --text-muted: #8faa9f;
    --text-on-cream: #1a2a2a;

    /* === Accents === */
    --accent-blue: #3498db;

    /* === Bordures === */
    --border-color: rgba(212, 175, 55, 0.2);
    --border-mosaic: rgba(0, 109, 91, 0.25);

    /* === Motifs géométriques === */
    --pattern-line-color: rgba(212, 175, 55, 0.1);
    --pattern-fill-color: rgba(0, 163, 129, 0.06);
    --pattern-size: 80px;
    --pattern-rotation-speed: 90s;

    /* === Espacement === */
    --section-gap: 40px;
    --card-radius: 14px;
    --card-padding: 24px;
}

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

body {
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

/* ==== css/celestial.css ==== */
/* ══════════════════════════════════════════════
   Fond mosaïque islamique — Fleurs cristallines
   Rotation UNIQUEMENT au scroll (pas continue)
   ══════════════════════════════════════════════ */

.celestial-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Reculé à -2 pour laisser la grille de cellules animées (#mosaicGrid, z=-1)
       visible PAR-DESSUS le fond sombre. Sinon ce bg opaque masque tout. */
    z-index: -2;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 15%, rgba(0, 109, 91, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 85%, rgba(212, 175, 55, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(45, 143, 143, 0.1) 0%, transparent 65%),
        var(--bg-dark);
}

/* Couche 1 : Fleur cristalline émeraude — base statique discrète
   Les animations vivantes sont gérées par la GRILLE de cellules autonomes
   construite en JS (voir /js/mosaic-grid.js + /css/mosaic-grid.css).
   Cette couche reste comme fond de secours / tapisserie de base. */
.celestial-bg::before {
    content: '';
    position: absolute;
    top: -25%;
    left: -25%;
    width: 150%;
    height: 150%;
    background-image: url('/patterns/mosaic-flower.svg');
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.15;
    transform: rotate(var(--scroll-rotation, 0deg));
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    transition: transform 0.1s linear;
}

/* Couche 2 : Motif étoile — base statique discrète */
.celestial-bg::after {
    content: '';
    position: absolute;
    top: -15%;
    left: -15%;
    width: 130%;
    height: 130%;
    background-image: url('/patterns/mosaic-star.svg');
    background-size: 120px 120px;
    background-repeat: repeat;
    opacity: 0.08;
    transform: rotate(var(--scroll-rotation-rev, 0deg));
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    transition: transform 0.1s linear;
}

/* --- Accents dorés (petits points lumineux) --- */
.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--mosaic-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: mosaicTwinkle 5s ease-in-out infinite;
    pointer-events: none;
}

.star.star-large {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.star.star-emerald {
    background: var(--mosaic-emerald-light);
    box-shadow: 0 0 6px rgba(0, 163, 129, 0.3);
}

/* ==== css/mosaic-grid.css ==== */
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
   Grille de cellules mosaïque AUTONOMES — zellige vivant.
   Grandes fleurs : pas de rotation libre → tiling préservé.
   Petites étoiles : rotation OK (dans les gaps). */

#mosaicGrid { /* layer container */ }

.mc-cell {
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

/* ─── Variantes pour PETITES étoiles dans les gaps ─── */

/* Rotation sens horaire */
.mc-cell.mc-spin-cw {
    animation-name: mcSpinCw;
    animation-timing-function: linear;
}
@keyframes mcSpinCw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Rotation sens anti-horaire */
.mc-cell.mc-spin-ccw {
    animation-name: mcSpinCcw;
    animation-timing-function: linear;
}
@keyframes mcSpinCcw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* Pulse (échelle + opacité) — préserve l'orientation */
.mc-cell.mc-pulse {
    animation-name: mcPulse;
}
@keyframes mcPulse {
    0%, 100% { transform: scale(0.78); opacity: 0.50; }
    50%      { transform: scale(1.10); opacity: 1.0;  }
}

/* Wobble doux : ±20° pour les petites étoiles seulement */
.mc-cell.mc-wobble {
    animation-name: mcWobble;
}
@keyframes mcWobble {
    0%, 100% { transform: rotate(-20deg) scale(0.92); }
    50%      { transform: rotate(20deg)  scale(1.08); }
}

/* ─── Variantes pour GRANDES fleurs (préservent l'alignement) ─── */

/* Breathe : SCALE PUR (pas de rotation) → tiling intact */
.mc-cell.mc-breathe {
    animation-name: mcBreatheBig;
}
@keyframes mcBreatheBig {
    0%, 100% { transform: scale(0.96); opacity: 0.70; filter: brightness(0.95); }
    50%      { transform: scale(1.04); opacity: 0.95; filter: brightness(1.25); }
}

/* Shimmer : variation de luminosité PURE (pas de rotation) → tiling intact */
.mc-cell.mc-shimmer {
    animation-name: mcShimmerBig;
}
@keyframes mcShimmerBig {
    0%, 100% { filter: brightness(0.85) saturate(0.95); }
    33%      { filter: brightness(1.30) saturate(1.20); }
    66%      { filter: brightness(0.95) saturate(1.05); }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    #mosaicGrid { display: none; }
}

/* Mobile */
@media (max-width: 640px) {
    #mosaicGrid { opacity: 0.55 !important; }
}

/* ==== css/hero-card.css ==== */
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
   Carte hero : encadre le bismillah + la recherche pour les distinguer du
   fond mosaïque animé. Effet "verre dépoli" élégant. */

header {
    /* Carte centrée avec léger fond translucide pour faire ressortir le texte
       par-dessus la mosaïque qui bouge. */
    max-width: 1080px;
    margin: 32px auto 28px;
    padding: 50px 32px 42px !important;
    border-radius: 28px;
    background:
        linear-gradient(
            180deg,
            rgba(8, 24, 22, 0.55) 0%,
            rgba(10, 28, 26, 0.65) 60%,
            rgba(8, 24, 22, 0.55) 100%
        );
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(0, 163, 129, 0.08),
        inset 0 1px 0 rgba(212, 175, 55, 0.08);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Bismillah encore plus harmonieux */
.bismillah {
    margin-bottom: 6px !important;
    line-height: 1.4;
}

.bismillah-translation {
    margin-bottom: 14px !important;
    font-style: italic;
    opacity: 0.85;
}

.site-description {
    color: var(--mosaic-gold-light);
    margin-bottom: 4px !important;
}

/* Barre de recherche — centrage harmonieux + style pill premium */
.search-container {
    max-width: 660px !important;
    margin: 26px auto 22px !important;
}

.search-box {
    background: rgba(5, 18, 18, 0.85) !important;
    border-color: rgba(212, 175, 55, 0.35) !important;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.45),
        inset 0 0 12px rgba(0, 163, 129, 0.06);
    transition: all 0.35s ease;
}
.search-box:hover {
    border-color: rgba(212, 175, 55, 0.55) !important;
    box-shadow:
        0 8px 28px rgba(212, 175, 55, 0.12),
        inset 0 0 14px rgba(0, 163, 129, 0.08);
}

.search-input {
    padding: 18px 26px !important;
    font-size: 1.02rem !important;
}

.search-btn-classic {
    padding: 18px 28px !important;
    letter-spacing: 0.3px;
}

/* Petit texte de "respiration" sous la recherche */
.refer-cta {
    margin-top: 6px !important;
    margin-bottom: 14px !important;
    opacity: 0.95;
}

/* Mobile */
@media (max-width: 640px) {
    header {
        margin: 14px 10px 18px;
        padding: 32px 18px 28px !important;
        border-radius: 20px;
    }
    .search-input {
        padding: 14px 18px !important;
        font-size: 0.95rem !important;
    }
    .search-btn-classic {
        padding: 14px 18px !important;
    }
}

/* ==== css/layout.css ==== */
/* ══════════════════════════════════════════════
   Layout principal — Style mosaïque persane
   ══════════════════════════════════════════════ */

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Site Logo */
.site-logo {
    display: block;
    margin: 0 auto 15px;
    border-radius: 50%;
    box-shadow:
        0 0 25px rgba(0, 163, 129, 0.3),
        0 0 50px rgba(0, 109, 91, 0.15),
        0 0 8px rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(212, 175, 55, 0.25);
    transition: box-shadow 0.5s ease;
}

.site-logo:hover {
    box-shadow:
        0 0 35px rgba(0, 163, 129, 0.45),
        0 0 60px rgba(0, 109, 91, 0.2),
        0 0 12px rgba(212, 175, 55, 0.35);
}

/* Header */
header {
    text-align: center;
    padding: 50px 20px 40px;
    position: relative;
}

/* Arc décoratif au-dessus du Bismillah */
header::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: min(500px, 85%);
    height: 60px;
    border-top: 2px solid rgba(0, 163, 129, 0.15);
    border-left: 2px solid rgba(0, 163, 129, 0.1);
    border-right: 2px solid rgba(0, 163, 129, 0.1);
    border-bottom: none;
    border-radius: 250px 250px 0 0;
    pointer-events: none;
}

/* Ligne ornementale sous le header */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(600px, 90%);
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 15%,
        var(--mosaic-emerald-light) 35%,
        var(--mosaic-turquoise) 50%,
        var(--mosaic-emerald-light) 65%,
        var(--mosaic-gold) 85%,
        transparent 100%
    );
    border-radius: 1px;
}

.bismillah {
    font-family: 'Amiri', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--mosaic-gold);
    text-shadow:
        0 0 30px rgba(212, 175, 55, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
    direction: rtl;
    position: relative;
    z-index: 1;
}

.bismillah-translation {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.site-description {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--mosaic-gold-light);
    margin-bottom: 5px;
    letter-spacing: 0.3px;
}

.site-subdesc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.refer-cta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -10px;
    margin-bottom: 30px;
}

.refer-cta-link {
    color: var(--mosaic-emerald-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.refer-cta-link:hover {
    color: var(--mosaic-gold);
    text-decoration: underline;
}

/* ==== css/search.css ==== */
/* ══════════════════════════════════════════════
   Recherche — Style mosaïque persane
   ══════════════════════════════════════════════ */

/* Search Box */
.search-container {
    max-width: 600px;
    margin: 0 auto 50px;
    position: relative;
}

.search-box {
    display: flex;
    background: rgba(8, 24, 22, 0.75);
    border: 2px solid var(--border-mosaic);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

/* Cadre mosaïque décoratif au focus */
.search-box:focus-within {
    border-color: var(--mosaic-emerald-light);
    box-shadow:
        0 0 20px rgba(0, 163, 129, 0.2),
        0 0 40px rgba(0, 109, 91, 0.1),
        inset 0 0 15px rgba(0, 163, 129, 0.05);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 25px;
    font-size: 1rem;
    color: var(--text-light);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-buttons {
    display: flex;
    gap: 0;
}

.search-btn {
    border: none;
    padding: 16px 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.search-btn-classic {
    background: linear-gradient(135deg, var(--mosaic-gold), var(--mosaic-gold-dark));
    color: var(--bg-dark);
}

.search-btn-ai {
    position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, #0f7d5c 0%, #0a4f40 55%, #073a30 100%);
    color: var(--mosaic-gold-light); font-weight: 600; letter-spacing: 0.01em;
    border-left: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow: inset 0 1px 0 rgba(244, 228, 188, 0.18), inset 0 0 18px rgba(0, 230, 184, 0.10);
}
/* Reflet doré qui traverse le bouton : il dit « intelligent » sans robot. */
.search-btn-ai::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
    background: linear-gradient(100deg, transparent, rgba(244, 228, 188, 0.28), transparent);
    transform: skewX(-18deg); animation: reflet-ia 4.5s ease-in-out infinite;
}
@keyframes reflet-ia { 0%, 62% { left: -60%; } 100% { left: 130%; } }
.search-btn-ai .ia-icone { color: #f4d774; flex: none; filter: drop-shadow(0 0 5px rgba(244, 215, 116, 0.55)); }
.search-btn-ai.ia-compagnon { background: linear-gradient(135deg, #b8861c 0%, #7a5a12 45%, #0a4f40 100%); color: #fff8e6; }
@media (prefers-reduced-motion: reduce) { .search-btn-ai::after { animation: none; display: none; } }

.search-btn:hover {
    filter: brightness(1.15);
}

.search-btn-ai:hover {
    filter: brightness(1.2);
}

.search-icon {
    width: 16px;
    height: 16px;
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 26, 26, 0.98);
    border: 1px solid var(--border-mosaic);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.suggestions-dropdown.active {
    display: block;
}

.suggestion-section {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-mosaic);
}

.suggestion-section:last-child {
    border-bottom: none;
}

.suggestion-section-title {
    font-size: 0.75rem;
    color: var(--mosaic-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:hover {
    background: rgba(0, 163, 129, 0.1);
}

.suggestion-item .icon {
    font-size: 1.1rem;
}

.suggestion-item .text {
    flex: 1;
}

.suggestion-item .related {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.related-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 5px 0;
}

.related-term {
    background: rgba(0, 109, 91, 0.2);
    color: var(--mosaic-gold-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(0, 109, 91, 0.3);
}

.related-term:hover {
    background: rgba(0, 163, 129, 0.3);
    border-color: var(--mosaic-emerald-light);
}

/* Popular search chips (shown on focus) */
.popular-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.popular-chip {
    background: rgba(0, 109, 91, 0.12);
    color: var(--mosaic-gold-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(0, 109, 91, 0.2);
}

.popular-chip:hover {
    background: rgba(0, 163, 129, 0.2);
    border-color: var(--mosaic-emerald-light);
    transform: translateY(-1px);
}

.popular-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Le champ de recherche est de type « search » (le navigateur n'y propose plus d'identifiants enregistrés) :
   on lui garde l'aspect d'origine. */
.search-input[type="search"] { -webkit-appearance: none; appearance: none; }
.search-input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* ==== css/sections.css ==== */
/* ══════════════════════════════════════════════
   Sections et accordéons — Style mosaïque
   ══════════════════════════════════════════════ */

main {
    flex: 1;
}

/* Titre de section avec bande mosaïque */
.section-title {
    font-size: 1.3rem;
    color: var(--mosaic-gold);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: none;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 15%,
        var(--mosaic-emerald-light) 35%,
        var(--mosaic-turquoise) 50%,
        var(--mosaic-emerald-light) 65%,
        var(--mosaic-gold) 85%,
        transparent 100%
    );
    border-radius: 1px;
}

.section-title svg {
    width: 24px;
    height: 24px;
}

/* Accordéon */
.themes-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-item {
    background: var(--bg-card);
    border: 1px solid var(--border-mosaic);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.theme-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--mosaic-gold) 0%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 100%
    );
    opacity: 0.6;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.theme-item:hover {
    border-color: rgba(0, 163, 129, 0.3);
}

.theme-item.active {
    border-color: var(--mosaic-emerald-light);
    box-shadow: 0 5px 30px rgba(0, 109, 91, 0.15);
}

.theme-item.active::before {
    opacity: 1;
    height: 3px;
}

.theme-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    transition: background 0.2s;
}

.theme-header:hover {
    background: rgba(0, 109, 91, 0.04);
}

.theme-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.theme-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.theme-count {
    font-size: 0.85rem;
    color: var(--mosaic-gold);
}

.theme-arrow {
    width: 24px;
    height: 24px;
    color: var(--mosaic-gold);
    transition: transform 0.3s ease;
}

.theme-item.active .theme-arrow {
    transform: rotate(180deg);
}

.theme-content {
    display: none;
    padding: 0 25px 25px;
    border-top: 1px solid var(--border-mosaic);
}

.theme-item.active .theme-content {
    display: block;
}

/* Chapitres */
.chapitres-list {
    padding-top: 20px;
}

.chapitre-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: rgba(0, 109, 91, 0.08);
    border: 1px solid rgba(0, 109, 91, 0.2);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.chapitre-btn:hover {
    background: rgba(0, 109, 91, 0.15);
    border-color: var(--mosaic-emerald-light);
    transform: translateX(5px);
}

.chapitre-btn .count {
    background: var(--mosaic-emerald);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.voir-tous-btn {
    background: rgba(212, 175, 55, 0.1) !important;
    border-color: rgba(212, 175, 55, 0.25) !important;
}

.voir-tous-btn:hover {
    background: rgba(212, 175, 55, 0.2) !important;
    border-color: var(--mosaic-gold) !important;
}

.voir-tous-btn .count {
    background: var(--mosaic-gold) !important;
    color: var(--bg-dark) !important;
}

/* ==== css/results.css ==== */
/* ══════════════════════════════════════════════
   Results Section — Style mosaïque persane
   ══════════════════════════════════════════════ */

.results-section {
    display: none;
}

.results-section.active {
    display: block;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-title {
    font-size: 1.2rem;
    color: var(--text-light);
}

.results-title span {
    color: var(--mosaic-gold);
}

.back-btn {
    background: transparent;
    border: 1px solid var(--mosaic-emerald-light);
    color: var(--mosaic-emerald-light);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: var(--mosaic-emerald);
    color: var(--mosaic-gold);
    border-color: var(--mosaic-emerald);
}

/* ==== css/cards.css ==== */
/* ══════════════════════════════════════════════
   Cartes Hadith — Cadres mosaïques islamiques
   ══════════════════════════════════════════════ */

.hadiths-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hadith-card {
    background: var(--bg-card);
    border: 1px solid var(--border-mosaic);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Bordure supérieure gradient mosaïque */
.hadith-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--mosaic-gold) 0%,
        var(--mosaic-emerald-light) 25%,
        var(--mosaic-turquoise) 50%,
        var(--mosaic-emerald-light) 75%,
        var(--mosaic-gold) 100%
    );
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.hadith-card:hover {
    border-color: rgba(0, 163, 129, 0.35);
    box-shadow:
        0 6px 28px rgba(0, 109, 91, 0.12),
        0 0 0 1px rgba(0, 163, 129, 0.08);
    transform: translateY(-2px);
}

.hadith-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.hadith-numero {
    background: linear-gradient(135deg, var(--mosaic-gold), var(--mosaic-gold-dark));
    color: var(--bg-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.hadith-type-tardjama {
    background: linear-gradient(135deg, var(--mosaic-turquoise), var(--mosaic-turquoise-dark)) !important;
    color: white !important;
}

.hadith-chapitre {
    background: rgba(0, 109, 91, 0.2);
    color: var(--mosaic-gold-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 109, 91, 0.15);
}

.hadith-titre {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--mosaic-gold);
    margin-bottom: 15px;
    line-height: 1.5;
}

.hadith-contenu {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 0.98rem;
    padding: 12px 14px;
    background: rgba(5, 18, 18, 0.5);
    border-radius: 8px;
    border-left: 3px solid rgba(0, 109, 91, 0.3);
}

.hadith-contenu .highlight {
    background: rgba(212, 175, 55, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
    color: var(--mosaic-gold-light);
}

.hadith-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-mosaic);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ref-badge {
    background: rgba(45, 143, 143, 0.15);
    color: var(--mosaic-turquoise-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(45, 143, 143, 0.1);
}

.narrator-badge {
    background: rgba(212, 175, 55, 0.1);
    color: var(--mosaic-gold-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(212, 175, 55, 0.08);
}

/* ==== css/pagination.css ==== */
/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary-gold);
    color: var(--bg-dark);
    border-color: var(--primary-gold);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ==== css/loading.css ==== */
/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 60px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ==== css/footer.css ==== */
/* ══════════════════════════════════════════════
   Footer — Style mosaïque persane
   ══════════════════════════════════════════════ */

footer {
    margin-top: auto;
    padding: 40px 20px;
    text-align: center;
    border-top: none;
    position: relative;
}

/* Bande ornementale mosaïque en haut du footer */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 10%,
        var(--mosaic-emerald-light) 30%,
        var(--mosaic-turquoise) 50%,
        var(--mosaic-emerald-light) 70%,
        var(--mosaic-gold) 90%,
        transparent 100%
    );
}

.footer-warning {
    background: rgba(8, 24, 22, 0.9);
    border: 1px solid var(--border-mosaic);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

/* Bordure supérieure dorée sur le warning */
.footer-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--mosaic-gold) 0%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 100%
    );
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    opacity: 0.6;
}

.footer-warning p {
    color: var(--mosaic-gold-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-info {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--mosaic-emerald-light);
}

.footer-meedoo {
    margin-top: 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.5;
    letter-spacing: 0.5px;
}

.footer-meedoo strong {
    color: var(--mosaic-gold);
    opacity: 1;
}

.hamdoulah {
    margin-top: 20px;
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    color: var(--mosaic-gold);
    opacity: 0.7;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Pages à lire sans l'application (liens suivis par les moteurs et les assistants d'IA) */
.plan-site { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin: 18px auto 6px; max-width: 780px; font-size: 0.86rem; }
.plan-site a { color: var(--text-muted); text-decoration: none; border-bottom: 1px dotted rgba(212, 175, 55, 0.35); padding: 2px 0; }
.plan-site a:hover { color: var(--mosaic-gold); }
.sans-script { max-width: 760px; margin: 20px auto; padding: 16px 20px; border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 12px; background: rgba(8, 24, 22, 0.92); line-height: 1.7; }
.sans-script a { color: var(--mosaic-gold); }

/* ==== css/responsive.css ==== */
/* ══════════════════════════════════════════════
   Responsive — Adaptation mosaïque persane
   ══════════════════════════════════════════════ */

/* === Tablette & Mobile (≤768px) === */
@media (max-width: 768px) {
    :root {
        --pattern-size: 40px;
        --section-gap: 25px;
        --card-padding: 16px;
    }

    .bismillah {
        font-size: 1.8rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: 15px;
    }

    .search-input {
        text-align: center;
        padding: 15px 20px;
    }

    .search-buttons {
        flex-direction: row;
    }

    .search-btn {
        justify-content: center;
        padding: 12px 10px;
        flex: 1;
        font-size: 0.78rem;
    }

    .search-btn-ai {
        border-left: 1px solid rgba(0, 163, 129, 0.2);
        border-top: none;
    }

    .theme-header {
        padding: 15px 20px;
    }

    .hadith-card {
        padding: 20px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Réduire la 2e couche + taille motifs sur mobile */
    .celestial-bg::before {
        background-size: 140px 140px;
        opacity: 0.12;
    }
    .celestial-bg::after {
        opacity: 0.04;
    }

    /* Arc décoratif plus petit */
    header::before {
        width: 80%;
        height: 40px;
    }
}

/* === Petit mobile (≤480px) === */
@media (max-width: 480px) {
    :root {
        --pattern-size: 30px;
        --card-radius: 10px;
    }

    .container {
        padding: 10px;
    }

    header {
        padding: 30px 15px 25px;
    }

    /* Pas de rotation du fond sur petit écran (perf) */
    .celestial-bg::before,
    .celestial-bg::after {
        animation: none !important;
    }

    /* Suppression de l'arc décoratif */
    header::before {
        display: none;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .theme-name {
        font-size: 0.95rem;
    }

    .adhkar-section-header {
        padding: 10px 12px;
    }

    .adhkar-section-header h4 {
        font-size: 0.85rem;
    }

    .adhkar-arabic {
        font-size: 1.05rem;
    }
}

/* === Grand écran (≥1200px) === */
@media (min-width: 1200px) {
    :root {
        --pattern-size: 100px;
    }

    .container {
        max-width: 1000px;
    }
}

/* === Accessibilité : réduction de mouvement === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .celestial-bg::before,
    .celestial-bg::after {
        animation: none !important;
    }

    .star {
        animation: none !important;
        opacity: 0.4;
    }

    .mosaic-scroll-rotate {
        transform: none !important;
    }

    .mosaic-animate-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==== css/trending.css ==== */
/* Trending Section */
.trending-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.trending-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.trending-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-list {
    list-style: none;
    padding: 0;
}

.trending-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 10px;
}

.trending-list li:hover {
    background: rgba(212, 175, 55, 0.08);
}

.trending-rank {
    font-size: 0.8rem;
    color: var(--primary-gold);
    font-weight: 700;
    min-width: 22px;
}

.trending-text {
    flex: 1;
    font-size: 0.92rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trending-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.trending-total {
    text-align: center;
    padding: 12px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.trending-total strong {
    color: var(--primary-gold);
    font-size: 1.2rem;
}

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


/* ==== css/admin.css ==== */
/* ============================================ */
/* ADMIN DASHBOARD                             */
/* ============================================ */
.admin-dashboard {
    display: none;
}

.admin-dashboard.active {
    display: block;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.admin-stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-gold);
    display: block;
}

.admin-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h3 {
    font-size: 1rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-light);
}

.admin-table tr:hover td {
    background: rgba(212, 175, 55, 0.04);
}

.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-badge.pending {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.admin-badge.approved {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.admin-badge.rejected {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.admin-action-btn {
    padding: 5px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-right: 5px;
}

.admin-action-btn.approve {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.admin-action-btn.approve:hover {
    background: rgba(46, 204, 113, 0.4);
}

.admin-action-btn.reject {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.admin-action-btn.reject:hover {
    background: rgba(231, 76, 60, 0.4);
}

/* Note IA dans le dashboard admin */
.ai-review-note {
    display: block;
    margin: 6px 0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.4;
    border-left: 3px solid;
}

.ai-review-note.approved {
    background: rgba(46, 204, 113, 0.08);
    border-left-color: #2ecc71;
    color: #a8d8b8;
}

.ai-review-note.rejected {
    background: rgba(231, 76, 60, 0.08);
    border-left-color: #e74c3c;
    color: #e8a8a0;
}

.ai-review-note.pending {
    background: rgba(241, 196, 15, 0.08);
    border-left-color: #f1c40f;
    color: #e8d8a0;
}

.ai-review-note.error {
    background: rgba(243, 156, 18, 0.08);
    border-left-color: #f39c12;
    color: #e8c8a0;
}

.ai-badge-tag {
    display: inline-block;
    font-size: 0.65rem;
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.admin-actions-row {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.admin-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.admin-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.admin-filter-btn.active {
    background: var(--primary-gold);
    color: var(--bg-dark);
    border-color: var(--primary-gold);
}

.admin-back-btn {
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.admin-back-btn:hover {
    background: var(--primary-gold);
    color: var(--bg-dark);
}


/* ==== css/corrections-admin.css ==== */
/* Corrections Section (Admin) */
.admin-corrections-grid {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.correction-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
}
.correction-card .cc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.correction-card .cc-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.correction-card .cc-field-badge {
    background: rgba(180,160,100,0.15);
    color: var(--primary-gold);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}
.correction-card .cc-diff {
    margin: 8px 0;
    font-size: 0.82rem;
}
.correction-card .cc-diff .cc-original {
    background: rgba(231,76,60,0.1);
    border-left: 3px solid #e74c3c;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
    max-height: 100px;
    overflow-y: auto;
}
.correction-card .cc-diff .cc-corrected {
    background: rgba(46,204,113,0.1);
    border-left: 3px solid #2ecc71;
    padding: 6px 10px;
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
}
.correction-card .cc-explanation {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 6px 0;
}
.correction-card .cc-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.correction-card .cc-reviewed-by {
    font-size: 0.72rem;
    color: #2ecc71;
    margin-top: 6px;
}

/* Corrector Key Section */
.corrector-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}
.corrector-form input {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
}
.corrector-form button {
    background: var(--primary-gold);
    color: var(--bg-dark);
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    font-weight: 600;
}
.corrector-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.corrector-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.78rem;
}
.corrector-chip.inactive {
    opacity: 0.5;
    text-decoration: line-through;
}
.corrector-chip button {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}


/* ==== css/modal.css ==== */
/* Report/Correction Modal */
.report-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.report-modal-overlay.active {
    display: flex;
}
.report-modal {
    background: var(--bg-card);
    border: 1px solid var(--primary-gold);
    border-radius: 14px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.report-modal h3 {
    color: var(--primary-gold);
    margin-bottom: 16px;
    font-size: 1.05rem;
}
.report-modal label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    margin-top: 10px;
}
.report-modal input, .report-modal textarea, .report-modal select {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    box-sizing: border-box;
}
.report-modal textarea {
    min-height: 80px;
    resize: vertical;
}
.report-modal .report-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.report-modal .report-btns button {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
}
.report-modal .report-btns .btn-submit {
    background: var(--primary-gold);
    color: var(--bg-dark);
}
.report-modal .report-btns .btn-cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* AI Search suggestion bar */
.ai-search-box {
    background: linear-gradient(135deg, rgba(180,160,100,0.08), rgba(100,130,200,0.08));
    border: 1px solid rgba(180,160,100,0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 12px 0;
}
.ai-search-box h4 {
    color: var(--primary-gold);
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.ai-search-box .ai-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.ai-search-box .ai-term-chip {
    background: rgba(180,160,100,0.15);
    color: var(--primary-gold);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.78rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.ai-search-box .ai-term-chip:hover {
    border-color: var(--primary-gold);
    background: rgba(180,160,100,0.3);
}
.ai-search-box .ai-explanation {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}
.ai-search-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.ai-search-loading .mini-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==== css/site-modal.css ==== */
/* ============================================ */
/* SITE SUBMISSION MODAL                        */
/* ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    color: var(--primary-gold);
    margin-bottom: 20px;
    font-size: 1.15rem;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-light);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-gold);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group .char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.form-submit-btn:hover {
    filter: brightness(1.15);
}

.form-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 12px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.form-message.error {
    display: block;
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}


/* ==== css/ai-detail.css ==== */
/* ============================================ */
/* IA DETAIL — Bouton + zone streaming          */
/* ============================================ */
.ai-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(26, 95, 60, 0.3), rgba(26, 95, 60, 0.15));
    border: 1px solid rgba(26, 95, 60, 0.4);
    border-radius: 25px;
    color: #2ecc71;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-detail-btn:hover {
    background: linear-gradient(135deg, rgba(26, 95, 60, 0.5), rgba(26, 95, 60, 0.3));
    border-color: #2ecc71;
    transform: translateY(-1px);
}

.ai-detail-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-detail-btn.active {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

.ai-detail-box {
    display: none;
    margin-top: 15px;
    padding: 20px;
    background: rgba(26, 95, 60, 0.08);
    border: 1px solid rgba(26, 95, 60, 0.25);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ai-detail-box.active {
    display: block;
}

.ai-detail-box .ai-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(26, 95, 60, 0.2);
    font-size: 0.8rem;
    color: #2ecc71;
    font-weight: 600;
}

.ai-detail-box .ai-content {
    color: var(--text-light);
}

.ai-detail-box .ai-content strong,
.ai-detail-box .ai-content b {
    color: var(--primary-gold);
}

.ai-detail-box .ai-error {
    color: #e74c3c;
    font-style: italic;
}

/* Animation de chargement IA — 3 points */
.ai-loading-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.ai-loading-dots span {
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    animation: aiDotPulse 1.4s ease-in-out infinite;
}

.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* Curseur clignotant pendant le streaming */
.ai-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #2ecc71;
    margin-left: 2px;
    animation: aiCursorBlink 0.8s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes aiCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


/* ==== css/toast.css ==== */
/* Toast notification */
.toast-notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(46, 204, 113, 0.95);
    color: white;
    padding: 16px 30px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
}

/* Modal fade out */
.modal-overlay.closing {
    animation: modalFadeOut 0.35s ease forwards;
}

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

.modal-content.closing {
    animation: modalSlideOut 0.35s ease forwards;
}

@keyframes modalSlideOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.9); opacity: 0; }
}


/* ==== css/halal-sites.css ==== */
/* ============================================ */
/* HALAL SITES IN SEARCH RESULTS                */
/* ============================================ */
.halal-sites-section {
    margin-bottom: 20px;
}

.halal-sites-header {
    font-size: 0.85rem;
    color: var(--primary-green);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(46, 204, 113, 0.15);
}

.halal-site-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid rgba(46, 204, 113, 0.25);
    border-left: 3px solid #2ecc71;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.halal-site-card:hover {
    border-color: rgba(46, 204, 113, 0.5);
    background: rgba(46, 204, 113, 0.05);
    transform: translateX(3px);
}

.halal-site-card .site-name {
    color: #2ecc71;
    font-weight: 600;
    font-size: 0.95rem;
}

.halal-site-card .site-badge-sponsored {
    display: inline-block;
    font-size: 0.65rem;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    padding: 1px 8px;
    border-radius: 8px;
    margin-left: 8px;
    vertical-align: middle;
}

.halal-site-card .site-url {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 2px;
}

.halal-site-card .site-desc {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 6px;
    line-height: 1.5;
}

.halal-site-card .site-cat-badge {
    display: inline-block;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 8px;
}


/* ==== css/multibook.css ==== */
/* ══════════════════════════════════════════════
   📚 MULTIBOOK — 9 livres AR/EN — Style mosaïque
   ══════════════════════════════════════════════ */

.multibook-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: none;
    position: relative;
}

/* Séparateur mosaïque */
.multibook-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 20%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 80%,
        transparent 100%
    );
}

.multibook-header {
    font-size: 0.9rem;
    color: var(--mosaic-gold);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 109, 91, 0.15);
}

.multibook-header .mb-count {
    font-size: 0.75rem;
    background: rgba(0, 109, 91, 0.15);
    color: var(--mosaic-gold);
    padding: 2px 10px;
    border-radius: 10px;
}

.multibook-card {
    background: var(--bg-card);
    border: 1px solid var(--border-mosaic);
    border-radius: var(--card-radius);
    padding: 18px 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Bordure supérieure mosaïque */
.multibook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--mosaic-gold) 0%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 100%
    );
    opacity: 0.5;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.multibook-card:hover {
    border-color: var(--mosaic-emerald-light);
    box-shadow: 0 5px 20px rgba(0, 109, 91, 0.12);
}

.multibook-card:hover::before {
    opacity: 1;
}

.multibook-card .mb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.multibook-card .mb-book-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 8px;
    color: #fff;
}

.multibook-card .mb-hadith-num {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.multibook-card .mb-reference {
    font-size: 0.72rem;
    color: var(--mosaic-gold);
    font-weight: 500;
}

.multibook-card .mb-chapter {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.multibook-card .mb-chapter-ar {
    font-family: 'Amiri', 'Noto Sans Arabic', serif;
    direction: rtl;
    text-align: right;
    font-size: 0.85rem;
    color: var(--mosaic-gold-light);
}

.multibook-card .mb-arabic {
    font-family: 'Amiri', 'Noto Sans Arabic', serif;
    direction: rtl;
    text-align: right;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-light);
    padding: 12px 15px;
    background: rgba(5, 18, 18, 0.5);
    border-radius: 8px;
    margin-bottom: 12px;
    border-right: 3px solid var(--mosaic-emerald-light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.multibook-card .mb-narrator {
    font-size: 0.82rem;
    color: var(--mosaic-gold);
    font-weight: 600;
    margin-bottom: 4px;
}

.multibook-card .mb-english {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    padding: 10px 15px;
    background: rgba(5, 18, 18, 0.4);
    border-radius: 8px;
    border-left: 3px solid var(--mosaic-turquoise);
}

.multibook-card .mb-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.mb-translate-btn {
    background: linear-gradient(135deg, var(--mosaic-emerald), var(--mosaic-emerald-dark));
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.mb-translate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 109, 91, 0.3);
}

.mb-translate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mb-translation-box {
    margin-top: 12px;
    padding: 12px 15px;
    background: rgba(5, 18, 18, 0.5);
    border-radius: 8px;
    border-left: 3px solid var(--mosaic-emerald-light);
    font-size: 0.88rem;
    line-height: 1.7;
    display: none;
}

.mb-translation-box.visible {
    display: block;
}

.mb-more-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--mosaic-emerald-light);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.mb-more-link:hover {
    color: var(--mosaic-gold);
}

/* Section pour parcourir les livres */
.books-nav-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-mosaic);
    border-radius: var(--card-radius);
}

.books-nav-section h3 {
    color: var(--mosaic-gold);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.book-nav-card {
    background: rgba(8, 24, 22, 0.7);
    border: 1px solid var(--border-mosaic);
    border-radius: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.book-nav-card:hover {
    border-color: var(--mosaic-emerald-light);
    background: rgba(10, 30, 28, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 109, 91, 0.1);
}

.book-nav-card .book-title-ar {
    font-family: 'Amiri', 'Noto Sans Arabic', serif;
    font-size: 1rem;
    color: var(--mosaic-gold-light);
    margin-bottom: 4px;
}

.book-nav-card .book-title-en {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.book-nav-card .book-stat {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==== css/admin-responsive.css ==== */
/* Responsive admin */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-table {
        font-size: 0.8rem;
    }
    .admin-table th, .admin-table td {
        padding: 8px 6px;
    }
}


/* ==== css/scrollbar.css ==== */
/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

/* ==== css/tajweed.css ==== */
/* ============================================ */
/* TAJWEED COLORING RULES                      */
/* ============================================ */
.tajweed-ghunna    { color: #00bcd4; }    /* Cyan -- Ghunna (nasalisation) */
.tajweed-idgham    { color: #ff9800; }    /* Orange -- Idgham (assimilation) */
.tajweed-ikhfa     { color: #8bc34a; }    /* Vert clair -- Ikhfa (occultation) */
.tajweed-iqlab     { color: #e91e63; }    /* Rose -- Iqlab (conversion) */
.tajweed-maad      { color: #ff5722; }    /* Orange foncé -- Maad (allongement) */
.tajweed-meem      { color: #9c27b0; }    /* Violet -- Meem sakin */
.tajweed-qalqalah  { color: #2196f3; }    /* Bleu -- Qalqalah (écho) */

/* Preserve Arabic ligatures inside tajweed spans */
.quran-verse-arabic .tajweed-ghunna,
.quran-verse-arabic .tajweed-idgham,
.quran-verse-arabic .tajweed-ikhfa,
.quran-verse-arabic .tajweed-iqlab,
.quran-verse-arabic .tajweed-maad,
.quran-verse-arabic .tajweed-meem,
.quran-verse-arabic .tajweed-qalqalah {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Tajweed legend */
.tajweed-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.tajweed-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tajweed-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tajweed-legend {
        gap: 8px;
        padding: 10px 12px;
    }
    .tajweed-legend-item {
        font-size: 0.68rem;
    }
}

/* ==== css/quran.css ==== */
/* ══════════════════════════════════════════════
   QURAN — Style mosaïque persane
   ══════════════════════════════════════════════ */

.quran-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.quran-section-title {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    color: var(--mosaic-gold);
    flex: 1;
    text-align: center;
}

/* Sourate Selector */
.quran-selector-header {
    margin-bottom: 15px;
}

.quran-search-input {
    width: 100%;
    background: rgba(0, 109, 91, 0.06);
    border: 2px solid var(--border-mosaic);
    border-radius: 25px;
    padding: 12px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.quran-search-input:focus {
    border-color: var(--mosaic-emerald-light);
    box-shadow: 0 0 20px rgba(0, 163, 129, 0.15);
}

.quran-search-input::placeholder {
    color: var(--text-muted);
}

.quran-sourates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.quran-sourate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-mosaic);
    border-radius: var(--card-radius);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

/* Bordure supérieure mosaïque */
.quran-sourate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--mosaic-gold) 0%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 100%
    );
    opacity: 0.5;
}

.quran-sourate-card:hover {
    border-color: var(--mosaic-emerald-light);
    background: rgba(0, 109, 91, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 109, 91, 0.15);
}

.quran-sourate-card:hover::before {
    opacity: 1;
}

.quran-sourate-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--mosaic-emerald), var(--mosaic-emerald-dark));
    color: var(--mosaic-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

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

.quran-sourate-name-ar {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    color: var(--mosaic-gold);
    direction: rtl;
    text-align: right;
}

.quran-sourate-name-phonetic {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quran-sourate-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.quran-revelation-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 600;
}

.quran-revelation-mecquoise {
    background: rgba(212, 175, 55, 0.15);
    color: var(--mosaic-gold);
}

.quran-revelation-medinois {
    background: rgba(0, 109, 91, 0.2);
    color: var(--mosaic-emerald-light);
}

/* Quran Reader */
.quran-reader-header {
    text-align: center;
    padding: 20px;
    border-bottom: none;
    margin-bottom: 25px;
    position: relative;
}

/* Séparateur mosaïque sous le header */
.quran-reader-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 15%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 85%,
        transparent 100%
    );
}

.quran-reader-sourate-name {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: var(--mosaic-gold);
    direction: rtl;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.quran-reader-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quran-nav-btn {
    background: transparent;
    border: 1px solid var(--mosaic-emerald-light);
    color: var(--mosaic-emerald-light);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.quran-nav-btn:hover:not(:disabled) {
    background: var(--mosaic-emerald);
    color: var(--mosaic-gold);
    border-color: var(--mosaic-emerald);
}

.quran-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quran-sourate-select {
    background: rgba(0, 109, 91, 0.08);
    border: 1px solid var(--border-mosaic);
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    max-width: 250px;
}

.quran-sourate-select option {
    background: var(--bg-dark);
    color: var(--text-light);
}

.quran-bismillah {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    color: var(--mosaic-gold);
    text-align: center;
    margin: 20px 0;
    direction: rtl;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

/* Individual Verse */
.quran-verse {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 109, 91, 0.1);
    border-right: 3px solid var(--mosaic-emerald-light);
    margin-bottom: 15px;
    border-radius: 0 var(--card-radius) var(--card-radius) 0;
    background: rgba(8, 24, 22, 0.92);
    transition: background 0.3s;
}

.quran-verse:hover {
    background: rgba(10, 30, 28, 0.95);
}

.quran-verse-arabic {
    font-family: 'Amiri', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 2.2;
    color: var(--text-light);
    direction: rtl;
    text-align: right;
    margin-bottom: 12px;
    word-spacing: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.quran-verse-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--mosaic-emerald), var(--mosaic-emerald-dark));
    color: var(--mosaic-gold);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 6px;
    vertical-align: middle;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Translation text — multi-language */
.quran-verse-translation {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    direction: ltr;
    text-align: left;
    padding-left: 10px;
    border-left: 2px solid rgba(0, 163, 129, 0.3);
}

/* RTL translation (Urdu, etc.) */
.quran-verse-translation.quran-verse-rtl {
    direction: rtl;
    text-align: right;
    padding-left: 0;
    padding-right: 10px;
    border-left: none;
    border-right: 2px solid rgba(0, 163, 129, 0.3);
    font-family: 'Amiri', 'Inter', sans-serif;
    font-size: 1.05rem;
}

/* Transliteration style */
.quran-verse-translation.quran-verse-transliteration {
    font-style: italic;
    color: var(--text-light);
    opacity: 0.85;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Keep old class for backward compat */
.quran-verse-french {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    direction: ltr;
    text-align: left;
    padding-left: 10px;
    border-left: 2px solid rgba(0, 163, 129, 0.3);
}

/* Language Selector */
.quran-lang-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 109, 91, 0.15);
    flex-wrap: wrap;
}

.quran-lang-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

.quran-lang-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.quran-lang-btn {
    background: rgba(0, 109, 91, 0.06);
    border: 1px solid var(--border-mosaic);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quran-lang-btn:hover {
    border-color: var(--mosaic-emerald-light);
    color: var(--mosaic-emerald-light);
    background: rgba(0, 163, 129, 0.1);
}

.quran-lang-btn.quran-lang-active {
    background: linear-gradient(135deg, var(--mosaic-emerald), var(--mosaic-emerald-dark));
    border-color: var(--mosaic-emerald);
    color: var(--mosaic-gold);
    font-weight: 600;
}

.quran-lang-flag {
    font-size: 0.9rem;
}

.quran-verse-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.quran-verse-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Bottom Navigation — continuous reading */
.quran-bottom-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding: 25px 0;
    border-top: none;
    flex-wrap: wrap;
    position: relative;
}

/* Séparateur mosaïque au-dessus */
.quran-bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 15%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 85%,
        transparent 100%
    );
}

.quran-nav-next {
    background: linear-gradient(135deg, var(--mosaic-emerald), var(--mosaic-emerald-dark)) !important;
    color: var(--mosaic-gold) !important;
    border-color: var(--mosaic-emerald) !important;
    font-weight: 600;
    padding: 12px 24px !important;
    font-size: 0.9rem !important;
}

.quran-nav-next:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 109, 91, 0.3);
}

.quran-nav-prev {
    font-size: 0.8rem !important;
}

.quran-nav-list {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

.quran-nav-list:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .quran-sourates-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 60vh;
        overflow-y: auto;
        padding-right: 4px;
    }
    .quran-verse-arabic {
        font-size: 1.4rem;
    }
    .quran-reader-sourate-name {
        font-size: 1.5rem;
    }
    .quran-header {
        flex-direction: column;
        text-align: center;
    }
    .quran-lang-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    .quran-lang-btn {
        padding: 4px 10px;
        font-size: 0.72rem;
    }
    .quran-sourate-card {
        padding: 10px;
        gap: 8px;
    }
    .quran-sourate-number {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    .quran-sourate-name-ar {
        font-size: 1rem;
    }
    .quran-sourate-name-phonetic {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .quran-sourates-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 55vh;
    }
    .quran-lang-options {
        gap: 4px;
    }
    .quran-lang-btn {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    .quran-sourate-card {
        padding: 8px;
        gap: 6px;
    }
    .quran-sourate-name-phonetic {
        font-size: 0.7rem;
    }
    .quran-sourate-meta {
        font-size: 0.62rem;
    }
}

/* ==== css/prayer.css ==== */
/* ============================================ */
/* PRAYER TIMES BAR — Compact Layout            */
/* ============================================ */

#prayerTimesBar {
    display: none;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(26, 95, 60, 0.12), rgba(212, 175, 55, 0.06));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 14px;
    padding: 10px 18px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#prayerTimesBar.prayer-bar-visible {
    display: block;
    animation: prayerFadeIn 0.5s ease;
}

@keyframes prayerFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Custom Geolocation Prompt ---- */
.prayer-geo-prompt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 0;
}

.prayer-geo-prompt-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.prayer-geo-prompt-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.prayer-geo-prompt-text strong {
    color: var(--primary-gold);
    font-size: 0.82rem;
}

.prayer-geo-prompt-text span {
    color: var(--text-muted);
    font-size: 0.73rem;
    line-height: 1.4;
}

.prayer-geo-prompt-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.prayer-geo-btn-accept {
    background: linear-gradient(135deg, var(--primary-green), #1e7a4a);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.prayer-geo-btn-accept:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.prayer-geo-btn-dismiss {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
}

.prayer-geo-btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

/* ---- Compact Single-Row Layout ---- */
.prayer-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Left: hijri + city + eid */
.prayer-compact-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    min-width: 0;
}

.prayer-compact-hijri {
    font-size: 0.72rem;
    color: var(--primary-gold);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prayer-compact-eid {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Center: prayer times inline */
.prayer-compact-times {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.prayer-compact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.25s ease;
    min-width: 48px;
}

.prayer-compact-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.prayer-compact-active {
    background: rgba(26, 95, 60, 0.2) !important;
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 8px rgba(26, 95, 60, 0.15);
}

.prayer-compact-active .prayer-compact-name {
    color: var(--primary-gold);
    font-weight: 700;
}

.prayer-compact-active .prayer-compact-value {
    color: var(--text-light);
    font-weight: 700;
}

.prayer-compact-name {
    font-size: 0.58rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prayer-compact-value {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Right: next prayer countdown */
.prayer-compact-next {
    font-size: 0.75rem;
    color: var(--text-light);
    background: rgba(26, 95, 60, 0.2);
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid rgba(26, 95, 60, 0.25);
    white-space: nowrap;
    flex-shrink: 0;
}

.prayer-compact-next strong {
    color: var(--primary-gold);
}

/* Ramadan badge */
.prayer-ramadan-badge {
    background: linear-gradient(135deg, var(--primary-gold), #e6c34d);
    color: var(--bg-dark);
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    margin-left: 5px;
    animation: ramadanGlow 2s ease-in-out infinite alternate;
    vertical-align: middle;
}

@keyframes ramadanGlow {
    from { box-shadow: 0 0 4px rgba(212, 175, 55, 0.3); }
    to { box-shadow: 0 0 12px rgba(212, 175, 55, 0.6); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    #prayerTimesBar {
        padding: 8px 12px;
        border-radius: 10px;
    }

    .prayer-compact {
        flex-wrap: wrap;
        gap: 8px;
    }

    .prayer-compact-left {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .prayer-compact-times {
        width: 100%;
        justify-content: space-between;
        gap: 2px;
    }

    .prayer-compact-item {
        padding: 3px 5px;
        min-width: 42px;
    }

    .prayer-compact-name {
        font-size: 0.52rem;
    }

    .prayer-compact-value {
        font-size: 0.7rem;
    }

    .prayer-compact-next {
        width: 100%;
        text-align: center;
        font-size: 0.72rem;
    }

    .prayer-geo-prompt {
        flex-wrap: wrap;
        gap: 10px;
    }

    .prayer-geo-prompt-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 380px) {
    .prayer-compact-item {
        min-width: 0;
        padding: 2px 3px;
        flex: 1;
    }

    .prayer-compact-name {
        font-size: 0.48rem;
    }

    .prayer-compact-value {
        font-size: 0.62rem;
    }

    .prayer-compact-hijri {
        font-size: 0.62rem;
    }

    .prayer-compact-left {
        flex-wrap: wrap;
        gap: 4px;
    }

    .prayer-ramadan-badge {
        font-size: 0.52rem;
        padding: 1px 5px;
    }
}

/* ==== css/bookmarks.css ==== */
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
   Styles pour le système de marque-pages */

.bm-btn {
    transition: all 0.18s ease;
    white-space: nowrap;
}
.bm-btn:hover {
    border-color: var(--mosaic-gold) !important;
    background: rgba(212,175,55,0.10) !important;
}
.bm-btn.bm-active {
    color: var(--mosaic-gold) !important;
    border-color: var(--mosaic-gold) !important;
    background: rgba(212,175,55,0.15) !important;
}

/* Animation de surlignage quand on revient depuis un bookmark */
@keyframes bm-glow {
    0%   { box-shadow: 0 0 0 0 rgba(212,175,55,0); background-color: transparent; }
    20%  { box-shadow: 0 0 0 6px rgba(212,175,55,0.45); background-color: rgba(212,175,55,0.10); }
    60%  { box-shadow: 0 0 0 4px rgba(212,175,55,0.25); background-color: rgba(212,175,55,0.08); }
    100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); background-color: transparent; }
}
.bm-highlight {
    animation: bm-glow 2.3s ease-out;
    border-radius: 10px;
}

/* Flash de surlignage quand on arrive sur une section via le panneau "Sections rapides" */
@keyframes qs-flash-glow {
    0%   { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
    25%  { box-shadow: 0 0 0 8px rgba(212,175,55,0.30); }
    100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
}
.qs-flash {
    animation: qs-flash-glow 1.6s ease-out;
    border-radius: 14px;
}

/* Toast pour confirmer l'ajout/retrait d'un bookmark */
.bm-toast {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: linear-gradient(135deg, #1a5f3c, #0f3d26);
    color: #f5f0e6;
    padding: 10px 18px;
    border-radius: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(212,175,55,0.4);
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.bm-toast.bm-show {
    opacity: 1;
    transform: translateY(0);
}

/* ==== css/mobile-sections.css ==== */
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
   Corrections mobile pour les 3 grandes sections lecture :
   Tawhîd, Trois fondements, Finance islamique. */

@media (max-width: 640px) {
    /* ─────── Conteneurs accordion + contenu ─────── */
    .theme-content {
        padding: 12px 10px !important;
        box-sizing: border-box;
    }

    /* Boîtes de contenu déployées : forcer le wrap propre + padding réduit */
    .tawhid-lesson-content,
    .fondements-content,
    .finance-content {
        padding: 14px 14px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* TOUT le texte dans ces sections doit wrapper proprement */
    .tawhid-lesson-content *,
    .fondements-content *,
    .finance-content * {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ─────── Header de chaque section (titre + dot + Marquer + chevron) ─────── */
    .tawhid-lesson-item,
    .fondements-item,
    .finance-item {
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    /* Numéro de la section : plus compact */
    .tawhid-lesson-item > span:first-child,
    .fondements-item > span:first-child,
    .finance-item > span:first-child {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 0.78rem !important;
        flex-shrink: 0;
    }

    /* Titre de la section : doit prendre la largeur restante mais wrap */
    .tawhid-lesson-item > div:nth-child(2),
    .fondements-item > div:nth-child(2),
    .finance-item > div:nth-child(2) {
        min-width: 0 !important;
        flex: 1 1 0 !important;
        font-size: 0.85rem !important;
        line-height: 1.35 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    .tawhid-lesson-item > div:nth-child(2) > div,
    .fondements-item > div:nth-child(2) > div,
    .finance-item > div:nth-child(2) > div,
    .finance-item > div:nth-child(2) > h4 {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }

    /* Bookmark button : version mini en icône seule sur mobile */
    .tawhid-lesson-item .bm-btn,
    .fondements-item .bm-btn,
    .finance-item .bm-btn {
        padding: 4px 6px !important;
        font-size: 0.85rem !important;
        flex-shrink: 0;
        white-space: nowrap;
        /* On masque le texte "Marquer/Enregistré", on garde l'étoile */
        font-size: 0 !important;
        min-width: 30px;
        text-align: center;
    }
    .tawhid-lesson-item .bm-btn::before,
    .fondements-item .bm-btn::before,
    .finance-item .bm-btn::before {
        content: "☆";
        font-size: 1rem;
        color: var(--text-muted);
    }
    .tawhid-lesson-item .bm-btn.bm-active::before,
    .fondements-item .bm-btn.bm-active::before,
    .finance-item .bm-btn.bm-active::before {
        content: "★";
        color: var(--mosaic-gold);
    }
    /* Chevron à droite : plus petit */
    .tawhid-chevron,
    .fondements-chevron,
    .finance-chevron {
        font-size: 0.65rem !important;
        flex-shrink: 0;
    }

    /* ─────── Citations (Coran/Hadith) dans le contenu déployé ─────── */
    .tawhid-lesson-content blockquote,
    .fondements-content blockquote,
    .finance-content blockquote {
        padding: 12px 14px !important;
        margin: 0 !important;
    }

    /* Texte arabe : peut être long, doit wrapper */
    .tawhid-lesson-content [lang="ar"],
    .fondements-content [lang="ar"],
    .finance-content [lang="ar"],
    .tawhid-lesson-content [style*="Amiri"],
    .fondements-content [style*="Amiri"],
    .finance-content [style*="Amiri"] {
        font-size: 1.05rem !important;
        line-height: 1.9 !important;
    }

    /* H3/H4 dans le contenu : titres adaptés à la largeur mobile */
    .tawhid-lesson-content h3,
    .fondements-content h3,
    .finance-content h3,
    .tawhid-lesson-content h4,
    .fondements-content h4,
    .finance-content h4 {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        word-wrap: break-word !important;
    }

    /* Paragraphes : taille adaptée */
    .tawhid-lesson-content p,
    .fondements-content p,
    .finance-content p {
        font-size: 0.88rem !important;
        line-height: 1.65 !important;
    }

    /* Listes : padding-left adapté pour ne pas dépasser */
    .tawhid-lesson-content ul,
    .fondements-content ul,
    .finance-content ul {
        padding-left: 18px !important;
        font-size: 0.88rem !important;
    }

    /* ─────── Champ de recherche intra-section ─────── */
    .quran-search-input,
    #tawhidSearch,
    #fondementsSearch,
    #financeSearch {
        font-size: 0.88rem !important;
        padding: 9px 12px !important;
    }
}

/* ─────── Très petits écrans (≤ 380px : iPhone SE etc.) ─────── */
@media (max-width: 380px) {
    .tawhid-lesson-item,
    .fondements-item,
    .finance-item {
        padding: 9px 10px !important;
        gap: 6px !important;
    }
    .tawhid-lesson-content,
    .fondements-content,
    .finance-content {
        padding: 12px 10px !important;
    }
    .tawhid-lesson-content blockquote,
    .fondements-content blockquote,
    .finance-content blockquote {
        padding: 10px 12px !important;
    }
}

/* ==== css/adhkar.css ==== */
/* ══════════════════════════════════════════════
   Adhkar (invocations) — Style mosaïque persane
   ══════════════════════════════════════════════ */

/* Filtres */
.adhkar-filter {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-mosaic);
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}

.adhkar-filter.active,
.adhkar-filter:hover {
    background: linear-gradient(135deg, var(--mosaic-gold), var(--mosaic-gold-dark));
    color: var(--bg-dark);
    border-color: var(--mosaic-gold);
    font-weight: 600;
}

/* Carte adhkar */
.adhkar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-mosaic);
    border-radius: var(--card-radius);
    padding: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Bordure supérieure mosaïque */
.adhkar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--mosaic-gold) 0%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 100%
    );
    opacity: 0.5;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.adhkar-card:hover {
    border-color: var(--mosaic-emerald-light);
    box-shadow: 0 5px 20px rgba(0, 109, 91, 0.12);
}

.adhkar-card:hover::before {
    opacity: 1;
}

.adhkar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

/* Badges */
.adhkar-badge {
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.adhkar-badge.morning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.adhkar-badge.evening {
    background: rgba(45, 143, 143, 0.15);
    color: var(--mosaic-turquoise-light);
}

.adhkar-badge.both {
    background: rgba(212, 175, 55, 0.15);
    color: var(--mosaic-gold);
}

.adhkar-count-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 109, 91, 0.1);
    color: var(--text-muted);
}

/* Texte arabe */
.adhkar-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    line-height: 2;
    color: var(--mosaic-gold);
    direction: rtl;
    text-align: right;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(5, 18, 18, 0.5);
    border-radius: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Translitération */
.adhkar-transliteration {
    font-size: 0.85rem;
    color: var(--mosaic-gold-dark);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 6px;
    direction: ltr;
    text-align: left;
}

/* Traduction française */
.adhkar-fr {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 6px;
    padding-left: 10px;
    border-left: 2px solid var(--mosaic-emerald-light);
}

/* Traduction anglaise */
.adhkar-en {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
}

/* Fadl (mérite) */
.adhkar-fadl {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 109, 91, 0.04);
    border-radius: 6px;
}

/* Source */
.adhkar-source {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(0, 109, 91, 0.06);
    border-radius: 6px;
    border-left: 2px solid var(--mosaic-emerald-light);
    line-height: 1.5;
}

/* Sections (matin/soir/les deux) */
.adhkar-section {
    margin-bottom: 20px;
}

.adhkar-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.adhkar-section-header h4 {
    margin: 0;
    font-size: 0.95rem;
    flex: 1;
}

.adhkar-section-header.both-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(0, 109, 91, 0.08));
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--mosaic-gold);
}

.adhkar-section-header.morning-section {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.12), rgba(212, 175, 55, 0.08));
    border: 1px solid rgba(255, 165, 0, 0.2);
    color: #e67e22;
}

.adhkar-section-header.evening-section {
    background: linear-gradient(135deg, rgba(0, 109, 91, 0.12), rgba(45, 143, 143, 0.08));
    border: 1px solid rgba(0, 109, 91, 0.25);
    color: var(--mosaic-turquoise-light);
}

.adhkar-section-icon {
    font-size: 1.3rem;
}

.adhkar-section-count {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(0, 109, 91, 0.1);
    white-space: nowrap;
}

/* Compteur de répétition */
.adhkar-counter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--mosaic-emerald-light);
    background: rgba(0, 163, 129, 0.1);
    color: var(--mosaic-emerald-light);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.adhkar-counter-btn:hover {
    background: rgba(0, 163, 129, 0.2);
}

.adhkar-counter-btn.done {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border-color: #4caf50;
}

/* Bouton explication IA */
.adhkar-explain-btn:hover {
    background: rgba(0, 109, 91, 0.15) !important;
}

/* Actions */
.adhkar-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ==== css/mosaic-patterns.css ==== */
/* ══════════════════════════════════════════════
   بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
   Motifs géométriques islamiques — pur CSS
   ══════════════════════════════════════════════ */

/* --- Étoile à 8 branches (Khatam) --- */
.mosaic-khatam {
    background-image:
        repeating-linear-gradient(
            45deg,
            var(--pattern-line-color) 0px,
            var(--pattern-line-color) 1px,
            transparent 1px,
            transparent var(--pattern-size)
        ),
        repeating-linear-gradient(
            -45deg,
            var(--pattern-line-color) 0px,
            var(--pattern-line-color) 1px,
            transparent 1px,
            transparent var(--pattern-size)
        ),
        repeating-linear-gradient(
            0deg,
            rgba(0, 163, 129, 0.05) 0px,
            rgba(0, 163, 129, 0.05) 1px,
            transparent 1px,
            transparent var(--pattern-size)
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 163, 129, 0.05) 0px,
            rgba(0, 163, 129, 0.05) 1px,
            transparent 1px,
            transparent var(--pattern-size)
        );
}

/* --- Fleur cristalline --- */
.mosaic-crystal-flower {
    background-image:
        radial-gradient(circle at 50% 50%,
            rgba(0, 109, 91, 0.08) 0%,
            transparent 35%
        ),
        conic-gradient(
            from 0deg at 50% 50%,
            rgba(0, 163, 129, 0.06) 0deg,
            transparent 22.5deg,
            rgba(45, 143, 143, 0.04) 22.5deg,
            transparent 45deg,
            rgba(0, 163, 129, 0.06) 45deg,
            transparent 67.5deg,
            rgba(45, 143, 143, 0.04) 67.5deg,
            transparent 90deg,
            rgba(0, 163, 129, 0.06) 90deg,
            transparent 112.5deg,
            rgba(45, 143, 143, 0.04) 112.5deg,
            transparent 135deg,
            rgba(0, 163, 129, 0.06) 135deg,
            transparent 157.5deg,
            rgba(45, 143, 143, 0.04) 157.5deg,
            transparent 180deg,
            rgba(0, 163, 129, 0.06) 180deg,
            transparent 202.5deg,
            rgba(45, 143, 143, 0.04) 202.5deg,
            transparent 225deg,
            rgba(0, 163, 129, 0.06) 225deg,
            transparent 247.5deg,
            rgba(45, 143, 143, 0.04) 247.5deg,
            transparent 270deg,
            rgba(0, 163, 129, 0.06) 270deg,
            transparent 292.5deg,
            rgba(45, 143, 143, 0.04) 292.5deg,
            transparent 315deg,
            rgba(0, 163, 129, 0.06) 315deg,
            transparent 337.5deg,
            rgba(45, 143, 143, 0.04) 337.5deg,
            transparent 360deg
        );
    background-size: var(--pattern-size) var(--pattern-size);
}

/* --- Arabesque (SVG inline) --- */
.mosaic-arabesque {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40Z' fill='none' stroke='%23d4af3712' stroke-width='0.8'/%3E%3Ccircle cx='40' cy='40' r='18' fill='none' stroke='%2300a38110' stroke-width='0.6'/%3E%3Ccircle cx='40' cy='40' r='8' fill='none' stroke='%23d4af3708' stroke-width='0.4'/%3E%3Cpath d='M40 22 Q50 30 40 40 Q30 30 40 22Z' fill='%2300a38106'/%3E%3Cpath d='M40 58 Q50 50 40 40 Q30 50 40 58Z' fill='%2300a38106'/%3E%3Cpath d='M22 40 Q30 30 40 40 Q30 50 22 40Z' fill='%232d8f8f06'/%3E%3Cpath d='M58 40 Q50 30 40 40 Q50 50 58 40Z' fill='%232d8f8f06'/%3E%3C/svg%3E");
    background-size: 80px 80px;
}

/* --- Motif hexagonal (Muqarnas) --- */
.mosaic-muqarnas {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'%3E%3Cpolygon points='30,0 60,15 60,37 30,52 0,37 0,15' fill='none' stroke='%2300a38108' stroke-width='0.5'/%3E%3Cpolygon points='30,10 50,20 50,32 30,42 10,32 10,20' fill='none' stroke='%23d4af3706' stroke-width='0.4'/%3E%3C/svg%3E");
    background-size: 60px 52px;
}

/* --- Cadre mosaïque (pour cartes) --- */
.mosaic-frame {
    position: relative;
}

.mosaic-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--mosaic-gold) 0%,
        var(--mosaic-emerald-light) 25%,
        var(--mosaic-turquoise) 50%,
        var(--mosaic-emerald-light) 75%,
        var(--mosaic-gold) 100%
    );
    border-radius: 14px 14px 0 0;
}

/* --- Bordure ornementale basse --- */
.mosaic-frame-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 20%,
        var(--mosaic-emerald-light) 50%,
        var(--mosaic-gold) 80%,
        transparent 100%
    );
}

/* --- Ornements de coin --- */
.mosaic-corners {
    position: relative;
}

.mosaic-corners::before,
.mosaic-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.mosaic-corners::before {
    top: 6px;
    left: 6px;
    border-right: none;
    border-bottom: none;
    border-radius: 4px 0 0 0;
}

.mosaic-corners::after {
    top: 6px;
    right: 6px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 4px 0 0;
}

/* ==== css/mosaic-animations.css ==== */
/* ══════════════════════════════════════════════
   Animations mosaïques islamiques
   ══════════════════════════════════════════════ */

/* --- Rotation lente (fond) --- */
@keyframes mosaicRotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* --- Rotation inverse (couche 2) --- */
@keyframes mosaicRotateReverse {
    from { transform: rotate(360deg); }
    to   { transform: rotate(0deg); }
}

/* --- Respiration (pulsation douce) --- */
@keyframes mosaicBreath {
    0%, 100% { opacity: 0.04; transform: scale(1); }
    50%      { opacity: 0.07; transform: scale(1.02); }
}

/* --- Défilement de motif --- */
@keyframes mosaicSlide {
    from { background-position: 0 0; }
    to   { background-position: var(--pattern-size) var(--pattern-size); }
}

/* --- Lueur douce (glow) --- */
@keyframes mosaicGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 109, 91, 0.1); }
    50%      { box-shadow: 0 0 30px rgba(0, 109, 91, 0.2), 0 0 60px rgba(212, 175, 55, 0.05); }
}

/* --- Entrée par fondu + montée --- */
@keyframes mosaicFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Rotation liée au scroll via --scroll-progress --- */
.mosaic-scroll-rotate {
    transform: rotate(calc(var(--scroll-progress, 0) * 360deg));
    transition: transform 0.15s linear;
}

/* --- Parallaxe liée au scroll --- */
.mosaic-scroll-parallax {
    transform: translateY(calc(var(--scroll-progress, 0) * -40px));
    transition: transform 0.15s linear;
}

/* --- Animation d'entrée au scroll --- */
.mosaic-animate-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.mosaic-animate-in.mosaic-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Classes d'animation réutilisables --- */
.mosaic-rotate-slow {
    animation: mosaicRotateSlow var(--pattern-rotation-speed) linear infinite;
    will-change: transform;
}

.mosaic-rotate-reverse {
    animation: mosaicRotateReverse calc(var(--pattern-rotation-speed) * 1.5) linear infinite;
    will-change: transform;
}

.mosaic-breathing {
    animation: mosaicBreath 8s ease-in-out infinite;
}

.mosaic-sliding {
    animation: mosaicSlide 30s linear infinite;
}

.mosaic-glowing {
    animation: mosaicGlow 6s ease-in-out infinite;
}

/* --- Étoile dorée scintillante (remplace twinkle) --- */
@keyframes mosaicTwinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
        box-shadow: 0 0 4px rgba(212, 175, 55, 0.3);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
        box-shadow: 0 0 12px rgba(212, 175, 55, 0.6), 0 0 24px rgba(0, 163, 129, 0.2);
    }
}

/* --- Transition hover pour les cartes --- */
.mosaic-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mosaic-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(0, 109, 91, 0.15),
        0 0 0 1px rgba(0, 163, 129, 0.1);
}

/* ==== css/mosaic-dividers.css ==== */
/* ══════════════════════════════════════════════
   Séparateurs et bordures mosaïques
   ══════════════════════════════════════════════ */

/* --- Séparateur gradient or-émeraude --- */
.mosaic-divider {
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mosaic-gold) 15%,
        var(--mosaic-emerald-light) 35%,
        var(--mosaic-turquoise) 50%,
        var(--mosaic-emerald-light) 65%,
        var(--mosaic-gold) 85%,
        transparent 100%
    );
    margin: var(--section-gap) 0;
    border: none;
    border-radius: 1px;
}

/* --- Séparateur fin --- */
.mosaic-divider-thin {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.3) 20%,
        rgba(0, 163, 129, 0.2) 50%,
        rgba(212, 175, 55, 0.3) 80%,
        transparent 100%
    );
    margin: 20px 0;
    border: none;
}

/* --- Séparateur avec médaillon central --- */
.mosaic-divider-medallion {
    display: flex;
    align-items: center;
    gap: 0;
    margin: var(--section-gap) 0;
    padding: 0 10px;
}

.mosaic-divider-medallion::before,
.mosaic-divider-medallion::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--mosaic-gold),
        var(--mosaic-emerald-light)
    );
}

.mosaic-divider-medallion::after {
    background: linear-gradient(
        90deg,
        var(--mosaic-emerald-light),
        var(--mosaic-gold),
        transparent
    );
}

.mosaic-divider-medallion .medallion {
    width: 22px;
    height: 22px;
    transform: rotate(45deg);
    border: 1px solid var(--mosaic-gold);
    background: rgba(0, 109, 91, 0.12);
    flex-shrink: 0;
    margin: 0 14px;
    position: relative;
}

.mosaic-divider-medallion .medallion::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid rgba(0, 163, 129, 0.3);
    transform: rotate(0deg);
}

/* --- Séparateur étoile --- */
.mosaic-divider-star {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.mosaic-divider-star::before,
.mosaic-divider-star::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.25));
}

.mosaic-divider-star::after {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.25), transparent);
}

.mosaic-divider-star .star-icon {
    margin: 0 12px;
    font-size: 0.9rem;
    color: var(--mosaic-gold);
    opacity: 0.6;
}

/* --- Bande ornementale (pour header/footer) --- */
.mosaic-band {
    height: 4px;
    background:
        repeating-linear-gradient(
            90deg,
            var(--mosaic-gold) 0px,
            var(--mosaic-gold) 8px,
            var(--mosaic-emerald-light) 8px,
            var(--mosaic-emerald-light) 16px,
            var(--mosaic-turquoise) 16px,
            var(--mosaic-turquoise) 24px,
            var(--mosaic-emerald-light) 24px,
            var(--mosaic-emerald-light) 32px,
            var(--mosaic-gold) 32px,
            var(--mosaic-gold) 40px
        );
    opacity: 0.5;
}

/* ==== css/ecole-acces.css ==== */
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
   Accès à l'espace pédagogique depuis le site : le bloc sous la recherche et
   le bouton fixe en haut de page (créé par js/ecole-suivi.js). */
.acces-ecole {
    display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap;
    max-width: 720px; margin: 4px auto 16px; padding: 14px 18px; text-align: left;
    background: linear-gradient(135deg, rgba(0, 109, 91, 0.28), rgba(8, 24, 22, 0.75));
    border: 1px solid rgba(212, 175, 55, 0.38); border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(244, 228, 188, 0.08);
}
.acces-ecole-texte { display: flex; flex-direction: column; gap: 3px; flex: 1 1 240px; min-width: 0; }
.acces-ecole-titre { color: var(--mosaic-gold); font-weight: 700; font-size: 1rem; }
.acces-ecole-sous { color: var(--text-muted); font-size: 0.84rem; line-height: 1.45; }
.acces-ecole-boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.acces-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 15px;
    border-radius: 10px; border: 1px solid rgba(212, 175, 55, 0.45); color: var(--mosaic-gold);
    font-size: 0.88rem; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
}
.acces-btn:hover { background: rgba(212, 175, 55, 0.12); transform: translateY(-1px); }
.acces-btn-plein { background: linear-gradient(135deg, #d4af37, #b8941f); color: #06201b; border-color: transparent; }
.acces-btn-plein:hover { background: linear-gradient(135deg, #e0bd4c, #c9a227); }

/* Bouton fixe, à gauche du sélecteur de langue : visible à tout moment du défilement. */
#accesEcoleFixe {
    position: fixed; top: 12px; z-index: 9500; display: flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: 22px; background: rgba(8, 24, 22, 0.88);
    border: 1px solid rgba(212, 175, 55, 0.45); color: var(--mosaic-gold, #d4af37);
    font-size: 0.9rem; font-weight: 600; text-decoration: none; line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); transition: transform 0.15s ease, background 0.15s ease;
    /* Un prénom long ne passe pas sur deux lignes : il est tronqué. */
    display: block; max-width: calc(100vw - 130px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#accesEcoleFixe:hover { transform: translateY(-1px); background: rgba(15, 38, 34, 0.96); }
@media (max-width: 640px) {
    .acces-ecole { padding: 13px 14px; }
    .acces-ecole-boutons { width: 100%; }
    .acces-btn { flex: 1 1 auto; }
    #accesEcoleFixe { font-size: 0.82rem; padding: 6px 11px; }
}
/* Sous 1200 px de large, les deux boutons fixes du haut (connexion, langue) recouvraient le
   bandeau des horaires de prière : on leur réserve une rangée. */
@media (max-width: 1200px) { #prayerTimesBar { margin-top: 42px; } }

button.acces-btn { background: transparent; font-family: inherit; cursor: pointer; }

/* Sources de la recherche accompagnée (compte connecté) */
.sources-sawm { margin: 12px 0 18px; padding: 14px 18px; border-radius: 12px; background: rgba(8, 24, 22, 0.92); border: 1px solid rgba(212, 175, 55, 0.35); }
.sources-sawm h4 { margin: 0 0 8px; color: var(--mosaic-gold); font-size: 0.95rem; }
.sources-sawm ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sources-sawm li { font-size: 0.86rem; line-height: 1.55; }
.sources-sawm li b { color: var(--text-light); }
.sources-sawm li span { display: block; color: var(--text-muted); }
.sources-sawm a { color: var(--mosaic-gold); }
.sources-sawm-note { margin: 10px 0 0; font-size: 0.76rem; color: var(--text-muted); }

/* Référencement par halal.txt (fenêtre « Référencer un site ») */
.halal-txt { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(212, 175, 55, 0.45); background: rgba(0, 109, 91, 0.16); margin-bottom: 14px; }
.halal-txt h4 { margin: 0 0 6px; color: var(--mosaic-gold); font-size: 0.98rem; }
.halal-txt p { margin: 0 0 8px; font-size: 0.84rem; line-height: 1.55; color: var(--text-muted); }
.halal-txt a { color: var(--mosaic-gold); }
.halal-txt code { color: var(--mosaic-gold-light); }
.halal-txt-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.halal-txt-ligne input { flex: 1 1 200px; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(212, 175, 55, 0.3); background: rgba(3, 20, 18, 0.8); color: var(--text-light); font: inherit; }
.halal-txt-ligne button { padding: 9px 14px; border-radius: 9px; border: 1px solid rgba(212, 175, 55, 0.5); background: linear-gradient(135deg, #1f8f6a, #0f5f47); color: #f4e4bc; font: inherit; font-weight: 600; cursor: pointer; }
.halal-txt-ou { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 10px; }

/* Chaîne de transmission d'un hadith */
.mb-isnad { margin: 8px 0; border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 10px; background: rgba(0, 109, 91, 0.12); }
.mb-isnad summary { cursor: pointer; padding: 8px 12px; font-size: 0.84rem; color: var(--mosaic-gold); }
.mb-isnad-texte { padding: 4px 14px 8px; font-family: 'Amiri', serif; font-size: 1.15rem; line-height: 2; color: var(--mosaic-gold-light); }
.mb-isnad-note { padding: 0 14px 10px; font-size: 0.74rem; color: var(--text-muted); }
/* Résultats trouvés ailleurs sur le site (cours, invocations, 99 noms) */
.resultats-site { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(212, 175, 55, 0.35); background: rgba(8, 24, 22, 0.92); display: grid; gap: 8px; }
.resultats-site-titre { color: var(--mosaic-gold); font-weight: 600; font-size: 0.92rem; }
.resultat-site { display: grid; gap: 2px; padding: 8px 11px; border-radius: 9px; text-decoration: none; background: rgba(0, 109, 91, 0.14); border: 1px solid rgba(0, 163, 129, 0.25); }
.resultat-site:hover { border-color: rgba(212, 175, 55, 0.55); }
.resultat-site b { color: var(--text-light); font-size: 0.92rem; }
.resultat-site-type { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mosaic-gold); }
.resultat-site-extrait { font-size: 0.82rem; color: var(--text-muted); }

/* Toutes les invocations (la Citadelle du musulman) */
.hisn-chapitres { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.hisn-chapitre { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; font: inherit; position: relative;
    background: rgba(0, 109, 91, 0.14); border: 1px solid rgba(0, 163, 129, 0.28); color: var(--text-light); }
.hisn-chapitre:hover { border-color: rgba(212, 175, 55, 0.6); }
.hisn-chapitre span { font-family: 'Amiri', serif; font-size: 1.05rem; color: var(--mosaic-gold); text-align: right; }
.hisn-chapitre b { font-size: 0.86rem; font-weight: 500; padding-right: 26px; }
.hisn-chapitre small { position: absolute; left: 10px; top: 9px; font-size: 0.7rem; color: var(--text-muted); border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 10px; padding: 0 6px; }
.hisn-vide, .hisn-source { color: var(--text-muted); font-size: 0.8rem; }
.hisn-source { margin: 14px 0 0; line-height: 1.5; }
.hisn-retour { background: transparent; border: 1px solid rgba(212, 175, 55, 0.4); color: var(--mosaic-gold); border-radius: 9px; padding: 7px 12px; cursor: pointer; font: inherit; font-size: 0.86rem; }
.hisn-titre { margin: 12px 0; color: var(--text-light); font-size: 1rem; display: grid; gap: 4px; }
.hisn-titre span { font-family: 'Amiri', serif; font-size: 1.3rem; color: var(--mosaic-gold); }
.hisn-carte { padding: 14px 16px; border-radius: 12px; background: rgba(8, 24, 22, 0.92); border: 1px solid rgba(212, 175, 55, 0.22); margin-bottom: 10px; }
.hisn-arabe { font-family: 'Amiri', serif; font-size: 1.45rem; line-height: 2.1; color: var(--mosaic-gold-light); }
.hisn-translit { font-style: italic; color: var(--text-muted); font-size: 0.86rem; margin: 6px 0; }
.hisn-sens { color: var(--text-light); font-size: 0.93rem; line-height: 1.6; }
.hisn-compteur { margin-top: 10px; padding: 7px 14px; border-radius: 18px; cursor: pointer; font: inherit; font-size: 0.84rem; color: var(--mosaic-gold); background: transparent; border: 1px solid rgba(212, 175, 55, 0.45); }
.hisn-compteur.fait { background: rgba(47, 191, 113, 0.18); border-color: #2fbf71; color: #8fe6b8; }

/* ==== css/mobile-perf.css ==== */
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
   Performance mobile — chargé EN DERNIER dans le bundle CSS pour l'emporter
   sur les règles décoratives (voir bundle.json).

   Mesuré sur la page d'accueil : 46 animations CSS actives en permanence
   (26 étoiles qui scintillent, 18 cellules de mosaïque qui tournent ou
   respirent, dont 20 avec ombre ou filtre), 13 hors écran. Sur ordinateur
   c'est gratuit ; sur téléphone ça occupe le GPU, vide la batterie et fait
   saccader le défilement. On coupe le décoratif sous 768px — le point de
   rupture déjà utilisé dans le reste du CSS — sans toucher aux animations
   utiles (spinner de chargement, apparition des sections, barre de prière). */
@media (max-width: 768px) {
    .star,
    .mc-cell,
    .mosaic-rotate-slow,
    .mosaic-rotate-reverse,
    .mosaic-breathing,
    .mosaic-sliding,
    .mosaic-glowing {
        animation: none !important;
        will-change: auto !important;
    }
}

