/* ============================================================
   DIIWAANUL QULUUMI DIINIYAH — Style principal
   Développé par BBTEK-TV-STUDIO
   Palette : Vert Touba / Or / Crème parchemin / Encre
   ============================================================ */

:root {
    --vert-touba: #0B5D3B;
    --vert-touba-fonce: #07442A;
    --vert-touba-clair: #117A4D;
    --or: #C9962C;
    --or-clair: #E8C570;
    --creme: #F6F1E4;
    --creme-fonce: #ECE3CC;
    --encre: #1C2B23;
    --blanc: #FFFFFF;

    --font-display: 'Amiri', serif;
    --font-body: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--creme);
    color: var(--encre);
}

/* ============== MOTIF DE FOND DISCRET (zellige géométrique) ============== */
.motif-fond {
    background-color: var(--creme);
    background-image:
        radial-gradient(circle at 0 0, rgba(11,93,59,0.05) 0, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(201,150,44,0.07) 0, transparent 50%);
    background-attachment: fixed;
}

/* ============================================================
   PAGES D'AUTHENTIFICATION
   ============================================================ */
.page-auth {
    min-height: 100vh;
    background: linear-gradient(160deg, var(--vert-touba-fonce) 0%, var(--vert-touba) 55%, #0d6e46 100%);
    position: relative;
    overflow-x: hidden;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(201,150,44,0.04) 0px, rgba(201,150,44,0.04) 2px, transparent 2px, transparent 40px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 40px);
    pointer-events: none;
    z-index: 0;
}

.auth-brand { position: relative; z-index: 1; }

.auth-logo {
    width: 72px;
    height: 72px;
    line-height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--or-clair) 0%, var(--or) 100%);
    color: var(--vert-touba-fonce);
    font-size: 2rem;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.12), 0 10px 30px rgba(0,0,0,0.25);
}

.auth-title {
    font-family: var(--font-display);
    color: var(--blanc);
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.auth-subtitle {
    color: var(--or-clair);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.auth-card {
    position: relative;
    z-index: 1;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(6px);
}

.auth-card .form-control {
    border-radius: 12px;
    border: 1.5px solid #e2dcc8;
    padding: 0.75rem 1rem;
}
.auth-card .form-control:focus {
    border-color: var(--vert-touba);
    box-shadow: 0 0 0 0.2rem rgba(11,93,59,0.15);
}

.lien-accent { color: var(--vert-touba); font-weight: 600; text-decoration: none; }
.lien-accent:hover { color: var(--or); text-decoration: underline; }

.btn-success {
    background: linear-gradient(135deg, var(--vert-touba) 0%, var(--vert-touba-fonce) 100%);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-success:hover {
    background: linear-gradient(135deg, var(--vert-touba-clair) 0%, var(--vert-touba) 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(11,93,59,0.3);
}

/* ============================================================
   NAVBAR PRINCIPALE
   ============================================================ */
.navbar-diiwaan {
    background: linear-gradient(90deg, var(--vert-touba-fonce) 0%, var(--vert-touba) 100%);
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    padding: 0.6rem 0;
}
.navbar-diiwaan .navbar-brand {
    font-family: var(--font-display);
    color: var(--or-clair) !important;
    font-weight: 700;
    font-size: 1.3rem;
}
.navbar-diiwaan .navbar-brand span { color: var(--blanc); }
.navbar-diiwaan .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    margin: 0 0.25rem;
    border-radius: 8px;
    padding: 0.5rem 1rem !important;
    transition: all 0.15s ease;
}
.navbar-diiwaan .nav-link:hover,
.navbar-diiwaan .nav-link.active {
    color: var(--blanc) !important;
    background: rgba(201,150,44,0.25);
}
.navbar-diiwaan .nav-link.active { border-bottom: 2px solid var(--or-clair); }

/* ============================================================
   HERO MIHRAB (signature visuelle — arc stylisé)
   ============================================================ */
.hero-mihrab {
    position: relative;
    background: linear-gradient(160deg, var(--vert-touba-fonce), var(--vert-touba));
    color: var(--blanc);
    padding: 4rem 1rem 6rem;
    overflow: hidden;
    text-align: center;
}
.hero-mihrab::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    border: 3px solid var(--or-clair);
    border-bottom: none;
    border-radius: 110px 110px 0 0;
    opacity: 0.35;
}
.hero-mihrab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    border: 1.5px solid var(--or-clair);
    border-bottom: none;
    border-radius: 160px 160px 0 0;
    opacity: 0.18;
}
.hero-mihrab h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.6rem;
    color: var(--or-clair);
    position: relative;
    z-index: 2;
}
.hero-mihrab p { position: relative; z-index: 2; opacity: 0.9; max-width: 640px; margin: 0.5rem auto 0; }

/* ============================================================
   CARTES DE CONTENU (qacaid)
   ============================================================ */
.carte-qacida {
    border: none;
    border-radius: 16px;
    background: var(--blanc);
    box-shadow: 0 4px 18px rgba(11,93,59,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    height: 100%;
}
.carte-qacida:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(11,93,59,0.18);
}
.carte-qacida .icone-top {
    background: linear-gradient(135deg, var(--vert-touba), var(--vert-touba-fonce));
    color: var(--or-clair);
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
.carte-qacida .card-title {
    font-family: var(--font-display);
    color: var(--vert-touba-fonce);
    font-weight: 700;
}
.badge-or {
    background: var(--or);
    color: var(--vert-touba-fonce);
    font-weight: 600;
}

/* ============================================================
   LECTEUR AUDIO (Qacaid Fiqh + Qacaid Lecture)
   ============================================================ */
.lecteur-audio-panel {
    background: linear-gradient(135deg, var(--vert-touba-fonce), var(--vert-touba));
    border-radius: 18px;
    color: var(--blanc);
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.lecteur-controles button {
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: var(--blanc);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.15s ease;
}
.lecteur-controles button:hover { background: var(--or); color: var(--vert-touba-fonce); border-color: var(--or); }
.lecteur-controles button.principal { width: 64px; height: 64px; font-size: 1.6rem; background: var(--or); color: var(--vert-touba-fonce); border-color: var(--or); }

.barre-progression {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}
.barre-progression .progression {
    height: 100%;
    background: var(--or);
    border-radius: 4px;
    width: 0%;
}

.texte-defilant {
    background: var(--encre);
    color: var(--creme);
    border-radius: 14px;
    padding: 1.5rem;
    min-height: 160px;
    max-height: 320px;
    overflow-y: auto;
    text-align: center;
}
.texte-defilant .vers-actif {
    color: var(--or-clair);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    animation: apparitionVersActif 0.4s ease;
}
@keyframes apparitionVersActif {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.vers-wolof-actif {
    color: var(--or-clair);
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    border-top: 1px solid rgba(201,150,44,0.3);
    padding-top: 0.4rem;
    margin-top: 0.3rem;
    font-style: italic;
    text-align: left;
    direction: ltr;
}
.vers-wolof-inactif {
    font-size: 0.85rem;
    opacity: 0.35;
    font-style: italic;
    text-align: left;
    direction: ltr;
    margin-top: 0.2rem;
}
.vers-actif-bloc {
    border-left: 3px solid var(--or);
    padding-left: 0.75rem;
}
.texte-defilant .vers-arabe {
    font-family: var(--font-display);
    direction: rtl;
    font-size: 1.5rem;
    line-height: 2.2;
}
.texte-defilant .vers-inactif { opacity: 0.4; font-size: 1.1rem; }

.zone-traduction-pdf {
    background: var(--blanc);
    border: 1.5px dashed var(--or);
    border-radius: 14px;
    padding: 1.25rem;
}
.btn-langue.actif {
    background: var(--vert-touba);
    color: var(--blanc);
    border-color: var(--vert-touba);
}

.liste-playlist .item-playlist {
    border-radius: 10px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.liste-playlist .item-playlist:hover { background: var(--creme-fonce); }
.liste-playlist .item-playlist.actif { background: var(--vert-touba); color: var(--blanc); }

/* ============================================================
   CHAT WHATSAPP FLOTTANT
   ============================================================ */
.whatsapp-flottant {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
}
.whatsapp-bouton {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: var(--blanc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    animation: pulse-whatsapp 2.4s infinite;
    text-decoration: none;
}
@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
    70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.whatsapp-menu {
    position: absolute;
    bottom: 72px;
    right: 0;
    background: var(--blanc);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 260px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.75rem;
    display: none;
}
.whatsapp-menu.ouvert { display: block; }
.whatsapp-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    color: var(--encre);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.whatsapp-menu a:hover { background: var(--creme-fonce); }

/* ============================================================
   ÉTOILES DE NOTATION
   ============================================================ */
.etoiles-notation { font-size: 1.8rem; cursor: pointer; }
.etoiles-notation .etoile { color: #d8d2c0; transition: color 0.1s ease; }
.etoiles-notation .etoile.pleine { color: var(--or); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-diiwaan {
    background: var(--vert-touba-fonce);
    color: rgba(255,255,255,0.8);
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
}
.footer-diiwaan a { color: var(--or-clair); text-decoration: none; }
.footer-diiwaan a:hover { text-decoration: underline; }

/* ============================================================
   ADMIN — SIDEBAR
   ============================================================ */
.admin-sidebar {
    background: var(--vert-touba-fonce);
    min-height: 100vh;
    color: var(--blanc);
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    border-radius: 10px;
    margin-bottom: 0.2rem;
    padding: 0.65rem 1rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(201,150,44,0.25);
    color: var(--or-clair);
}
.admin-stat-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
.admin-stat-card .stat-icone {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--blanc);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero-mihrab h1 { font-size: 1.9rem; }
    .hero-mihrab { padding: 2.5rem 1rem 4rem; }
    .auth-title { font-size: 1.5rem; }
    .lecteur-controles button { width: 44px; height: 44px; font-size: 1rem; }
    .lecteur-controles button.principal { width: 54px; height: 54px; }
}
