/* =========================================================
   DAR AL LOUGHAH — 07-baroque.css
   ---------------------------------------------------------
   CSS pour les cards baroque générées par baroque-renderer.js
   Classes préfixées .baroque-* pour éviter tout conflit
   ========================================================= */

/* ===== GRID ===== */
.baroque-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
  padding: 0 4px;
  margin: 12px 0;
}

/* ===== CARD ===== */
.baroque-card {
  position: relative;
  aspect-ratio: 1.7 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform .15s ease, filter .15s ease;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.55));
  min-width: 0;
  font: inherit;
  color: inherit;
  animation: baroqueCardIn .55s cubic-bezier(.2,.7,.3,1.2) backwards;
}
.baroque-card:nth-child(1) { animation-delay: .02s; }
.baroque-card:nth-child(2) { animation-delay: .07s; }
.baroque-card:nth-child(3) { animation-delay: .12s; }
.baroque-card:nth-child(4) { animation-delay: .17s; }
.baroque-card:nth-child(5) { animation-delay: .22s; }
.baroque-card:nth-child(6) { animation-delay: .27s; }
.baroque-card:nth-child(7) { animation-delay: .32s; }
.baroque-card:nth-child(8) { animation-delay: .37s; }
.baroque-card:nth-child(n+9) { animation-delay: .42s; }

@keyframes baroqueCardIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.baroque-card:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.6)) drop-shadow(0 0 16px rgba(232,192,96,.45));
}
.baroque-card:hover .baroque-card__shimmer::before {
  animation-duration: 1.8s;
}
.baroque-card:active { transform: translateY(0) scale(.97); }
.baroque-card--full { grid-column: 1 / -1; }

/* ===== FRAME SVG ===== */
.baroque-card__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* ===== SHIMMER ===== */
.baroque-card__shimmer {
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.baroque-card__shimmer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(110deg, transparent 30%, rgba(255,235,170,.22) 50%, transparent 70%);
  transform: rotate(15deg);
  animation: baroqueShimmer 6s ease-in-out infinite;
  animation-delay: var(--shimmer-delay, 0s);
}
@keyframes baroqueShimmer {
  0%, 100% { transform: translateX(-50%) rotate(15deg); opacity: 0; }
  40%      { opacity: 1; }
  60%      { opacity: 1; }
  100%     { transform: translateX(450%) rotate(15deg); opacity: 0; }
}

/* ===== INNER (icon + text) ===== */
.baroque-card__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  min-width: 0;
  animation: baroqueFloat 5s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
@keyframes baroqueFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.5px); }
}

.baroque-card__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
}

.baroque-card__text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.1;
  overflow: hidden;
}

.baroque-card__title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .03em;
  color: #fdeec3;
  text-shadow: 0 1px 2px rgba(0,0,0,.7), 0 0 8px rgba(232,192,96,.25);
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.baroque-card__sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: .72rem;
  color: #c9b682;
  margin-top: 2px;
}

.baroque-card--full .baroque-card__inner { gap: 14px; padding: 10px 22px; }
.baroque-card--full .baroque-card__icon { width: 48px; height: 48px; }
.baroque-card--full .baroque-card__title { font-size: .95rem; }

/* ===== SECTION HEAD ===== */
.baroque-section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 14px 12px;
}
.baroque-section-head__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #9c7019 30%, #e8c060 50%, #9c7019 70%, transparent);
}
.baroque-section-head__text {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  letter-spacing: .18em;
  color: #f7dc88;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(232,192,96,.3);
  text-transform: uppercase;
}
.baroque-section-head__rosette {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 4px rgba(232,192,96,.4));
}
/* ============================================================
   CADRE BAROQUE GÉNÉRIQUE (pour panels, leçon du jour, profil)
   ============================================================ */
.baroque-card-frame {
  position: relative;
  margin: 16px 0;
  padding: 0;
  min-height: 120px;
}
.baroque-card-frame .bcf-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, .15));
}
.baroque-card-frame .bcf-inner {
  position: relative;
  z-index: 2;
  padding: 28px 24px 22px;
  color: #f0e2b8;
}
.baroque-card-frame .bcf-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f7dc88;
  text-align: center;
  margin-bottom: 14px;
  text-shadow: 0 0 8px rgba(247, 220, 136, .3);
}

/* ============================================================
   HÉRO DU MENU (titre avec cadre + ornements)
   ============================================================ */
.menu-hero {
  position: relative;
  margin: 12px 0 18px;
  min-height: 110px;
}
.menu-hero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, .25));
}
.menu-hero-inner {
  position: relative;
  z-index: 2;
  padding: 22px 24px 18px;
  text-align: center;
}
.menu-hero-title {
  font-size: 1.9rem !important;
  margin: 0 !important;
  text-align: center;
}
.menu-hero-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 4px;
}
.menu-hero-divider svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .5));
}
.menu-hero-sub {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #c9b682;
  margin: 0;
  text-shadow: 0 0 6px rgba(201, 182, 130, .3);
}
/* ============================================================
   PROFIL — Rang, infos, bio, médailles
   ============================================================ */
.profile-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, .12), rgba(212, 175, 55, .04));
  border: 1px solid rgba(212, 175, 55, .4);
  border-radius: 999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.profile-rank .rank-icon {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .5));
}
.profile-rank .rank-label {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c9b682;
}
.profile-rank .rank-value {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #f7dc88;
  text-shadow: 0 0 6px rgba(247, 220, 136, .4);
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(212, 175, 55, .12);
}
.info-row:last-child { border-bottom: none; }
.info-row .info-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.info-row .info-label {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #c9b682;
  min-width: 70px;
}
.info-row .info-value {
  margin-left: auto;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #f0e2b8;
  font-weight: 500;
}

.profile-bio {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #e8d9a8;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(212, 175, 55, .2);
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 80px;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bio-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #8a7a4a;
  margin-top: 6px;
  font-style: italic;
}

.medals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(0, 0, 0, .2);
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, .15);
}
.medals-grid::-webkit-scrollbar { width: 6px; }
.medals-grid::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, .4); border-radius: 4px; }

.medal-item {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212, 175, 55, .15), rgba(212, 175, 55, .03));
  border: 1px solid rgba(212, 175, 55, .35);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.medal-item:hover, .medal-item:active {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(212, 175, 55, .4);
}
.medal-item svg, .medal-item img {
  width: 70%;
  height: 70%;
}
.medal-item .medal-name {
  font-size: 0.55rem;
  color: #c9b682;
  text-align: center;
  margin-top: 2px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.medal-item.locked {
  opacity: .25;
  filter: grayscale(.8);
}
/* ============================================================
   LOGIN — Page d'accueil baroque premium
   ============================================================ */

/* — Hero principal (lune + lanternes + titre) — */
.login-hero {
  position: relative;
  margin: 20px 0 24px;
  min-height: 360px;
}
.login-hero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, .35));
  animation: heroFrameGlow 6s ease-in-out infinite;
}
@keyframes heroFrameGlow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(212, 175, 55, .35)); }
  50% { filter: drop-shadow(0 0 28px rgba(247, 220, 136, .55)); }
}
.login-hero-inner {
  position: relative;
  z-index: 2;
  padding: 32px 28px 26px;
  text-align: center;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* — Lanternes alignées en haut — */
.login-lanterns {
  position: absolute;
  top: 8px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
}
.login-lanterns .lantern {
  width: 18px;
  height: 26px;
  position: relative;
  background: radial-gradient(ellipse at 50% 40%, #ffd966 0%, #d4a52a 60%, #6b4a0e 100%);
  border-radius: 50% 50% 45% 45%;
  box-shadow: 0 0 16px rgba(255, 217, 102, .7), inset 0 -3px 6px rgba(0,0,0,.3);
  animation: lanternSway 4s ease-in-out infinite;
}
.login-lanterns .lantern::before {
  content: '';
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 22px;
  background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, .6));
}
.login-lanterns .l2 { animation-delay: -1s; }
.login-lanterns .l3 { animation-delay: -2s; }
.login-lanterns .l4 { animation-delay: -3s; }
@keyframes lanternSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* — Lune avec halo doré — */
.login-crescent {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 18px auto 10px;
}
.login-crescent .moon-halo {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(247, 220, 136, .35) 0%, rgba(247, 220, 136, .15) 35%, transparent 70%);
  border-radius: 50%;
  animation: moonPulse 4s ease-in-out infinite;
  z-index: 0;
}
@keyframes moonPulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
.login-crescent svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(247, 220, 136, .6));
}

/* — Étoiles scintillantes décoratives — */
.login-stars {
  position: absolute;
  inset: 30px 50px;
  pointer-events: none;
  z-index: 1;
}
.login-stars .twink {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fdeec3;
  border-radius: 50%;
  box-shadow: 0 0 8px #fdeec3, 0 0 16px rgba(247, 220, 136, .5);
  animation: twinkle 3s ease-in-out infinite;
}
.login-stars .t1 { top: 15%; left: 18%; animation-delay: 0s; }
.login-stars .t2 { top: 25%; right: 14%; animation-delay: -.6s; }
.login-stars .t3 { top: 55%; left: 8%; animation-delay: -1.2s; }
.login-stars .t4 { top: 60%; right: 10%; animation-delay: -1.8s; }
.login-stars .t5 { top: 80%; left: 22%; animation-delay: -.3s; }
.login-stars .t6 { top: 85%; right: 24%; animation-delay: -2.4s; }
@keyframes twinkle {
  0%, 100% { opacity: .3; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* — Titre arabe géant — */
.login-brand-title {
  font-family: 'Amiri', serif;
  font-size: 3.2rem;
  font-weight: 700;
  margin: 4px 0;
  background: linear-gradient(180deg, #fdeec3 0%, #f7dc88 25%, #f0c860 50%, #c89a3a 75%, #9c7019 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(247, 220, 136, .45));
  letter-spacing: 4px;
  position: relative;
  z-index: 3;
}

/* — Diviseur rosette — */
.login-rosette-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 8px;
}
.login-rosette-divider .div-line {
  height: 1px;
  width: 70px;
  background: linear-gradient(to right, transparent, #c89a3a, transparent);
}
.login-rosette-divider svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 6px rgba(247, 220, 136, .5));
}

.login-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: #e0d09a;
  margin: 4px 0 0;
  letter-spacing: .5px;
}
.login-tagline .accent {
  color: #f7dc88;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(247, 220, 136, .4);
}

/* — Cadre formulaire — */
.login-form-frame {
  position: relative;
  margin: 16px 0;
  min-height: 360px;
}
.login-form-frame .lff-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, .2));
}
.login-form-frame .lff-inner {
  position: relative;
  z-index: 2;
  padding: 30px 24px 26px;
}

/* — Titre formulaire (Bienvenue avec lignes) — */
.lff-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}
.lff-title-line {
  height: 1px;
  width: 50px;
  background: linear-gradient(to right, transparent, #c89a3a, transparent);
}
.lff-title-text {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #f7dc88;
  text-shadow: 0 0 8px rgba(247, 220, 136, .4);
}

/* — Inputs avec icône dorée — */
.input-group {
  position: relative;
  margin-bottom: 14px;
}
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 2;
}
.input-gold {
  width: 100%;
  padding: 14px 16px 14px 44px !important;
  background: linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.25)) !important;
  border: 1px solid rgba(212, 175, 55, .4) !important;
  border-radius: 10px !important;
  color: #f0e2b8 !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.05rem !important;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.input-gold:focus {
  border-color: rgba(247, 220, 136, .8) !important;
  box-shadow: 0 0 12px rgba(247, 220, 136, .25), inset 0 0 4px rgba(0,0,0,.3) !important;
  outline: none !important;
}
.input-gold::placeholder {
  color: rgba(201, 182, 130, .6);
  font-style: italic;
}

/* — Checkbox doré — */
.checkbox-gold {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 4px 18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: .92rem;
  color: #c9b682;
  cursor: pointer;
}
.checkbox-gold input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid rgba(212, 175, 55, .5);
  border-radius: 4px;
  background: rgba(0,0,0,.3);
  cursor: pointer;
  position: relative;
}
.checkbox-gold input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #f7dc88, #c89a3a);
  border-color: #f7dc88;
}
.checkbox-gold input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 3px;
  color: #3d2806;
  font-size: 14px;
  font-weight: bold;
}

/* — Bouton principal "Se connecter" baroque or massif — */
.btn-baroque-primary {
  position: relative;
  width: 100%;
  min-height: 56px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 8px;
  transition: transform .15s ease, filter .25s ease;
}
.btn-baroque-primary:active {
  transform: translateY(1px) scale(.98);
}
.btn-baroque-primary:hover {
  filter: drop-shadow(0 0 14px rgba(247, 220, 136, .6));
}
.btn-baroque-primary .bbp-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)) drop-shadow(0 0 8px rgba(212, 175, 55, .4));
}
.btn-baroque-primary .bbp-label {
  position: relative;
  z-index: 2;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #3d2806;
  text-shadow: 0 1px 0 rgba(253, 238, 195, .6);
}

/* — Diviseur OU — */
.login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, .4), transparent);
}
.login-divider span {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  letter-spacing: 4px;
  color: #c9b682;
  font-weight: 600;
}

/* — Boutons secondaires (invité / créer compte) — */
.btn-baroque-secondary,
.btn-baroque-create {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  background: linear-gradient(to bottom, rgba(212, 175, 55, .08), rgba(212, 175, 55, .02));
  border: 1px solid rgba(212, 175, 55, .4);
  border-radius: 10px;
  color: #f0e2b8;
  font-family: 'Cinzel', serif;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 10px;
  transition: all .25s ease;
}
.btn-baroque-secondary svg,
.btn-baroque-create svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.btn-baroque-secondary:hover,
.btn-baroque-create:hover {
  background: linear-gradient(to bottom, rgba(212, 175, 55, .18), rgba(212, 175, 55, .06));
  border-color: rgba(247, 220, 136, .7);
  box-shadow: 0 0 14px rgba(247, 220, 136, .25);
}
.btn-baroque-create {
  background: linear-gradient(135deg, rgba(247, 220, 136, .12), rgba(212, 175, 55, .04));
  border-color: rgba(247, 220, 136, .55);
  color: #f7dc88;
}

/* — Footer baroque — */
.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 80px;
  padding: 12px;
  opacity: .6;
}
.login-footer svg {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .4));
}
.login-footer-text {
  font-family: 'Amiri', serif;
  font-size: 1.05rem;
  color: #c9b682;
  letter-spacing: 2px;
}
/* ============================================================
   FIX URGENT — Tailles SVG pour LOGIN + THEMES
   ============================================================ */

/* Tailles forcées sur tous les SVG décoratifs */
.login-hero-frame,
.themes-hero-frame,
.lff-frame,
.bbp-frame,
.bcf-frame,
.menu-hero-frame {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Lune login */
.login-crescent {
  width: 110px !important;
  height: 110px !important;
  flex: 0 0 110px;
}
.login-crescent svg {
  width: 110px !important;
  height: 110px !important;
}

/* Icône livre Thèmes */
.themes-hero-icon {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px;
}

/* Toutes les rosettes des dividers */
.login-rosette-divider svg,
.themes-rosette-divider svg,
.menu-hero-divider svg,
.baroque-section-head .bsh-rosette,
.themes-footer svg,
.login-footer svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

/* Icônes inputs (cadenas, email) */
.input-group .input-icon {
  width: 20px !important;
  height: 20px !important;
}

/* Icônes boutons secondaires */
.btn-baroque-secondary svg,
.btn-baroque-create svg,
.themes-back-btn svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

/* Lanternes login */
.login-lanterns .lantern {
  width: 16px !important;
  height: 22px !important;
}

/* Étoiles scintillantes */
.login-stars .twink {
  width: 3px !important;
  height: 3px !important;
}

/* Le bouton "Se connecter" ne doit pas dépasser */
.btn-baroque-primary {
  width: 100% !important;
  min-height: 54px !important;
  max-height: 60px;
  display: block;
  position: relative;
}
.btn-baroque-primary .bbp-frame {
  width: 100% !important;
  height: 100% !important;
}
.btn-baroque-primary .bbp-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Le hero login doit être contenu */
.login-hero {
  max-width: 100%;
  overflow: visible;
}
.login-hero-inner {
  position: relative;
  z-index: 2;
}
/* Les inputs ne doivent pas être collés au bord */
.login-form-frame .lff-inner {
  padding: 30px 24px 26px;
}

/* ============================================================
   THEMES — Page baroque premium
   ============================================================ */


/* — Hero principal (titre + livre + sous-titre) — */
.themes-hero {
  position: relative;
  margin: 18px 0 22px;
  min-height: 150px;
}
.themes-hero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, .3));
  animation: themesHeroPulse 5s ease-in-out infinite;
}
@keyframes themesHeroPulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(212, 175, 55, .3)); }
  50% { filter: drop-shadow(0 0 22px rgba(247, 220, 136, .5)); }
}
.themes-hero-inner {
  position: relative;
  z-index: 2;
  padding: 26px 24px 22px;
  text-align: center;
}

/* — Bouton retour positionné — */
.themes-back-btn {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(212, 175, 55, .15), rgba(212, 175, 55, .04));
  border: 1px solid rgba(212, 175, 55, .45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all .25s ease;
}
.themes-back-btn:hover {
  background: linear-gradient(135deg, rgba(247, 220, 136, .25), rgba(212, 175, 55, .08));
  box-shadow: 0 0 12px rgba(247, 220, 136, .35);
}
.themes-back-btn svg {
  width: 18px;
  height: 18px;
}

/* — Icône livre flottant — */
.themes-hero-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(247, 220, 136, .5));
  animation: bookFloat 4s ease-in-out infinite;
}
@keyframes bookFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* — Titre principal — */
.themes-hero-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fdeec3 0%, #f7dc88 30%, #f0c860 60%, #c89a3a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(247, 220, 136, .4));
  margin: 0;
  padding: 0;
}

/* — Diviseur rosette — */
.themes-rosette-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 6px;
}
.themes-rosette-divider .div-line {
  height: 1px;
  width: 60px;
  background: linear-gradient(to right, transparent, #c89a3a, transparent);
}
.themes-rosette-divider svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 5px rgba(247, 220, 136, .5));
}

.themes-hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  color: #d4c285;
  margin: 0;
  letter-spacing: .5px;
}

/* — Diviseur de section centré — */
.baroque-section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 18px;
  padding: 0 8px;
}
.baroque-section-head .bsh-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, .5), transparent);
  max-width: 80px;
}
.baroque-section-head .bsh-rosette {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .5));
}
.baroque-section-head .bsh-text {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #c9b682;
  text-shadow: 0 0 6px rgba(201, 182, 130, .3);
  white-space: nowrap;
}

/* — Grille de thèmes baroque — */
.baroque-themes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 4px 2px;
  margin-bottom: 20px;
}
@media (min-width: 480px) {
  .baroque-themes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* — Style appliqué à CHAQUE thème généré par themes.js — */
/* On stylise les enfants directs de la grille sans casser le JS */
.baroque-themes-grid > * {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(22, 36, 85, .9) 0%, rgba(12, 23, 56, .95) 50%, rgba(7, 14, 36, 1) 100%);
  border: 1.5px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  min-height: 80px;
  transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease;
  background-clip: padding-box;
  text-align: left;
  color: #f0e2b8;
}
/* Bordure dorée avec gradient (truc en double) */
.baroque-themes-grid > *::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 14px;
  padding: 1.5px;
  background: linear-gradient(135deg, #fdeec3 0%, #c89a3a 30%, #6b4a0e 50%, #c89a3a 70%, #fdeec3 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}
/* Petits coins ornementaux */
.baroque-themes-grid > *::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, .15);
  pointer-events: none;
  z-index: 0;
}
.baroque-themes-grid > *:hover,
.baroque-themes-grid > *:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,.45), 0 0 18px rgba(247, 220, 136, .25);
}
/* Tout le contenu interne au dessus du décor */
.baroque-themes-grid > * > * {
  position: relative;
  z-index: 1;
}

/* — Footer décoratif — */
.themes-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 24px 0 100px;
  opacity: .55;
}
.themes-footer svg {
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .4));
}
.themes-footer-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: .9rem;
  font-style: italic;
  color: #c9b682;
  letter-spacing: 1px;
}
/* ============================================================
   FIX THEMES — Hero contenu + cards thèmes baroque
   ============================================================ */

/* Le hero des thèmes doit rester compact */
.themes-hero {
  max-height: 160px !important;
  min-height: 140px !important;
  overflow: hidden;
}
.themes-hero-frame {
  max-height: 160px !important;
}
.themes-hero-inner {
  max-height: 160px !important;
  padding: 18px 60px 14px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.themes-hero-icon {
  width: 32px !important;
  height: 32px !important;
  margin: 0 auto 4px !important;
}
.themes-hero-title {
  font-size: 1.3rem !important;
  margin: 2px 0 !important;
}
.themes-hero-sub {
  font-size: .88rem !important;
  margin: 2px 0 0 !important;
}

/* — Grille des thèmes en baroque — */
.baroque-themes-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
  padding: 0 6px !important;
  margin: 8px 0 24px !important;
}

/* Chaque card thème — encadrement baroque doré */
.baroque-themes-grid > * {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: 180px !important;
  padding: 18px 14px !important;
  background: linear-gradient(135deg, rgba(22, 36, 85, .92) 0%, rgba(12, 23, 56, .96) 50%, rgba(7, 14, 36, 1) 100%) !important;
  border: 1.5px solid transparent !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  color: #f0e2b8 !important;
  transition: transform .25s ease, box-shadow .3s ease !important;
  isolation: isolate;
}

/* Bordure dorée gradient (effet "encadré") */
.baroque-themes-grid > *::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 14px !important;
  padding: 1.5px !important;
  background: linear-gradient(135deg, #fdeec3 0%, #c89a3a 25%, #6b4a0e 50%, #c89a3a 75%, #fdeec3 100%) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
          mask-composite: exclude !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* Bord intérieur fin */
.baroque-themes-grid > *::after {
  content: '' !important;
  position: absolute !important;
  inset: 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(212, 175, 55, .25) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Tout le contenu interne au-dessus */
.baroque-themes-grid > * > * {
  position: relative !important;
  z-index: 2 !important;
}

.baroque-themes-grid > *:hover,
.baroque-themes-grid > *:active {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 22px rgba(247, 220, 136, .35) !important;
}

/* Footer plus discret */
.themes-footer {
  margin: 16px 0 90px !important;
}
.themes-footer-text {
  font-size: .82rem !important;
}
/* ============================================================
   FIX FINAL THEMES — Hero léger + vrai cadre baroque sur cards
   ============================================================ */

/* 1) HERO : on cache complètement le SVG géant et on garde juste le titre */
.themes-hero {
  min-height: auto !important;
  max-height: none !important;
  margin: 14px 0 10px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: none !important;
}
.themes-hero-frame,
.themes-hero-icon,
.themes-back-btn {
  display: none !important;
}
.themes-hero-inner {
  padding: 8px 12px !important;
  text-align: center !important;
  background: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  max-height: none !important;
  min-height: 0 !important;
}
.themes-hero-title {
  font-family: 'Cinzel', serif !important;
  font-weight: 700 !important;
  font-size: 1.5rem !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  background: linear-gradient(180deg, #fdeec3 0%, #f7dc88 40%, #c89a3a 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 2px 4px rgba(247, 220, 136, .35)) !important;
  margin: 0 !important;
}
.themes-rosette-divider {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 4px 0 !important;
}
.themes-rosette-divider .div-line {
  width: 50px !important;
  height: 1px !important;
  background: linear-gradient(to right, transparent, #c89a3a, transparent) !important;
}
.themes-hero-sub {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: .92rem !important;
  font-style: italic !important;
  color: #c9b682 !important;
  margin: 0 !important;
}

/* 2) GRILLE : on garde 2 colonnes */
.baroque-themes-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
  padding: 12px 8px !important;
  margin: 0 0 24px !important;
  background: none !important;
}

/* 3) CHAQUE CARD THÈME — vrai cadre baroque doré */
.baroque-themes-grid > * {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: 180px !important;
  padding: 18px 14px !important;
  background: linear-gradient(135deg, #162455 0%, #0c1738 55%, #070e24 100%) !important;
  border: 2px solid #c89a3a !important;
  border-radius: 14px !important;
  box-shadow:
    0 0 0 1px #6b4a0e inset,
    0 0 0 4px rgba(212, 175, 55, .15) inset,
    0 6px 16px rgba(0,0,0,.5),
    0 0 14px rgba(212, 175, 55, .25) !important;
  cursor: pointer !important;
  color: #f0e2b8 !important;
  transition: transform .25s ease, box-shadow .3s ease !important;
  overflow: hidden !important;
}

/* Coin doré décoratif en haut à gauche */
.baroque-themes-grid > *::before {
  content: '' !important;
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  width: 18px !important;
  height: 18px !important;
  border-top: 2px solid #f7dc88 !important;
  border-left: 2px solid #f7dc88 !important;
  border-top-left-radius: 6px !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Coin doré décoratif en bas à droite */
.baroque-themes-grid > *::after {
  content: '' !important;
  position: absolute !important;
  bottom: 6px !important;
  right: 6px !important;
  width: 18px !important;
  height: 18px !important;
  border-bottom: 2px solid #f7dc88 !important;
  border-right: 2px solid #f7dc88 !important;
  border-bottom-right-radius: 6px !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Hover/active */
.baroque-themes-grid > *:hover,
.baroque-themes-grid > *:active {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow:
    0 0 0 1px #6b4a0e inset,
    0 0 0 4px rgba(212, 175, 55, .25) inset,
    0 10px 22px rgba(0,0,0,.6),
    0 0 22px rgba(247, 220, 136, .5) !important;
  border-color: #f7dc88 !important;
}

/* Tout le contenu interne au-dessus du décor */
.baroque-themes-grid > * > * {
  position: relative !important;
  z-index: 1 !important;
}

/* Footer plus léger */
.themes-footer {
  margin: 12px 0 100px !important;
  opacity: .5 !important;
}
.themes-footer-text {
  font-size: .8rem !important;
}
/* ============================================================
   THEMES — Reset complet + hero minimal + cards encadrées
   ============================================================ */

/* 1) CACHE complètement tout le hero baroque (titre, parchemin, etc.) */
.themes-hero,
.themes-hero-frame,
.themes-hero-inner,
.themes-hero-icon,
.themes-back-btn,
.themes-rosette-divider,
.themes-hero-title,
.themes-hero-sub {
  display: none !important;
}

/* 2) On garde uniquement le bandeau de section "PARCOURIR LES THÈMES" simple */
#screen-themes .baroque-section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  margin: 18px 0 16px !important;
  padding: 0 12px !important;
}
#screen-themes .baroque-section-head .bsh-line {
  flex: 1 !important;
  height: 1px !important;
  background: linear-gradient(to right, transparent, #c89a3a, transparent) !important;
  max-width: 70px !important;
}
#screen-themes .baroque-section-head .bsh-rosette {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}
#screen-themes .baroque-section-head .bsh-text {
  font-family: 'Cinzel', serif !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: #c9b682 !important;
  white-space: nowrap !important;
}

/* 3) GRILLE plus serrée pour que ça tienne bien à l'écran */
.themes-grid,
.baroque-themes-grid,
#themesGrid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  padding: 8px 10px !important;
  margin: 0 0 24px !important;
  background: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 4) ENCADRER CHAQUE CARD THÈME — cible large pour gagner contre themes.js */
.themes-grid > *,
.baroque-themes-grid > *,
#themesGrid > * {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: 160px !important;
  max-height: 200px !important;
  padding: 14px 10px !important;
  background: linear-gradient(135deg, #162455 0%, #0c1738 55%, #070e24 100%) !important;
  border: 2px solid #c89a3a !important;
  border-radius: 12px !important;
  box-shadow:
    inset 0 0 0 1px #6b4a0e,
    inset 0 0 0 3px rgba(212, 175, 55, .12),
    0 4px 12px rgba(0,0,0,.5),
    0 0 10px rgba(212, 175, 55, .2) !important;
  cursor: pointer !important;
  color: #f0e2b8 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease !important;
  list-style: none !important;
}

/* Coin doré haut-gauche */
.themes-grid > *::before,
.baroque-themes-grid > *::before,
#themesGrid > *::before {
  content: '' !important;
  position: absolute !important;
  top: 5px !important;
  left: 5px !important;
  width: 14px !important;
  height: 14px !important;
  border-top: 2px solid #f7dc88 !important;
  border-left: 2px solid #f7dc88 !important;
  border-top-left-radius: 4px !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

/* Coin doré bas-droite */
.themes-grid > *::after,
.baroque-themes-grid > *::after,
#themesGrid > *::after {
  content: '' !important;
  position: absolute !important;
  bottom: 5px !important;
  right: 5px !important;
  width: 14px !important;
  height: 14px !important;
  border-bottom: 2px solid #f7dc88 !important;
  border-right: 2px solid #f7dc88 !important;
  border-bottom-right-radius: 4px !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

.themes-grid > *:hover,
.themes-grid > *:active,
.baroque-themes-grid > *:hover,
.baroque-themes-grid > *:active,
#themesGrid > *:hover,
#themesGrid > *:active {
  transform: translateY(-2px) scale(1.02) !important;
  border-color: #f7dc88 !important;
  box-shadow:
    inset 0 0 0 1px #6b4a0e,
    inset 0 0 0 3px rgba(247, 220, 136, .25),
    0 8px 18px rgba(0,0,0,.6),
    0 0 18px rgba(247, 220, 136, .45) !important;
}

/* Le contenu interne se place au-dessus des coins */
.themes-grid > * > *,
.baroque-themes-grid > * > *,
#themesGrid > * > * {
  position: relative !important;
  z-index: 2 !important;
}

/* Réduire taille du texte arabe + label si ça déborde */
.themes-grid > * .word-ar,
#themesGrid > * .word-ar {
  font-size: 1.4rem !important;
  margin: 4px 0 !important;
  line-height: 1.2 !important;
}
.themes-grid > * .name,
.themes-grid > * .title,
#themesGrid > * .name,
#themesGrid > * .title {
  font-size: .82rem !important;
  letter-spacing: 1.5px !important;
  margin: 4px 0 !important;
  line-height: 1.2 !important;
}
.themes-grid > * .fr,
.themes-grid > * .sub,
#themesGrid > * .fr,
#themesGrid > * .sub {
  font-size: .72rem !important;
  margin: 2px 0 0 !important;
  opacity: .75 !important;
}

/* Cacher le footer "Que la science vous éclaire" qui apparaissait derrière */
.themes-footer {
  display: none !important;
}
/* ============================================================
   QUIZ + RAPID — Design baroque
   ============================================================ */

/* — Bandeau de progression Quiz — */
.quiz-progress-baroque {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin: 14px 12px 8px;
  background: linear-gradient(135deg, rgba(22, 36, 85, .9), rgba(12, 23, 56, .95));
  border: 1.5px solid #c89a3a;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px #6b4a0e,
    0 4px 12px rgba(0,0,0,.4);
}
.quiz-progress-baroque .qpb-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .5));
}
.quiz-progress-baroque .qpb-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quiz-progress-baroque .qpb-label {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c9b682;
}
.quiz-progress-baroque .qpb-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: #f0e2b8;
}
.quiz-progress-baroque .qpb-num b {
  color: #f7dc88;
  font-weight: 700;
  font-size: 1.2rem;
}
.quiz-progress-baroque .qpb-xp {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: 1.5px;
  color: #f7dc88;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(247, 220, 136, .15), rgba(212, 175, 55, .05));
  border: 1px solid rgba(247, 220, 136, .4);
  border-radius: 999px;
  text-shadow: 0 0 6px rgba(247, 220, 136, .4);
}

/* — Barre de progression linéaire dorée — */
.quiz-progress-bar {
  height: 8px;
  margin: 0 12px 14px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-bar .qpb-fill {
  height: 100%;
  background: linear-gradient(90deg, #c89a3a 0%, #f7dc88 50%, #c89a3a 100%);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(247, 220, 136, .5);
  transition: width .4s ease;
}

/* — Diviseur quiz (rosette + lignes) — */
.quiz-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 16px;
}
.quiz-divider .qd-line {
  height: 1px;
  flex: 1;
  max-width: 60px;
  background: linear-gradient(to right, transparent, #c89a3a, transparent);
}
.quiz-divider .qd-rosette {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .4));
}

/* — Question style — */
.quiz-question {
  font-family: 'Amiri', serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  color: #f7dc88;
  margin: 14px 0 6px;
  text-shadow: 0 0 12px rgba(247, 220, 136, .35);
  letter-spacing: 1px;
}
.quiz-question-fr {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: #c9b682;
  text-align: center;
  margin: 0 0 14px;
}

/* — Réponses QCM — */
.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.quiz-answers > * {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 14px 16px !important;
  background: linear-gradient(135deg, rgba(22, 36, 85, .8), rgba(12, 23, 56, .9)) !important;
  border: 1.5px solid rgba(212, 175, 55, .5) !important;
  border-radius: 10px !important;
  color: #f0e2b8 !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.05rem !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  position: relative !important;
}
.quiz-answers > *:hover,
.quiz-answers > *:active {
  border-color: #f7dc88 !important;
  background: linear-gradient(135deg, rgba(22, 36, 85, 1), rgba(12, 23, 56, 1)) !important;
  box-shadow: 0 0 14px rgba(247, 220, 136, .35) !important;
  transform: translateX(2px) !important;
}
.quiz-answers > *.selected,
.quiz-answers > *.is-selected,
.quiz-answers > *.active {
  border-color: #f7dc88 !important;
  background: linear-gradient(135deg, rgba(247, 220, 136, .15), rgba(212, 175, 55, .08)) !important;
  box-shadow: 0 0 16px rgba(247, 220, 136, .5), inset 0 0 0 1px #f7dc88 !important;
  color: #fdeec3 !important;
}
.quiz-answers > *.correct {
  border-color: #5EE0A5 !important;
  background: linear-gradient(135deg, rgba(94, 224, 165, .15), rgba(15, 90, 58, .15)) !important;
  box-shadow: 0 0 16px rgba(94, 224, 165, .5) !important;
  color: #c8f5dc !important;
}
.quiz-answers > *.wrong,
.quiz-answers > *.incorrect {
  border-color: #c43a3a !important;
  background: linear-gradient(135deg, rgba(196, 58, 58, .15), rgba(90, 10, 10, .15)) !important;
  box-shadow: 0 0 16px rgba(196, 58, 58, .5) !important;
  color: #f5c8c8 !important;
}

/* ============================================================
   RAPID — Combo + Timer
   ============================================================ */

/* — Badge combo doré — */
.rapid-combo-baroque {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  margin: 14px auto 8px;
  background: linear-gradient(135deg, rgba(247, 220, 136, .15), rgba(212, 175, 55, .05));
  border: 1.5px solid #f7dc88;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(247, 220, 136, .5);
  width: fit-content;
  animation: comboPulse 1.5s ease-in-out infinite;
}
@keyframes comboPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(247, 220, 136, .5); }
  50% { box-shadow: 0 0 30px rgba(247, 220, 136, .9), 0 0 50px rgba(247, 220, 136, .3); }
}
.rapid-combo-baroque .rcb-flame {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .8));
}
.rapid-combo-baroque .rcb-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.rapid-combo-baroque .rcb-label {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c9b682;
}
.rapid-combo-baroque .rcb-val {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #f7dc88;
  text-shadow: 0 0 8px rgba(247, 220, 136, .6);
}

/* — Timer baroque circulaire — */
.rapid-timer-baroque {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 18px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rapid-timer-baroque .rtb-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(247, 220, 136, .4));
}
.rapid-timer-baroque .rtb-progress {
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.rapid-timer-baroque .rtb-value {
  position: relative;
  z-index: 1;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 2.4rem;
  background: linear-gradient(180deg, #fdeec3, #f7dc88, #c89a3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(247, 220, 136, .4));
  line-height: 1;
}
.rapid-timer-baroque .rtb-unit {
  position: absolute;
  bottom: 14px;
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c9b682;
}

/* Texte center utilitaire si pas déjà défini */
.text-center { text-align: center; }
/* ============================================================
   FIX FINAL — Themes propre + Quiz étoile virée
   ============================================================ */

/* ════ 1. THEMES : on cache TOUT ce qui apparaît derrière ════ */
#screen-themes .themes-hero,
#screen-themes .themes-hero-frame,
#screen-themes .themes-hero-inner,
#screen-themes .themes-hero-icon,
#screen-themes .themes-hero-title,
#screen-themes .themes-hero-sub,
#screen-themes .themes-back-btn,
#screen-themes .themes-rosette-divider,
#screen-themes .themes-footer,
#screen-themes svg.themes-hero-frame,
#screen-themes .brand,
#screen-themes .brand-small,
#screen-themes [class*="hero"],
#screen-themes [class*="parchemin"],
#screen-themes [class*="scroll-bg"] {
  display: none !important;
}

/* On garde la top-bar (retour + titre Thèmes) */
#screen-themes > .brand-small,
#screen-themes > .top-bar {
  display: block !important;
}
#screen-themes > .top-bar {
  display: flex !important;
}

/* Petit bandeau "PARCOURIR LES THÈMES" sobre */
#screen-themes .baroque-section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 14px 12px 12px !important;
  padding: 0 !important;
  background: none !important;
}
#screen-themes .baroque-section-head .bsh-line {
  flex: 1 !important;
  height: 1px !important;
  background: linear-gradient(to right, transparent, #c89a3a, transparent) !important;
  max-width: 60px !important;
}
#screen-themes .baroque-section-head .bsh-rosette {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}
#screen-themes .baroque-section-head .bsh-text {
  font-family: 'Cinzel', serif !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: #c9b682 !important;
  white-space: nowrap !important;
}

/* Grille thèmes 2 colonnes propres */
#screen-themes .themes-grid,
#screen-themes .baroque-themes-grid,
#screen-themes #themesGrid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  padding: 8px 12px !important;
  margin: 0 0 24px !important;
  background: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Chaque card thème encadrée doré */
#screen-themes .themes-grid > *,
#screen-themes .baroque-themes-grid > *,
#screen-themes #themesGrid > * {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: 150px !important;
  max-height: 200px !important;
  padding: 14px 10px !important;
  background: linear-gradient(135deg, #162455 0%, #0c1738 55%, #070e24 100%) !important;
  border: 2px solid #c89a3a !important;
  border-radius: 12px !important;
  box-shadow:
    inset 0 0 0 1px #6b4a0e,
    inset 0 0 0 3px rgba(212, 175, 55, .12),
    0 4px 12px rgba(0,0,0,.5),
    0 0 10px rgba(212, 175, 55, .25) !important;
  cursor: pointer !important;
  color: #f0e2b8 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Coins ornementaux dorés */
#screen-themes .themes-grid > *::before,
#screen-themes .baroque-themes-grid > *::before,
#screen-themes #themesGrid > *::before {
  content: '' !important;
  position: absolute !important;
  top: 5px !important;
  left: 5px !important;
  width: 14px !important;
  height: 14px !important;
  border-top: 2px solid #f7dc88 !important;
  border-left: 2px solid #f7dc88 !important;
  border-top-left-radius: 4px !important;
  pointer-events: none !important;
  z-index: 3 !important;
}
#screen-themes .themes-grid > *::after,
#screen-themes .baroque-themes-grid > *::after,
#screen-themes #themesGrid > *::after {
  content: '' !important;
  position: absolute !important;
  bottom: 5px !important;
  right: 5px !important;
  width: 14px !important;
  height: 14px !important;
  border-bottom: 2px solid #f7dc88 !important;
  border-right: 2px solid #f7dc88 !important;
  border-bottom-right-radius: 4px !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

/* Taille texte ajustée pour que ça tienne */
#screen-themes .themes-grid > * .word-ar,
#screen-themes #themesGrid > * .word-ar {
  font-size: 1.3rem !important;
  line-height: 1.2 !important;
  margin: 2px 0 !important;
}
#screen-themes .themes-grid > * .name,
#screen-themes .themes-grid > * .title,
#screen-themes #themesGrid > * .name,
#screen-themes #themesGrid > * .title {
  font-size: .78rem !important;
  letter-spacing: 1.5px !important;
  line-height: 1.2 !important;
  margin: 3px 0 !important;
}
#screen-themes .themes-grid > * .fr,
#screen-themes .themes-grid > * .sub,
#screen-themes #themesGrid > * .fr,
#screen-themes #themesGrid > * .sub {
  font-size: .7rem !important;
  margin: 1px 0 0 !important;
  opacity: .75 !important;
}

/* ════ 2. QUIZ : virer l'étoile du haut (le bcf-frame de la 1ère card baroque) ════ */
#screen-quiz .baroque-card-frame .bcf-frame {
  display: none !important;
}
/* On garde un cadre simple à la place */
#screen-quiz .baroque-card-frame {
  background: linear-gradient(135deg, rgba(22, 36, 85, .9), rgba(12, 23, 56, .95)) !important;
  border: 2px solid #c89a3a !important;
  border-radius: 14px !important;
  box-shadow:
    inset 0 0 0 1px #6b4a0e,
    inset 0 0 0 3px rgba(212, 175, 55, .12),
    0 4px 12px rgba(0,0,0,.4),
    0 0 12px rgba(212, 175, 55, .25) !important;
  margin: 14px 12px !important;
  padding: 0 !important;
  min-height: auto !important;
}
#screen-quiz .baroque-card-frame .bcf-inner {
  padding: 22px 18px !important;
}

/* Coins ornementaux à la place du SVG */
#screen-quiz .baroque-card-frame::before {
  content: '' !important;
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  width: 18px !important;
  height: 18px !important;
  border-top: 2px solid #f7dc88 !important;
  border-left: 2px solid #f7dc88 !important;
  border-top-left-radius: 6px !important;
  pointer-events: none !important;
  z-index: 3 !important;
}
#screen-quiz .baroque-card-frame::after {
  content: '' !important;
  position: absolute !important;
  bottom: 6px !important;
  right: 6px !important;
  width: 18px !important;
  height: 18px !important;
  border-bottom: 2px solid #f7dc88 !important;
  border-right: 2px solid #f7dc88 !important;
  border-bottom-right-radius: 6px !important;
  pointer-events: none !important;
  z-index: 3 !important;
}
/* ============================================================
   FIX QUIZ — Virer juste l'étoile, sans cadre supplémentaire
   ============================================================ */

/* Annule le cadre baroque que j'avais ajouté tout à l'heure */
#screen-quiz .baroque-card-frame {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 8px 0 !important;
  min-height: auto !important;
}
#screen-quiz .baroque-card-frame::before,
#screen-quiz .baroque-card-frame::after {
  display: none !important;
}
#screen-quiz .baroque-card-frame .bcf-frame {
  display: none !important;
}
#screen-quiz .baroque-card-frame .bcf-inner {
  padding: 16px 14px !important;
  background: rgba(12, 23, 56, .55) !important;
  border: 1px solid rgba(212, 175, 55, .35) !important;
  border-radius: 12px !important;
}


/* ============================================================
   VOCAB — Vrai cadre baroque doré autour de la carte "ماء"
   ============================================================ */

#screen-vocab .vocab-card,
#screen-vocab #vocabCard {
  position: relative !important;
  background: linear-gradient(135deg, #162455 0%, #0c1738 55%, #070e24 100%) !important;
  border: 3px solid #c89a3a !important;
  border-radius: 16px !important;
  box-shadow:
    inset 0 0 0 1px #6b4a0e,
    inset 0 0 0 5px rgba(212, 175, 55, .18),
    inset 0 0 0 6px #6b4a0e,
    0 6px 20px rgba(0,0,0,.55),
    0 0 18px rgba(212, 175, 55, .35) !important;
  padding: 36px 24px !important;
  margin: 16px 12px !important;
  min-height: 240px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

/* Coin ornemental haut-gauche */
#screen-vocab .vocab-card::before,
#screen-vocab #vocabCard::before {
  content: '' !important;
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  width: 26px !important;
  height: 26px !important;
  border-top: 3px solid #f7dc88 !important;
  border-left: 3px solid #f7dc88 !important;
  border-top-left-radius: 8px !important;
  pointer-events: none !important;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .5));
}

/* Coin ornemental bas-droite */
#screen-vocab .vocab-card::after,
#screen-vocab #vocabCard::after {
  content: '' !important;
  position: absolute !important;
  bottom: 10px !important;
  right: 10px !important;
  width: 26px !important;
  height: 26px !important;
  border-bottom: 3px solid #f7dc88 !important;
  border-right: 3px solid #f7dc88 !important;
  border-bottom-right-radius: 8px !important;
  pointer-events: none !important;
  filter: drop-shadow(0 0 4px rgba(247, 220, 136, .5));
}

/* Le mot arabe (ماء) bien visible au centre */
#screen-vocab .vocab-card .word-ar,
#screen-vocab #vocabCard .word-ar {
  font-family: 'Amiri', serif !important;
  font-size: 3.2rem !important;
  font-weight: 700 !important;
  color: #f7dc88 !important;
  text-shadow: 0 0 18px rgba(247, 220, 136, .5) !important;
  margin: 0 0 12px !important;
  line-height: 1.2 !important;
}

/* Texte d'indication "Touchez Retourner la carte" */
#screen-vocab .vocab-card .hint,
#screen-vocab .vocab-card .flip-hint,
#screen-vocab #vocabCard .hint,
#screen-vocab #vocabCard .flip-hint {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 1rem !important;
  color: #c9b682 !important;
  margin-top: 14px !important;
  opacity: .75 !important;
}
/* ============================================================
   FIX RAPID — Forcer affichage texte des réponses (bug depuis le début)
   ============================================================ */

#rapidAnswers {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 14px 8px !important;
  padding: 0 !important;
}

#rapidAnswers .answer,
#rapidAnswers button.answer,
#rapidAnswers > button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 56px !important;
  padding: 14px 16px !important;
  background: linear-gradient(135deg, rgba(22, 36, 85, .85), rgba(12, 23, 56, .95)) !important;
  border: 1.5px solid rgba(212, 175, 55, .55) !important;
  border-radius: 12px !important;
  color: #f7dc88 !important;
  -webkit-text-fill-color: #f7dc88 !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  font-family: 'Amiri', serif !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  text-align: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#rapidAnswers .answer:hover,
#rapidAnswers .answer:active {
  border-color: #f7dc88 !important;
  background: linear-gradient(135deg, rgba(247, 220, 136, .15), rgba(212, 175, 55, .08)) !important;
  box-shadow: 0 0 16px rgba(247, 220, 136, .45) !important;
}

#rapidAnswers .answer.correct {
  border-color: #5EE0A5 !important;
  background: linear-gradient(135deg, rgba(94, 224, 165, .25), rgba(15, 90, 58, .15)) !important;
  color: #c8f5dc !important;
  -webkit-text-fill-color: #c8f5dc !important;
  box-shadow: 0 0 18px rgba(94, 224, 165, .6) !important;
}

#rapidAnswers .answer.wrong {
  border-color: #c43a3a !important;
  background: linear-gradient(135deg, rgba(196, 58, 58, .25), rgba(90, 10, 10, .15)) !important;
  color: #f5c8c8 !important;
  -webkit-text-fill-color: #f5c8c8 !important;
  box-shadow: 0 0 18px rgba(196, 58, 58, .6) !important;
}

#rapidAnswers .answer:disabled {
  cursor: default !important;
}
