/* =========================================================
   DAR AL LOUGHAH — 02-typography.css
   ---------------------------------------------------------
   Module 2/6 : Typographie premium (brand, panel titles,
   section dividers, halo, rosettes, hello, hierarchy)
   
   ⚠️ À charger APRÈS 01-tokens.css.
   On garde toutes les classes existantes (.brand, .brand-title,
   .brand-small, .panel-title, .section-divider, .hello, etc.)
   et on upgrade leur design.
   ========================================================= */

/* =========================================================
   2.1 — BRAND HEADER (compat .brand, .brand-small)
   ========================================================= */
.brand{
  text-align: center;
  padding: 26px 0 10px;
  position: relative;
}
.brand-small{
  text-align: center;
  padding: 18px 0 10px;
  position: relative;
}

/* Halo lumineux derrière le brand (effet médaillon irradiant) */
.brand::before,
.brand-small::before{
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translateX(-50%);
  background: radial-gradient(circle,
    rgba(255,210,120,.22) 0%,
    rgba(232,192,96,.12) 25%,
    transparent 60%);
  z-index: 0;
  pointer-events: none;
  animation: brandHalo 7s ease-in-out infinite;
}
.brand-small::before{
  top: 12px;
  width: 180px;
  height: 180px;
}
@keyframes brandHalo{
  0%, 100% { opacity: .55; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

/* =========================================================
   2.2 — CRESCENT (lune dorée — compat .crescent, .crescent-wrap)
   ========================================================= */
.crescent-wrap{
  position: relative;
  display: inline-block;
  margin-top: 8px;
  z-index: 1;
}
.crescent{
  width: 180px;
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crescent svg{
  position: absolute;
  inset: 0;
  filter:
    drop-shadow(0 0 14px var(--gold-glow))
    drop-shadow(0 0 30px rgba(212,175,55,.3));
  animation: crescentGlow 5s ease-in-out infinite;
}
@keyframes crescentGlow{
  0%, 100% {
    filter: drop-shadow(0 0 12px var(--gold-glow)) drop-shadow(0 0 24px rgba(212,175,55,.25));
  }
  50% {
    filter: drop-shadow(0 0 20px var(--gold-glow)) drop-shadow(0 0 40px rgba(212,175,55,.45));
  }
}

/* =========================================================
   2.3 — BRAND TITLE (دار اللغة — calligraphie arabe dorée)
   compat .brand-title
   ========================================================= */
.brand-title{
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: clamp(44px, 12vw, 64px);
  line-height: 1;
  background: linear-gradient(180deg,
    var(--gold-6)  0%,
    var(--gold-5)  20%,
    var(--gold-4)  45%,
    var(--gold)    70%,
    var(--gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 30px rgba(212,175,55,.25);
  direction: rtl;
  letter-spacing: 2px;
  position: relative;
  z-index: 2;
  padding: 0 10px;
  animation: brandTitleFloat 6s ease-in-out infinite;
}
.brand-small .brand-title{
  font-size: clamp(28px, 7vw, 36px);
  animation: none;
}
@keyframes brandTitleFloat{
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* =========================================================
   2.4 — BRAND SUBTITLE (compat .brand-subtitle, .accent)
   ========================================================= */
.brand-subtitle{
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: .5px;
  opacity: .92;
}
.brand-subtitle .accent{
  color: var(--gold-light);
  font-weight: 600;
  font-style: normal;
}

/* =========================================================
   2.5 — PANEL TITLE (compat .panel-title)
   Les petites titres dorés avec barres décoratives latérales
   ========================================================= */
.panel-title{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  text-shadow: 0 0 10px rgba(232,192,96,.3);
}
.panel-title::before,
.panel-title::after{
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 10px;
}

/* =========================================================
   2.6 — SECTION DIVIDER (compat .section-divider, .diamond)
   Le diamant central devient une rosette 8 pointes en SVG
   ========================================================= */
.section-divider{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 10px;
  color: var(--gold);
}
.section-divider::before,
.section-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2) 30%, var(--gold-4) 50%, var(--gold-2) 70%, transparent);
}

/* Le .diamond v1 (carré rotaté 45°) reste fonctionnel
   mais on le replace par un effet rosette via background SVG */
.section-divider .diamond{
  width: 22px;
  height: 22px;
  background: none;
  transform: none;
  box-shadow: 0 0 6px var(--gold-glow);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'><defs><radialGradient id='g' cx='50%25' cy='35%25' r='65%25'><stop offset='0%25' stop-color='%23fdeec3'/><stop offset='35%25' stop-color='%23f0c860'/><stop offset='70%25' stop-color='%239c7019'/><stop offset='100%25' stop-color='%233d2806'/></radialGradient><radialGradient id='b' cx='35%25' cy='30%25' r='70%25'><stop offset='0%25' stop-color='%239ecdff'/><stop offset='40%25' stop-color='%233a6fc4'/><stop offset='100%25' stop-color='%230a2160'/></radialGradient></defs><path d='M 11 1 L 13 6 L 18 4 L 16 9 L 21 11 L 16 13 L 18 18 L 13 16 L 11 21 L 9 16 L 4 18 L 6 13 L 1 11 L 6 9 L 4 4 L 9 6 Z' fill='url(%23g)' stroke='%233d2806' stroke-width='.4'/><circle cx='11' cy='11' r='2.6' fill='url(%23b)'/><circle cx='10.3' cy='10.3' r='.9' fill='%23fff' opacity='.8'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  filter: drop-shadow(0 0 4px rgba(232,192,96,.4));
  animation: rosetteShine 4s ease-in-out infinite;
}
@keyframes rosetteShine{
  0%, 100% { filter: drop-shadow(0 0 4px rgba(232,192,96,.4)); }
  50%      { filter: drop-shadow(0 0 10px rgba(232,192,96,.7)); }
}

/* =========================================================
   2.7 — HELLO (compat .top-bar .hello)
   Le greeting en haut "Marhaba, Ahmed" / "Mes Listes"
   ========================================================= */
.top-bar .hello{
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: .3px;
}
.top-bar .hello b{
  color: var(--gold-light);
  font-style: normal;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(232,192,96,.3);
}

/* =========================================================
   2.8 — TOP BAR (compat .top-bar — sticky + dégradé bas)
   ========================================================= */
.top-bar{
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 8px 10px;
  background: linear-gradient(180deg,
    rgba(5,9,23,.95) 0%,
    rgba(5,9,23,.6)  80%,
    transparent      100%);
  margin: 0 -16px 8px;
  padding-left: 20px;
  padding-right: 20px;
  backdrop-filter: blur(6px);
}

/* =========================================================
   2.9 — XP POP (compat .xp-pop)
   Le "+10 XP" doré qui flotte à l'écran
   ========================================================= */
.xp-pop{
  position: fixed;
  left: 50%;
  top: 30%;
  transform: translate(-50%, 0);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  color: var(--gold-light);
  text-shadow: 0 0 20px var(--gold-glow);
  pointer-events: none;
  z-index: 100;
  animation: xpFloat 1.2s ease-out forwards;
}
@keyframes xpFloat{
  0%   { opacity: 0; transform: translate(-50%, 20px) scale(.8); }
  20%  { opacity: 1; transform: translate(-50%, -10px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(1); }
}

/* =========================================================
   2.10 — TYPOGRAPHIC HELPERS (titres arabes & translit)
   Utilisé dans daily-lesson, vocab, wotd, milestone, etc.
   ========================================================= */

/* Mot arabe principal (gros) */
.word-ar{
  font-family: var(--font-arabic);
  font-weight: 700;
  direction: rtl;
  background: linear-gradient(180deg,
    var(--gold-5),
    var(--gold) 60%,
    var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 20px rgba(212,175,55,.2);
}

/* Translittération en petites capitales dorées */
.transliter{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 13px;
}

/* Traduction française italique */
.word-fr{
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink);
  font-size: 16px;
}

/* =========================================================
   2.11 — HINTS (compat .lesson-hint, .chat-hint, .list-hint,
   .theme-intro, .milestone-hint, .premium-footnote, .dico-intro,
   .methode-text, .notions-intro, .unlock-intro, .cat-hint)
   Texte explicatif en italique discret
   ========================================================= */
.lesson-hint,
.chat-hint,
.list-hint,
.theme-intro,
.milestone-hint,
.premium-footnote,
.dico-intro,
.notions-intro,
.unlock-intro,
.cat-hint,
.boost-hint,
.boost-foot,
.methode-text{
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
}
.theme-intro{ margin-bottom: 14px; }
.lesson-hint{ font-size: 15px; }

/* =========================================================
   2.12 — META LABELS (compat .quiz-meta, .deck-progress,
   .badges-stats, .stats-grid label, .xp-label, .about-row)
   Petites mentions en majuscules espacées
   ========================================================= */
.quiz-meta,
.deck-progress,
.about-row,
.xp-label{
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.quiz-meta{
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 0 4px;
}
.quiz-meta b{
  color: var(--gold-light);
  text-shadow: 0 0 6px rgba(232,192,96,.3);
}
.deck-progress{
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  letter-spacing: 2px;
}

/* =========================================================
   2.13 — QUIZ QUESTIONS (compat .quiz-question, .quiz-question-fr)
   ========================================================= */
.quiz-question{
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 26px;
  color: var(--gold-light);
  text-align: center;
  direction: rtl;
  margin: 10px 0 8px;
  text-shadow: 0 0 14px rgba(212,175,55,.2);
}
.quiz-question-fr{
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
  margin-bottom: 16px;
}

/* =========================================================
   2.14 — TIMER VALUES (compat .t-value, .combo-badge)
   ========================================================= */
.t-value{
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 14px var(--gold-glow);
}
.combo-badge{
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-5), var(--gold));
  color: #2a1d00;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  margin: 6px 0;
  box-shadow: var(--shadow-gold);
}
