/* LA TIDJANYA AU SENEGAL - Styles CSS Optimisés Google Chrome (Blink Engine) */

:root {
  --primary-green: #0a5c36;
  --primary-green-dark: #064025;
  --primary-green-light: #12804d;
  --accent-gold: #d4af37;
  --accent-gold-dark: #b89320;
  --accent-gold-light: #fef08a;
  --bg-page: #f0f4f2;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --border-color: #e2e8f0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-arabic {
  font-family: 'Amiri', 'Noto Naskh Arabic', 'Scheherazade New', 'Traditional Arabic', serif;
  letter-spacing: 0.01em;
  direction: rtl;
  unicode-bidi: embed;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

.font-quran {
  font-family: 'Amiri Quran', 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
  direction: rtl;
  unicode-bidi: embed;
  line-height: 2.2;
  text-rendering: optimizeLegibility;
}

.font-arabic-title {
  font-family: 'Cairo', 'Amiri', 'Noto Naskh Arabic', sans-serif;
  direction: rtl;
  unicode-bidi: embed;
  line-height: 1.4;
}

/* Chrome Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #e6f0eb;
}
::-webkit-scrollbar-thumb {
  background: #0a5c36;
  border-radius: 6px;
  border: 2px solid #e6f0eb;
}
::-webkit-scrollbar-thumb:hover {
  background: #064025;
}

/* Animations accélérées matériellement (GPU Accelerated) */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translate3d(0, 8px, 0); 
  }
  to { 
    opacity: 1; 
    transform: translate3d(0, 0, 0); 
  }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.8); }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.gold-glow {
  animation: pulseGlow 3s infinite;
}

/* Header & Nav */
.header-glass {
  background: linear-gradient(135deg, rgba(3, 38, 22, 0.98), rgba(10, 92, 54, 0.98));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 4px solid #d4af37;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateZ(0);
}

/* Card Styles */
.fb-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(10, 92, 54, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.14);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fb-card:hover {
  box-shadow: 0 6px 18px rgba(10, 92, 54, 0.08);
}

/* Story Rings */
.story-avatar-ring {
  border: 3px solid #10b981;
  box-shadow: 0 0 0 2px #d4af37;
}

/* Custom Badges */
.admin-badge {
  background: linear-gradient(135deg, #0a5c36, #12804d);
  color: #fef08a;
  border: 1px solid #d4af37;
}

/* Reaction Buttons */
.reaction-btn {
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reaction-btn:hover {
  transform: scale(1.18);
}

/* Chat Popup */
.chat-window {
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.15);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* Tasbih Bead Pulse */
.bead-counter {
  transition: transform 0.1s ease-out;
}
.bead-counter:active {
  transform: scale(0.92);
}

/* Audio Player styling */
.audio-player-custom {
  background: linear-gradient(to right, #064025, #0a5c36);
}

/* Banner Motif Tidjane */
.tidjane-pattern {
  background-color: #064025;
  background-image: radial-gradient(rgba(212, 175, 55, 0.15) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Moderation Warning Toast */
.moderation-toast {
  background: #991b1b;
  border-left: 5px solid #f87171;
  color: white;
}

/* Leaflet Custom Styling */
.leaflet-popup-content-wrapper {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(10, 92, 54, 0.25);
  border: 2px solid #d4af37;
  padding: 4px;
}
.leaflet-popup-tip {
  background: #d4af37;
}

/* Chrome Modal & Dialog Touch Optimization */
#modal-container > div {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* Chrome Image Rendering Sharpness */
img {
  image-rendering: -webkit-optimize-contrast;
}

.leaflet-container {
  font-family: 'Inter', sans-serif;
}
.custom-bambey-pin {
  background: transparent;
  border: none;
}
