/* ======================================================== */
/* 1. CONFIGURATION DU THÈME MUSLIM PRO (PREMIUM DARK)      */
/* ======================================================== */

:root {
  --mp-green-bg: #060e0a; /* Fond vert nuit profond */
  --mp-green-surface: #0d1612; /* Couleur des cartes et surfaces */
  --mp-gold: #b08d57; /* Or mat pour le prestige */
  --mp-gold-bright: #e6c18a; /* Or brillant pour les accents */
  --text-main: #ffffff; /* Texte principal blanc pur */
  --text-muted: rgba(255, 255, 255, 0.5); /* Texte secondaire atténué */
  --font-ar: "Amiri", serif; /* Police calligraphique arabe */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Style de base du corps de page */
.quran-theme {
  background-color: var(--mp-green-bg);
  color: var(--text-main);
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* Ajout du dégradé subtil du thème Hadith */
  background-image: linear-gradient(
    to bottom,
    rgba(176, 141, 87, 0.05),
    transparent
  );
  background-attachment: fixed;
}

/* ======================================================== */
/* 2. HEADER FIXE GLASS PANEL (STYLE HARMONISÉ)             */
/* ======================================================== */

.glass-panel.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 85px;
  background: rgba(13, 22, 18, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 2px solid var(--mp-gold, #b08d57);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 2000;
  box-sizing: border-box;
}

/* Conteneurs pour le centrage absolu du titre */
.navigation-top,
.header-actions-right {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions-right {
  justify-content: flex-end;
}

.header-center-content {
  flex: 0 1 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ======================================================== */
/* 3. BOUTONS : RETOUR & ACTIONS (STYLE ÉCRIN)              */
/* ======================================================== */

.floating-back-btn,
.action-icon-btn {
  width: 45px;
  height: 45px;
  background: rgba(176, 141, 87, 0.1);
  border: 1px solid rgba(176, 141, 87, 0.3);
  border-radius: 12px;
  color: #f1d5a9; /* mp-gold-bright */
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.floating-back-btn:hover,
.action-icon-btn:hover {
  background: var(--mp-gold, #b08d57);
  color: #060e0a !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(176, 141, 87, 0.4);
}

/* Masquage des textes "Accueil" ou "Liste" */
.floating-back-btn span {
  display: none;
}

/* Effet Gold pour l'icône active (Favoris) */
.active-gold i {
  background: linear-gradient(180deg, #f1d5a9 0%, #b08d57 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 5px rgba(176, 141, 87, 0.5));
}

/* ======================================================== */
/* 4. TITRE ET SOUS-TITRE (CENTRE)                         */
/* ======================================================== */

.header-main-title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1rem, 3.5vw, 1.3rem);
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  line-height: 1.2;
}

.arabic-mini {
  font-family: "Amiri", serif;
  color: var(--mp-gold, #b08d57);
  font-size: 0.95rem;
  margin-top: 2px;
  opacity: 0.9;
}

/* ======================================================== */
/* 5. LOGO ET BRANDING (HERO SECTION)                      */
/* ======================================================== */

.quran-brand-header {
  text-align: center;
  padding: 130px 20px 50px;
  background: linear-gradient(to bottom, rgba(176, 141, 87, 0.08), transparent);
}

.brand-logo-container {
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.main-logo-gold {
  height: 180px; /* Légèrement réduit pour l'équilibre */
  width: auto;
  filter: drop-shadow(0 0 20px rgba(176, 141, 87, 0.4));
  transition: all 0.5s ease;
  cursor: pointer;
}

.main-logo-gold:hover {
  transform: scale(1.05) translateY(-5px);
  filter: drop-shadow(0 0 35px rgba(230, 193, 138, 0.6));
}

.brand-name {
  color: #ffffff;
  background: linear-gradient(180deg, #f1d5a9 0%, #b08d57 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 5px;
  text-transform: uppercase;
}

/* ======================================================== */
/* 6. TAGLINE BRANDING - STYLE PREMIUM ÉLÉGANT             */
/* ======================================================== */

.brand-tagline {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff !important;
  margin: 12px 0 0 0;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(176, 141, 87, 0.3);
  line-height: 1.4;
  text-transform: uppercase;
  position: relative;
}

/* Effet de lueur or sur les points • */
.brand-tagline::before,
.brand-tagline::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--mp-gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(176, 141, 87, 0.6);
  top: 50%;
  transform: translateY(-50%);
}

.brand-tagline::before {
  left: 45%;
  animation: pulse-gold 2s ease-in-out infinite;
}

.brand-tagline::after {
  right: 45%;
  animation: pulse-gold 2s ease-in-out infinite reverse;
}

/* Animation pulsation or subtile */
@keyframes pulse-gold {
  0%,
  100% {
    opacity: 0.7;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.3);
  }
}

/* ======================================================== */
/* 7. BARRE DE RECHERCHE CENTRÉE                            */
/* ======================================================== */

.search-section {
  max-width: 550px;
  margin: 40px auto 20px auto;
  padding: 0 20px;
}

.search-bar-premium {
  display: flex;
  align-items: center;
  background: var(--mp-green-surface);
  border: 1px solid rgba(176, 141, 87, 0.2);
  border-radius: 15px;
  padding: 15px 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.search-bar-premium:focus-within {
  border-color: var(--mp-gold);
  box-shadow: 0 0 20px rgba(176, 141, 87, 0.2);
  transform: translateY(-2px);
}

.search-bar-premium i {
  color: var(--mp-gold);
  margin-right: 15px;
  font-size: 1.2rem;
}

.search-bar-premium input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.1rem;
  flex: 1;
  outline: none;
}

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

/* ======================================================== */
/* 8. RESPONSIVE GLOBAL                                     */
/* ======================================================== */

@media (max-width: 768px) {
  .brand-tagline {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
  }
}

@media (max-width: 480px) {
  .glass-panel.main-header {
    height: 75px;
    padding: 0 15px;
  }

  .floating-back-btn,
  .action-icon-btn {
    width: 40px;
    height: 40px;
  }

  .header-main-title {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }

  .arabic-mini {
    font-size: 0.8rem;
  }

  .main-logo-gold {
    height: 140px;
  }

  .brand-name {
    font-size: 1.6rem;
    letter-spacing: 3px;
  }
}

/* ======================================================== */
/* 4. LISTE DES SOURATES (CARTES PREMIUM V2)                */
/* ======================================================== */

.surah-list-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  max-width: 800px; /* Élargi pour un meilleur confort sur tablette */
  margin: 0 auto 120px auto;
}

.surah-premium-card {
  background: linear-gradient(145deg, var(--mp-green-surface), #0a1310);
  border: 1px solid rgba(176, 141, 87, 0.12);
  border-radius: 22px; /* Coins plus arrondis pour un look moderne */
  padding: 20px 28px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  /* Effet d'ombre interne pour la profondeur */
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05),
    0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Pseudo-élément pour un reflet de lumière au survol */
.surah-premium-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(176, 141, 87, 0.05),
    transparent
  );
  transition: 0.6s;
}

.surah-premium-card:hover {
  border-color: rgba(176, 141, 87, 0.5);
  background: var(--mp-green-surface);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(176, 141, 87, 0.1);
}

.surah-premium-card:hover::after {
  left: 200%;
}

.surah-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* --- LE NUMÉRO AVEC ÉTOILE DYNAMIQUE --- */
.surah-number-wrapper {
  min-width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  color: var(--mp-gold-bright);
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  transition: transform 0.6s ease;
}

/* L'étoile octogonale en background */
.surah-number-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 0 L61 39 L100 50 L61 61 L50 100 L39 61 L0 50 L39 39 Z" fill="none" stroke="%23b08d57" stroke-width="3"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.8;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.surah-premium-card:hover .surah-number-wrapper::before {
  transform: rotate(90deg); /* Rotation lente de l'étoile au survol */
  opacity: 1;
}

/* --- INFOS CENTRALES --- */
.surah-info-center {
  flex-grow: 1;
}

.surah-name-en {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.surah-sub-details {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.dot-separator {
  width: 4px;
  height: 4px;
  background: var(--mp-gold);
  border-radius: 50%;
  opacity: 0.5;
}

/* --- ARABE (FIN DE CARTE) --- */
.surah-arabic-end {
  text-align: right;
}

.surah-name-ar {
  font-family: var(--font-ar);
  font-size: 1.8rem;
  color: var(--mp-gold-bright);
  margin: 0;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(176, 141, 87, 0.2));
  transition: all 0.3s ease;
}

.surah-premium-card:hover .surah-name-ar {
  color: #ffffff;
  filter: drop-shadow(0 0 12px rgba(176, 141, 87, 0.5));
}
/* ======================================================== */
/* 5. DESIGN DU LECTEUR ET FORMULES SACRÉES (PREMIUM)       */
/* ======================================================== */

.quran-reader {
  max-width: 850px;
  margin: 40px auto 160px auto;
  padding: 0 20px;
}

/* CARTE D'EN-TÊTE - TOUS LES TEXTES CENTRÉS */
.surah-header-card {
  background: radial-gradient(
    circle at top,
    #0f1c16 0%,
    var(--mp-green-surface) 100%
  );
  border-radius: 30px;
  padding: 40px 30px;
  text-align: center; /* ✅ TOUT CENTRE */
  border: 1px solid rgba(176, 141, 87, 0.25);
  margin-bottom: 40px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.surah-header-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("https://www.transparenttextures.com/patterns/islamic-art.png");
  opacity: 0.03;
  pointer-events: none;
}

/* ✅ 1. NUMÉRO SOURATE - CENTRÉ */
.surah-meta {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mp-gold);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.9;
  text-align: center;
}

/* ✅ 2. NOM FRANÇAIS - CENTRÉ */
.surah-name-fr {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-main);
  margin: 0.5rem 0 1rem 0;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  font-family: "Poppins", sans-serif;
  text-align: center;
}

/* ✅ 3. TITRE ARABE - CENTRÉ (direction RTL mais aligné centre) */
.arabic-title {
  font-family: var(--font-ar);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--mp-gold-bright);
  margin: 0 0 2rem 0;
  line-height: 1.2;
  direction: rtl;
  text-align: center; /* ✅ CHANGÉ : CENTRE au lieu de right */
  text-shadow: 0 0 20px rgba(176, 141, 87, 0.3);
}

/* FORMULES SACRÉES - CONTENEUR MODERNE */
.sacred-formulas {
  background: rgba(176, 141, 87, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  margin: 1.5rem 0 2.5rem 0;
  border: 1px solid rgba(176, 141, 87, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center; /* ✅ TOUT CENTRE */
}

/* GROUPES FORMULES - CENTRÉS */
.formula-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5rem;
  align-items: center; /* ✅ CENTRAGE HORIZONTAL */
  text-align: center;
}

.formula-group:last-child {
  margin-bottom: 0;
}

/* ✅ ISTIDHA ARABE - CENTRÉ */
.istidha-text {
  font-family: var(--font-ar);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--mp-gold);
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
  direction: rtl;
  text-align: center; /* ✅ CHANGÉ : CENTRE */
  opacity: 0.85;
  max-width: 90%; /* Évite débordement */
}

/* ✅ BASMALA ARABE - CENTRÉ */
.basmala-text {
  font-family: var(--font-ar);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--mp-gold-bright);
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
  direction: rtl;
  text-align: center; /* ✅ CHANGÉ : CENTRE */
  text-shadow: 0 0 25px rgba(176, 141, 87, 0.4);
  max-width: 90%;
}

/* ✅ TRADUCTIONS - CENTRÉES */
.formula-translation {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 auto;
  font-style: italic;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.3px;
  font-weight: 400;
  text-align: center;
  max-width: 80%;
}

/* SÉPARATEUR OR - CENTRÉ */
.formula-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mp-gold), transparent);
  margin: 1.2rem auto; /* ✅ CENTRÉ */
  border-radius: 2px;
  opacity: 0.7;
  width: 60px; /* Largeur fixe pour élégance */
}

/* ANIMATION D'ENTRÉE */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .surah-header-card {
    padding: 30px 20px;
    margin-bottom: 30px;
  }
  .surah-name-fr {
    font-size: 1.3rem;
  }
  .arabic-title {
    font-size: 2.6rem;
  }
  .istidha-text,
  .basmala-text {
    font-size: 1.5rem;
    max-width: 95%;
  }
  .sacred-formulas {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .surah-header-card {
    padding: 25px 15px;
  }
  .surah-name-fr {
    font-size: 1.2rem;
  }
  .arabic-title {
    font-size: 2.2rem;
  }
  .istidha-text {
    font-size: 1.3rem;
  }
  .basmala-text {
    font-size: 1.8rem;
  }
}

/* ======================================================== */
/* 6. TEXTES DES VERSETS (AYATS) - STYLE HADITH PUR         */
/* ======================================================== */

.ayah-card {
  padding: 40px 15px;
  border-bottom: 1px solid rgba(176, 141, 87, 0.1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ayah-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Badge numéro style minimaliste et net */
.ayah-number-badge {
  color: var(--mp-gold);
  font-weight: 700;
  font-size: 1rem;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--mp-gold);
}

/* Bouton play plus simple */
.play-v-btn {
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
}

.play-v-btn:hover {
  color: var(--mp-gold-bright);
}

/* --- TEXTE ARABE (ÉQUILIBRÉ) --- */
.arabic-text {
  font-family: var(--font-ar);
  font-size: 2.4rem;
  line-height: 2.2;
  text-align: right;
  color: var(--mp-gold-bright);
  direction: rtl;
  margin: 10px 0;
}

/* --- TRADUCTION (L'ESSENCE DU STYLE HADITH) --- */
.translation-text {
  font-size: 1.1rem;
  color: #ffffff !important; /* Blanc pur */
  line-height: 1.7;
  font-weight: 700; /* Gras comme demandé */
  text-align: left;
  padding-left: 20px;
  border-left: 3px solid var(--mp-gold); /* La barre dorée caractéristique */
  margin-top: 10px;
}
.latin-text {
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  color: var(--mp-gold); /* Texte en doré pour la prononciation */
  font-style: italic;
  margin-bottom: 15px;
  line-height: 1.6;
  text-align: left;
  padding-left: 20px;
  opacity: 0.9;
}

.translation-text {
  color: #ffffff !important; /* Blanc pur pour le sens */
  font-weight: 700;
  line-height: 1.7;
  border-left: 3px solid var(--mp-gold);
  padding-left: 20px;
}
/* --- RESPONSIVE MOBILE --- */
@media (max-width: 480px) {
  .ayah-card {
    padding: 30px 10px;
  }

  .arabic-text {
    font-size: 1.8rem;
    line-height: 2;
  }

  .translation-text {
    font-size: 1rem;
    padding-left: 15px;
  }
}
/* ======================================================== */
/* 7. CONTRÔLES AUDIO (UNIVERSEL - DESIGN RAFFINÉ)          */
/* ======================================================== */

.quran-controls-floating {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  /* Fond ultra-sombre avec flou artistique */
  background: rgba(6, 14, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 20px)) 0;
  border-top: 1px solid rgba(176, 141, 87, 0.2);
  z-index: 2000;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

/* BARRE DE PROGRESSION DISCRÈTE */
.audio-progress-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.audio-progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--mp-gold), var(--mp-gold-bright));
  width: 0%; /* Piloté par JS */
  box-shadow: 0 0 10px rgba(176, 141, 87, 0.5);
  transition: width 0.1s linear;
}

.nav-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 4vw, 30px);
  max-width: 600px;
  margin: 0 auto;
}

/* BOUTON PLAY CENTRAL (STYLE ÉCRIN) */
.play-main-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.play-icon-bg {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle at 30% 30%, #1a2a23, #060e0a);
  border: 2px solid var(--mp-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--mp-gold-bright);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6),
    inset 0 2px 5px rgba(176, 141, 87, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-main-btn:active .play-icon-bg {
  transform: scale(0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.play-main-btn span {
  display: block;
  margin-top: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--mp-gold);
  text-transform: uppercase;
}

/* BOUTONS SECONDAIRES (PREC/SUIV) */
.control-btn {
  background: rgba(176, 141, 87, 0.08);
  border: 1px solid rgba(176, 141, 87, 0.15);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: #f1d5a9;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(176, 141, 87, 0.2);
  border-color: var(--mp-gold);
  color: white;
}

/* LOADER DE CHARGEMENT */
.gold-spinner {
  width: 45px;
  height: 45px;
  border: 2px solid rgba(176, 141, 87, 0.1);
  border-top: 2px solid var(--mp-gold);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

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

/* PROTECTION CONTRE LE CHEVAUCHEMENT DU CONTENU */
body {
  padding-bottom: 150px; /* Espace pour ne pas cacher le dernier verset */
}
/* --- ADAPTABILITÉ MOBILE UNIVERSELLE --- */

@media (max-width: 600px) {
  .back-btn {
    top: 10px;
    left: 10px;
    padding: 8px 12px;
    font-size: 0.7rem;
  }

  .quran-brand-header {
    padding-top: 80px;
  }
  .surah-premium-card {
    padding: 15px;
  }
  .surah-name-en {
    font-size: 1rem;
  }
  .surah-name-ar {
    font-size: 1.6rem;
  }
  .arabic-title {
    font-size: 2.4rem;
  }
  .arabic-text {
    font-size: 1.6rem;
  }
  .main-logo-gold {
    height: 110px;
  }

  .surah-number-wrapper {
    min-width: 40px;
    height: 40px;
    margin-right: 12px;
  }

  .basmala-text {
    font-size: 1.8rem;
  }
  .istidha-text {
    font-size: 1.3rem;
  }

  /* Navigation flottante en bas (Ajustement serré pour petits écrans) */
  .nav-controls {
    gap: 8px; /* Espace minimal pour garantir que les 5 boutons restent sur une ligne */
  }

  .play-main-btn span {
    font-size: 0.55rem;
    letter-spacing: 0.5px;
  }

  .glass-panel.main-header {
    height: 70px;
  }
}

/* Protection pour les écrans ultra-étroits (ex: Galaxy Fold plié) */
@media (max-width: 350px) {
  .nav-controls {
    gap: 4px;
  }
  .control-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  .play-icon-bg {
    width: 55px;
    height: 55px;
  }
}

/* ======================================================== */
/* 📝 DESCRIPTION DES DERNIÈRES MODIFICATIONS (UPDATE)      */
/* ======================================================== */
/*
  1. BRANDING HERO : 
     - Ajout d'un titre arabe centralisé avec police Amiri.
     - Tagline (Guidance lumineuse) passée en blanc pur et gras pour un style "Hadith".

  2. LOGO XL : 
     - Passage à une taille de 280px (précédemment 180px).
     - Transformation en cercle parfait (border-radius: 50%).
     - Ajout d'une bordure dorée (4px) et d'une ombre lumineuse type "Halo".

  3. ÉLARGISSEMENT DU CONTENU : 
     - Augmentation de la largeur maximale (max-width) à 1100px pour la grille et 900px pour la recherche.
     - Optimisation de l'espace interne des cartes de sourates pour remplir les grands écrans.

  4. FIXES RESPONSIVE : 
     - Redimensionnement automatique du logo sur mobile pour éviter les débordements.
*/
/* ======================================================== */
/* SECTION : EN-TÊTE DE LA MARQUE (BRANDING)                */
/* ======================================================== */

.quran-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 130px 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Titre principal en Français */
.brand-name {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 0;
  color: var(--text-main);
}

/* Titre majestueux en Arabe */
.brand-arabic-title {
  font-family: "Amiri", serif;
  font-size: 3.5rem;
  color: var(--mp-gold-bright);
  margin: -10px 0 5px 0;
  text-shadow: 0 0 20px rgba(176, 141, 87, 0.4);
  direction: rtl;
}

/* Sous-titre descriptif (Guidance lumineuse) */
.brand-tagline {
  font-size: 1.1rem;
  color: #ffffff; /* Blanc pur pour contraste */
  font-weight: 700; /* Gras premium */
  font-style: normal;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ======================================================== */
/* SECTION : LOGO CIRCULAIRE XL                             */
/* ======================================================== */

.main-logo-gold {
  height: 280px; /* Taille XL imposante */
  width: 280px;
  border-radius: 50%; /* Forme circulaire parfaite */
  object-fit: cover; /* Évite la déformation de l'image */
  border: 4px solid var(--mp-gold); /* Contour doré */
  box-shadow: 0 0 40px rgba(176, 141, 87, 0.5); /* Halo lumineux */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.3s ease;
  z-index: 10;
}

/* Interaction au survol du logo */
.main-logo-gold:hover {
  transform: scale(1.08); /* Zoom fluide */
  box-shadow: 0 0 50px rgba(176, 141, 87, 0.7);
}

/* ======================================================== */
/* SECTION : LAYOUT RECHERCHE ET LISTE DES SOURATES         */
/* ======================================================== */

/* Conteneur principal élargi */
.quran-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Barre de recherche allongée */
.search-section {
  width: 100%;
  max-width: 900px;
  margin: 20px auto 40px auto;
}

/* Grille de sourates (Affichage large) */
.surah-list-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 120px auto;
}

/* Cartes individuelles des sourates */
.surah-premium-card {
  padding: 25px 40px; /* Espace interne accru pour le confort visuel */
}

/* ======================================================== */
/* SECTION : RESPONSIVE DESIGN (ADAPTABILITÉ)               */
/* ======================================================== */

/* Ajustements pour tablettes */
@media (max-width: 768px) {
  .quran-container,
  .search-section,
  .surah-list-grid {
    max-width: 100%;
  }
  .main-logo-gold {
    height: 160px;
    width: 160px;
  }
}

/* Ajustements spécifiques pour mobiles (Petits écrans) */
@media (max-width: 480px) {
  .main-logo-gold {
    height: 180px;
    width: 180px;
  }
}

/* ======================================================== */
/* 📱 OPTIMISATION RESPONSIVE MOBILE (CONSOLIDÉE)           */
/* ======================================================== */

@media (max-width: 768px) {
    /* 1. Ajustement global des conteneurs */
    .quran-container, 
    .search-section, 
    .surah-list-grid, 
    .quran-reader {
        max-width: 100%;
        padding: 0 15px;
    }

    /* 2. Header Mobile */
    .glass-panel.main-header {
        height: 70px;
        padding: 0 10px;
    }

    .header-main-title {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    /* 3. Branding & Logo XL (Ajustement fluide) */
    .quran-brand-header {
        padding: 100px 15px 30px;
        gap: 15px;
    }

    .main-logo-gold {
        height: 160px; /* Réduction pour tablettes */
        width: 160px;
        border-width: 3px;
    }

    .brand-arabic-title {
        font-size: 2.5rem;
    }

    .brand-name {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    /* 4. Logo pour petits smartphones */
    .main-logo-gold {
        height: 140px;
        width: 140px;
    }

    /* 5. Cartes des Sourates (Optimisation de l'espace) */
    .surah-premium-card {
        padding: 15px 20px;
        border-radius: 18px;
    }

    .surah-number-wrapper {
        min-width: 40px;
        height: 40px;
        margin-right: 12px;
        font-size: 0.9rem;
    }

    .surah-name-en {
        font-size: 1rem;
    }

    .surah-name-ar {
        font-size: 1.5rem;
    }

    .surah-sub-details {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    /* 6. Lecteur et Versets */
    .arabic-title {
        font-size: 2.2rem;
    }

    .basmala-text {
        font-size: 1.8rem;
    }

    .arabic-text {
        font-size: 1.7rem;
        line-height: 1.8;
    }

    .translation-text, .latin-text {
        font-size: 0.95rem;
        padding-left: 12px;
    }

    /* 7. Barre de Recherche */
    .search-bar-premium {
        padding: 12px 18px;
    }

    .search-bar-premium input {
        font-size: 1rem;
    }

    /* 8. Contrôles Audio Flottants (Crucial pour Mobile) */
    .nav-controls {
        gap: 10px;
    }

    .play-icon-bg {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .play-main-btn span {
        font-size: 0.5rem;
    }
    
    body {
        padding-bottom: 130px; /* Évite que le player cache le contenu */
    }
}

/* 9. Correction pour écrans très étroits (Fold) */
@media (max-width: 340px) {
    .brand-arabic-title {
        font-size: 2rem;
    }
    .nav-controls {
        gap: 5px;
    }
    .control-btn {
        width: 35px;
        height: 35px;
    }
}