/* Variables CSS */
:root {
    --va-gold: #D4AF37;
    --va-blue-night: #1E2A38;
    --va-ivory: #F8F5F0;
    --va-gray-50: #f9fafb;
    --va-gray-100: #f3f4f6;
    --va-gray-200: #e5e7eb;
    --va-gray-300: #d1d5db;
    --va-gray-500: #6b7280;
    --va-gray-600: #4b5563;
    --va-gray-700: #374151;
    --va-gray-800: #1f2937;
    --va-accent: #3BA99C;
    --va-dark: #2C2C2C;
    --va-success: #16a34a;
    --va-warning: #f59e0b;
    --va-danger: #ef4444;
    --white: #ffffff;
    --red-50: #fef2f2;
    --red-200: #fecaca;
    --red-400: #f87171;
    --orange-50: #fff7ed;
    --orange-400: #fb923c;
    --blue-50: #eff6ff;
    --blue-400: #60a5fa;
    --blue-700: #1d4ed8;
    --green-50: #f0fdf4;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --yellow-400: #facc15;
    --purple-50: #faf5ff;
    --purple-700: #7e22ce;
}

[data-contexte=""] {
  display: none;
}

[data-has-context]:not([data-has-context=""]), .tax-dialecte [data-has-context=""] {
  display: none;
}

/* ========================================
   CLASSES UTILITAIRES
======================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.hidden {
  display: none;
}

hr {
    height: 1px;
    width: 100%;
    background: var(--color-gray-200);
}
.mt-1 {margin-top: var(--space-xs);}
.mt-2 {margin-top: var(--space-sm);}
.mt-3 {margin-top: var(--space-md);}
.mb-1 {margin-bottom: var(--space-xs);}
.mb-2 {margin-bottom: var(--space-sm);}
.mb-3 {margin-bottom: var(--space-md);}
.mb-4 {margin-bottom: var(--space-lg);}
.mb-5 {margin-bottom: var(--space-xl);}
.text-align-center { text-align: center; }
.m-auto { margin: 0 auto; }

.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--wp--preset--color--blue-night);
  text-align: center;
}
.section-subtitle {
  color: #555;
  max-width: 640px;
  margin: 0 auto 2.5rem !important;
  text-align: center;
}

.button-blue-night {
    background-color: var(--wp--preset--color--blue-night);
    border-radius: 0.75rem;
    border-width: 0px;
    color: var(--wp--preset--color--white);
    font-family: var(--wp--preset--font-family--montserrat);
    font-size: var(--wp--preset--font-size--normal);
    font-weight: 700;
    padding-top: 0.75rem;
    padding-right: 2rem;
    padding-bottom: 0.75rem;
    padding-left: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: inherit;
    text-decoration: none;
    align-content: center;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    height: 100%;
    text-align: center;
    word-break: break-word;
}
.button-blue-night:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.highlight { 
  color:var(--wp--preset--color--gold);
  font-weight: 700;
}
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 2rem; }
.counter { font-size: 0.875rem; color: #999; margin-bottom: 1.5rem; text-align: center; }

/* ========================================
   COMPOSANTS: RECHERCHE
======================================== */
.search-wrapper {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background-color: var(--color-white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-gray-200);
}

.search-wrapper span {
  color: var(--color-gray-400);
  margin-right: var(--space-md);
  font-size: 1.25rem;
}

.search-wrapper input[type="text"] {
  width: 100%;
  border: none;
  outline: none;
  font-size: 1rem;
  background-color: transparent;
}

.search-description {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  margin: var(--space-md) 0 3rem;
  text-align: center;
}

/* ========================================
   COMPOSANTS: BLOCK RESULTS
======================================== */
#no-results-message {
    grid-column: 1 / -1; 
    padding: 1rem;
    text-align: center;
    color: var(--wp--preset--color--contrast, #333);
}

#no-results-message p:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#no-results-message p:last-child {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ========================================
   COMPOSANTS: CARTES MOTS
======================================== */
.vocab-card {
  position: relative;
  width: 100%;
  min-height: 550px;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: var(--shadow-sm);
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
}

.vocab-card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.card-front {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  justify-content: space-between;
}

.card-back {
  transform: rotateY(180deg);
  padding: 24px;
  overflow-y: auto;
}

.category-tag {
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background-color: #fafaea;
    color: var(--va-gold);
}

.arabic-word {
    font-family: 'Amiri', serif;
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--color-gray-900);
    direction: rtl;
    margin-bottom: var(--space-xs);
    margin-top: var(--space-2xl);
    line-height: 1.3;
}

.french-translation {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.transliteration {
    font-size: .875rem;
    font-style: italic;
    color: var(--color-gray-500);
    margin-bottom: var(--space-md);
}

.speak-button-card {
  margin: 1.5rem auto;
  font-size: 1.2em;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.speak-button-card.visibility-hidden {
  opacity: 0;
  visibility: hidden !important;
}

.speak-button-card svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.speak-button-card:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 4px 12px rgba(var(--wp--preset--color--gold), 0.25);
}

.speak-button-card:active {
  transform: scale(0.95);
}

.speak-button-card.playing {
  border-color: var(--color-gold);
  color: var(--color-gold);
  animation: pulse-ring 1s ease-out infinite;
}

/* ========================================
   Status Button States (pour synchronisation BDD)
======================================== */
.mastery-section {
    width: 100%;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
    margin-top: auto;
}

.status-btn {
  transition: all 0.2s ease;
}

/* État Non classé (gris) */
.status-btn[data-status="unclassified"],
.status-btn.border-gray-300.text-gray-500.bg-gray-50 {
    border-color: #d1d5db;
    color: #6b7280;
    background-color: #f9fafb;
}

.status-btn[data-status="unclassified"]:hover,
.status-btn.border-gray-300.text-gray-500.bg-gray-50:hover {
    background-color: #f3f4f6;
}
/* État Maîtrisé (vert) */
.status-btn[data-status="mastered"],
.status-btn.border-green-500.text-green-700.bg-green-50 {
    border-color: #16a34a !important;
    color: #15803d !important;
    background-color: #f0fdf4 !important;
}

.status-btn[data-status="mastered"]:hover,
.status-btn.border-green-500.text-green-700.bg-green-50:hover {
    background-color: #dcfce7 !important;
}

/* État À réviser (orange) */
.status-btn[data-status="review"],
.status-btn.border-orange-500.text-orange-700.bg-orange-50 {
    border-color: #f59e0b !important;
    color: #d97706 !important;
    background-color: #fffbeb !important;
}

.status-btn[data-status="review"]:hover,
.status-btn.border-orange-500.text-orange-700.bg-orange-50:hover {
    background-color: #fef3c7 !important;
}

/* Reset button spécifique */
.status-btn-reset {
  background: none; 
  border: none; 
  color: #e74c3c; 
  font-size: 12px; 
  cursor: pointer; 
}

.status-btn-reset:hover {
  text-decoration: underline;
}

/* Carte avec un bouton "mastered" actif */
.vocab-card:has(button[data-status="mastered"]) {
  border: 1px solid var(--color-green-500);
  background-color: var(--color-green-100);
}

/* Carte avec un bouton "review" actif */
.vocab-card:has(button[data-status="review"]) {
  border: 1px solid var(--color-orange-600);
  background-color: var(--color-orange-100);
}

.vocab-card .text-sm button:hover { color: #1d4ed8; }
.vocab-card .text-sm button.text-green-600 { color: var(--color-green-600); }
.vocab-card .text-sm button.text-green-600:hover { color: var(--color-green-700); }
.vocab-card .text-sm button.text-red-600 { color: var(--color-red-600); }
.vocab-card .text-sm button.text-red-600:hover { color: var(--color-red-700); }

.vocab-card .flex.gap-3.items-center {
  display: flex;
  gap: var(--space-md);
  margin-top: 0;
}

.vocab-card .flex.gap-3.items-center button {
  border-width: 1px;
  padding: var(--space-sm);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.vocab-card .flex.gap-3.items-center button:hover {
  background-color: var(--color-yellow-100);
}

#card-action-buttons button {
  font-size: .75em;
  padding: 5px;
  border-radius: var(--radius-md);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(var(--wp--preset--color--gold), 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(var(--wp--preset--color--gold), 1); }
  100% { box-shadow: 0 0 0 0 rgba(var(--wp--preset--color--gold), 0); }
}

/* ======================= */
/* VERSO                   */
/* ======================= */
.back-header {
    text-align: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 14px;
}

.back-word {
    font-family: 'Amiri', serif;
    font-weight: 700;
    font-size: 38px;
    color: #1a1a1a;
    direction: rtl;
    margin-bottom: 4px;
}

.back-translation {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.back-transliteration {
    font-size: 14px;
    font-style: italic;
    color: #999;
}

.back-flip-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.back-flip-btn:hover { border-color: var(--color-gold); background: var(--color-yellow-50); }
.back-flip-btn svg { width: 16px; height: 16px; fill: var(--color-gray-500); }
.back-flip-btn:hover svg { fill: var(--color-gold); }

.detail-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 14px;
    color: var(--color-gray-900);
    min-width: 85px;
    font-weight: 500;
}

.detail-value {
    flex: 1;
    text-align: right;
    direction: rtl;
}

.detail-value > * {
  background: transparent;
  font-size: 1.3rem; 
}

.detail-value > button {
  cursor: pointer;
}

.detail-value:hover > * {
  color: var(--va-gold); 
}

.arabic-link {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: var(--color-gray-900);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.arabic-link:hover {
    color: var(--color-gold);
}

.empty-value { color: var(--color-gray-500); font-size: 13px; }


/* ======================= */
/* Button Details          */
/* ======================= */
.flip-btn-recto {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid var(--color-gray-200);
    background: var(--color-white);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-gray-500);
}

.flip-btn-recto:hover { 
    border-color: var(--color-gold); 
    background: var(--color-yellow-50);
    color: var(--color-gold);
}

.flip-btn-recto svg { 
    width: 16px; 
    height: 16px; 
    fill: currentColor;
    transition: transform 0.3s;
}

.flip-btn-recto:hover svg {
    transform: rotateY(180deg);
}

/* ========================================
   BANDEAU ASTUCE
======================================== */
.conseil-astuce {
    max-width: 760px;
    margin: 0 auto 36px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fffdf6;
    border: 1px solid #f1e7c2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.conseil-icon {
    font-size: 18px;
    color: #d4a017;
    flex-shrink: 0;
}

.conseil-astuce p {
    font-size: .875rem;
    color: #6b7280;
    line-height: 1.5rem;
}

.tag {
    padding: 5px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    margin: 0 2px;
    white-space: nowrap;
    border-style: solid;
    border-width: 1px;
}

.tag.mastered {
    background: #f0fdf4;
    border-color: var(--color-green-600);
    color: var(--color-green-600);
}

.tag.review {
    border-color: var(--color-orange-600);;
    color: var(--color-orange-600);;
    background-color: #fffbeb;
}

/* ========================================
   COMPOSANTS: FILTRES
======================================== */
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.cat-filters button {
  position: relative;
  padding: 0.475rem var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-filters button.inactive, .cat-filters .filter-btn {
  background: var(--wp--preset--color--white);
  color: #0f172a;
  border: 1px solid #e5e7eb;
}

.cat-filters button.inactive:hover, .cat-filters .filter-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.cat-filters button.active {
  background-color: var(--color-gold);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.cat-filters button.active:hover {
  color: var(--color-white);
}

/* Desktop visible */
#exoCategories .exo-buttons-wrapper, #catFilters .cat-buttons-wrapper, #catFiltersPhrases .cat-phrases-buttons-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .65rem;
}

/* Mobile caché */
#exoCategories .exo-select-wrapper, #catFilters .cat-select-wrapper, #catFiltersPhrases .cat-phrases-select-wrapper {
    display: none;
}

select#exoCategorySelect, select#categorySelect, select#categoryPhrasesSelect {
  appearance: none;
  padding: 8px 32px 8px 16px;
  border-radius: 12px;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select#exoCategorySelect:focus, select#categorySelect:focus, select#categoryPhrasesSelect:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.3);
}

/* La flèche SVG */
.cat-select-arrow {
    pointer-events: none;
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}

/* Taille et couleur de l’icône */
.arrow-icon {
    width: 16px;
    height: 16px;
    stroke: #6b7280; /* gray-500 */
}

/* Mobile */
@media (max-width: 640px) {
    #exoCategories .exo-buttons-wrapper, #catFilters .cat-buttons-wrapper, #catFiltersPhrases .cat-phrases-buttons-wrapper {
        display: none;
    }
    #exoCategories .exo-select-wrapper, #catFilters .cat-select-wrapper, #catFiltersPhrases .cat-phrases-select-wrapper {
        display: block;
        position: relative;
        width: 160px;
    }
}

/* Tooltip */
button[disabled][data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Petite flèche */
button[disabled][data-tooltip]::before {
    content: "";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Affichage au survol */
button[disabled][data-tooltip]:hover::after,
button[disabled][data-tooltip]:hover::before {
    opacity: 1;
}

.cat-filters button.cursor-not-allowed, .cursor-not-allowed {cursor: inherit;}

/* ========================================
   COMPOSANTS: CARTES FONCTIONNALITÉS
======================================== */
.feature-card {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  text-align: center;
  border: 1px solid #f3f4f6;
}

.feature-card:hover, #mini-podcasts:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-xl);
}

.feature-card.active {
  box-shadow: 0 0 0 2px var(--color-gold);
  background-color: #fefce8;
}

.feature-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.feature-icon svg {
  width: 2rem;
  height: 2rem;
}

.shadow-inner {
  box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
}

/* ========================================
   COMPOSANTS: GRILLES
======================================== */
.grid {
  display: grid;
}
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-6 { gap: var(--space-xl); }
.max-w-4xl { max-width: 56rem; }

.grid-auto-fit { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));}

@media (min-width: 640px) {
  .sm\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Card Mini Podcasts */
.relative:has(#mini-podcasts:hover) > :first-child {
  transform: translateY(-0.5rem);
  box-shadow: none;
}

#mini-podcasts {
  position: absolute;
  top: 0;
  height: 100%;
  min-height: unset;
  margin: 0;
  padding: 0;
  width: 100%;
  background: none;
  box-shadow: none;
  border: none;
}
#mini-podcasts :is(img, span) {
  display: none;
}

#mini-podcasts :is(.wp-block-cover__inner-container, p) {
  height: 100%;
}

#mini-podcasts a {
  height: 100%;
  display: block;
  opacity: 0;
}

.podcast-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.podcast-meta span {
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 0.25rem 0.625rem;
  border-radius: 2rem;
}

.podcast-meta .podcast-level {
  color: var(--green-700);
  background-color: var(--green-50);
}

.podcast-meta .podcast-category {
  color: var(--va-gray-700);
  background-color: var(--va-gray-100);
}

.podcast-meta .podcast-dialecte {
  color: var(--va-gray-700);
  background-color: var(--white);
  border: 1px solid var(--va-gray-200);
}

.podcast-goal {
  margin: 1rem 0 !important;
  padding: 1rem;
  background-color: var(--va-gray-100);
  border-radius: 0.5rem;
}

.podcast-audio {
    background-color: var(--wp--preset--color--blue-night);
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    padding: 1rem 1rem .5rem;
}

.podcast-audio audio {
    height: 40px;
    width: 100%;
}
.podcast-stats>div {
  margin-bottom: 0;
  margin-top: 0;
  text-align: center;
  padding: 1rem;
  background-color: var(--va-gray-100);
  border-radius: 0.5rem;
}

.podcast-stats p {
  margin:0;
}

.podcast-stats .number {font-size:1.125rem;}

.podacst-dialogue summary {
    background: var(--color-gold);
    color: #fff;
    padding: .5rem;
    text-align: center;
    border-radius: 0.5rem;
}

.podcast-tr {
  font-style: italic;
  border-left: 4px solid var(--color-yellow-400);
  padding-left: 0.75rem;
}

.podcast-text {
  background-color: #f9fafb;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.625;
}

.podcast-keyword {
  padding: 0.25rem 0.75rem;
  background-color: #fef9c3;
  color: #854d0e;
  border-radius: 9999px;
  font-size: 0.875rem;
}

/* ========================================
   COMPOSANTS: BOUTONS
======================================== */
.loadMore, .load-more-btn,.va-levels-mini-progress, .btn-gold-original {
  padding: var(--space-md) var(--space-xl);
  background: var(--color-gold);
  color: var(--color-white);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-block;
  text-decoration:none;
}

.loadMore:hover, .load-more-btn:hover,.va-levels-mini-progress:hover, .btn-gold-original:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.btn-custom,
.option-btn {
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--color-gray-100);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-normal);
  border: none;
  cursor: pointer;
  font-size: 100%;
  font-weight: 500;
}

.btn-custom:hover,
.option-btn:hover:not(:disabled) {
  background-color: var(--color-gray-200);
}

.option-btn.correct-btn,
.intrus-btn.correct {
  background-color: var(--color-green-500);
  color: var(--color-white);
}

.option-btn.wrong-btn,
.intrus-btn.wrong {
  background-color: var(--color-red-500);
  color: var(--color-white);
}

/* Boutons colorés */
.btn-gold { background-color: var(--color-yellow-600); color: var(--color-white); }
.btn-green { background-color: #10b981; color: var(--color-white); }
.btn-orange { background-color: #f97316; color: var(--color-white); }
.btn-blue { background-color: #3b82f6; color: var(--color-white); }

.btn-gold,
.btn-green,
.btn-orange,
.btn-blue {
  padding: var(--space-sm) var(--space-xl);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal);
}

.btn-gold:hover { background-color: var(--color-yellow-800); }
.btn-green:hover { background-color: #059669; }
.btn-orange:hover { background-color: var(--color-orange-600); }
.btn-blue:hover { background-color: #2563eb; }

/* ========================================
   COMPOSANTS: ARTICLES
======================================== */
.articles-featured {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 var(--space-xl);
}

.articles-featured-title {
  line-height: 2rem;
  font-weight: 700;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  padding: 18px;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.article-card:hover {
  box-shadow: var(--shadow-md);
}

.article-card div[dir="rtl"] {
  text-align: right;
}

.article-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--wp--preset--color--gold);
  color: var(--color-white);
  font-size: 12px;
  margin-bottom: 6px;
}

.article-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.article-excerpt {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.article-card p:last-of-type {
  margin-top: auto;
  margin-bottom: 0;
}

.article-link {
  color: var(--va-gold);
  font-weight: bold;
  text-decoration: none;
}

.article-link:hover {
  text-decoration: underline;
}

.articles-pagination {
  text-align: center;
  margin: 30px 0;
}

/* ========================================
   COMPOSANTS: DIALECTES
======================================== */
.dialectes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 var(--space-xl);
}

.dialectes-grid a {
  text-decoration: none;
}

@media (min-width: 768px) {
  .dialectes-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dialecte-card {
  display: block;
  border-top-width: 4px;
  border-top-style: solid;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.dialecte-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.dialecte-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  white-space: pre-line;
}

.dialecte-desc {
  font-size: 0.9rem;
  color: var(--color-gray-500);
  margin-top: var(--space-sm);
}

/* ========================================
   COMPOSANTS: QUIZ & EXERCICES
======================================== */
.quiz-card,
.exercise-card,
.memory-card-wrapper {
  background-color: var(--color-white);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  text-align: center;
}

.exercise-card {
  max-width: 48rem;
  margin-bottom: var(--space-2xl);
}

.exo-card.disabled {
   opacity: 0.5;
}

.quiz-title,
.exercise-title,
.memory-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.quiz-title {
  font-size: 1.75rem;
}

.quiz-desc,
.exercise-desc,
.memory-desc {
  color: var(--color-gray-500);
  margin-bottom: var(--space-xl);
}

.quiz-word {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xl);
}

.quiz-options,
.exercise-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.quiz-options {
  display: grid;
  gap: var(--space-lg);
}

.exercise-buttons {
  margin-bottom: var(--space-lg);
  justify-content: center;
}

.quiz-feedback,
.exercise-feedback,
.feedback {
  margin-top: var(--space-xl);
  font-size: 1.125rem;
  font-weight: 600;
}

.feedback {
  font-size: 1.25rem;
  font-weight: bold;
}

.feedback.correct,
.correct-feedback {
  color: var(--color-green-600);
}

.feedback.incorrect,
.wrong-feedback {
  color: var(--color-red-700);
}

.quiz-stats {
  margin-top: var(--space-xl);
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* Barres de progression */
.quiz-bar-bg {
  width: 100%;
  height: 0.75rem;
  background-color: var(--color-gray-200);
  border-radius: var(--radius-full);
  margin-top: var(--space-md);
}

.quiz-bar,
#quizBar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow), background-color var(--transition-slow);
}

.quiz-bar {
  width: 0%;
  background-color: var(--color-green-500);
}

.bar-red { background-color: var(--color-red-500); }
.bar-yellow { background-color: var(--color-gold-light); }
.bar-green { background-color: var(--color-green-500); }

.quiz-next-btn,
.restart-btn {
  margin-top: var(--space-2xl);
  padding: var(--space-md) var(--space-xl);
  background-color: var(--color-yellow-600);
  color: var(--color-white);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal);
}

.restart-btn {
  padding: var(--space-sm) 1.25rem;
  margin-top: var(--space-xl);
}

.quiz-next-btn:hover:not(:disabled),
.restart-btn:hover {
  background-color: var(--color-yellow-800);
}

.quiz-next-btn:disabled,
.opacity-50 {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   COMPOSANTS: JEU MÉMOIRE
======================================== */
.memory-container {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.memory-card {
  perspective: 1000px;
  cursor: pointer;
}

.memory-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform var(--transition-slow);
  height: 100%;
}

.memory-card.flipped .memory-inner {
  transform: rotateY(180deg);
}

.memory-front,
.memory-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: var(--space-sm);
  text-align: center;
}

.memory-front {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  font-size: 1.5rem;
  font-weight: bold;
}

.memory-back {
  background: #fbbf24;
  color: white;
  transform: rotateY(180deg);
  font-weight: bold;
}

.memory-card.matched .memory-back {
  background: #10b981;
}

/* ========================================
   COMPOSANTS: EXERCICES SPÉCIFIQUES
======================================== */
.exercise-container {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.exercise-clue {
  color: var(--color-gray-700);
  margin-bottom: var(--space-lg);
}

.letters-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.scramble-result,
.result-box {
  min-height: 50px;
  background-color: var(--color-yellow-100);
  border: 2px solid var(--color-yellow-600);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-700);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xl);
  text-align: center;
  transition: background-color var(--transition-normal);
}

.result-box {
  background-color: var(--color-white);
  border-color: #fbbf24;
  box-shadow: var(--shadow-md);
}

.result-box:hover {
  background-color: var(--color-yellow-100);
}

.dictation-input {
  width: 100%;
  border: 2px solid #d1d5db;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  font-size: 1.5rem;
  text-align: right;
  margin-bottom: var(--space-lg);
}

.keyboard-container {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-sm);
  max-width: 32rem;
  margin: 0 auto var(--space-xl);
}

.keyboard-container button {
  padding: var(--space-sm) var(--space-md);
  font-size: 1.125rem;
  font-weight: bold;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.keyboard-container .letter-btn {
  background-color: var(--color-gray-200);
  color: #111;
}

.keyboard-container .letter-btn:hover {
  background-color: #fbbf24;
  color: var(--color-white);
  border-color: #fbbf24;
}

.keyboard-container .clear-btn {
  background-color: var(--color-red-100);
  color: #111;
}

.keyboard-container .clear-btn:hover {
  background-color: var(--color-red-500);
  color: var(--color-white);
  border-color: var(--color-red-500);
}

@media (max-width: 1024px) {
  .keyboard-container {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 640px) {
  .keyboard-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.intrus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.intrus-btn {
  padding: var(--space-md) var(--space-lg);
  font-size: 1.25rem;
  font-weight: bold;
  border-radius: var(--radius-md);
  background-color: var(--color-gray-100);
  border: none;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.intrus-btn:hover { 
  background-color: var(--color-gray-200); 
}

.intrus-btn.correct {
  background-color: var(--color-green-600);
  color: var(--color-white);
}

.intrus-btn.wrong {
  background-color: var(--color-red-500);
  color: var(--color-white);
}

.intrus-btn.disabled { 
  cursor: not-allowed; 
  opacity: 0.6; 
}

/* ========================================
   EXERCICE: CONTRE-LA-MONTRE
======================================== */
.timer-start-screen,
.timer-gameover-screen {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.timer-emoji-big {
  font-size: 6rem;
  margin-bottom: var(--space-xl);
}

.timer-start-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-blue-night);
  margin-bottom: var(--space-lg);
}

.timer-start-desc {
  color: var(--color-gray-600);
  margin-bottom: var(--space-sm);
  font-size: 1.125rem;
}

.timer-start-time {
  color: var(--color-gray-500);
  margin-bottom: var(--space-2xl);
}

.timer-highlight {
  font-weight: 700;
  color: var(--color-gold);
}

.timer-rules-box {
  background-color: var(--color-ivory);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 28rem;
  margin: 0 auto var(--space-2xl);
}

.timer-rule {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  text-align: left;
}

.timer-rule-icon {
  font-size: 1.5rem;
}

.timer-start-btn {
  padding: var(--space-lg) 3rem;
  background: linear-gradient(to right, var(--color-gold), #eab308);
  color: var(--color-white);
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all var(--transition-normal);
}

.timer-start-btn:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.05);
}

/* Question screen */
.timer-question-screen {
  text-align: center;
}

.timer-stats-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.timer-stat-box {
  text-align: center;
}

.timer-countdown {
  font-size: 3.75rem;
  font-weight: 700;
  color: var(--color-gold);
  animation: timerPulse 1s ease-in-out infinite;
}

.timer-countdown.timer-danger {
  color: var(--color-red-600);
  animation: timerDanger 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes timerDanger {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.timer-score-display {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.timer-stat-label {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.timer-word-card {
  background: linear-gradient(to right, var(--color-ivory), #fef3c7);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  border: 2px solid rgba(212, 175, 55, 0.3);
}

.timer-arabic-word {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-blue-night);
}

.timer-instruction {
  color: var(--color-gray-600);
  margin-bottom: var(--space-lg);
  font-weight: 500;
  font-size: 1.125rem;
}

.timer-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  max-width: 42rem;
  margin: 0 auto;
}

.timer-option-btn {
  padding: var(--space-lg) var(--space-xl);
  background-color: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-blue-night);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.timer-option-btn:hover {
  border-color: var(--color-gold);
  background-color: var(--color-yellow-100);
  box-shadow: var(--shadow-md);
}

.timer-feedback-popup {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-lg) var(--space-2xl);
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 1.125rem;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  animation: slideDown 0.3s ease-out;
  background-color: #d1fae5;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Game over screen */
.timer-gameover-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-blue-night);
  margin-bottom: var(--space-lg);
}

.timer-final-score {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-xl);
}

/* ========================================
   EXERCICE: VRAI/FAUX
======================================== */
.tf-question-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.tf-stat-box {
  background-color: var(--color-ivory);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-sm) var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.tf-stat-text {
  font-size: 0.875rem;
  color: var(--va-blue-night);
  font-weight: 600;
}

.tf-question-card {
  background: linear-gradient(to right, var(--color-ivory), #fef3c7);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid rgba(212, 175, 55, 0.3);
}

.tf-arabic-word {
  font-size: 3rem;
  font-weight: 700;
  color: var(--va-blue-night);
  margin-bottom: var(--space-lg);
}

.tf-means-text {
  font-size: 1.25rem;
  color: var(--color-gray-600);
  margin-bottom: var(--space-sm);
}

.tf-translation {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.tf-question-prompt {
  color: var(--color-gray-600);
  margin-bottom: var(--space-xl);
  font-size: 1.125rem;
  font-weight: 500;
}

.tf-buttons-container {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
}

.tf-btn-true,
.tf-btn-false {
  padding: var(--space-sm) 1.25rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  font-size: 1.5rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--color-white);
}

.tf-btn-true {
  background: var(--color-green-600);
}

.tf-btn-true:hover:not(:disabled) {
  box-shadow: var(--shadow-xl);
  transform: scale(1.05);
}

.tf-btn-false {
  background: var(--color-red-600);
}

.tf-btn-false:hover:not(:disabled) {
  box-shadow: var(--shadow-xl);
  transform: scale(1.05);
}

.tf-btn-true:disabled,
.tf-btn-false:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tf-results-container {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.tf-emoji-big {
  font-size: 4.5rem;
  margin-bottom: var(--space-xl);
}

.tf-results-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--va-blue-night);
  margin-bottom: var(--space-lg);
}

.tf-score-card {
  background: linear-gradient(to right, var(--color-ivory), #fef3c7);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid rgba(212, 175, 55, 0.3);
}

.tf-score-number {
  font-size: 3.75rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.tf-score-percentage {
  font-size: 1.5rem;
  color: var(--color-gray-600);
}

/* ========================================
   EXERCICE: CATÉGORIES
======================================== */
.cat-instructions {
  text-align: center;
  color: var(--color-gray-600);
  margin-bottom: var(--space-xl);
  font-size: 1.125rem;
  font-weight: 500;
}

.cat-words-pool-wrapper {
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.cat-words-pool {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.cat-word-item {
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-white);
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  cursor: move;
  transition: all var(--transition-normal);
  font-weight: 600;
  color: var(--va-blue-night);
  box-shadow: var(--shadow-sm);
}

.cat-word-item:hover {
  background-color: var(--color-yellow-50);
  box-shadow: var(--shadow-md);
}

.cat-word-item.dragging {
  opacity: 0.5;
}

.cat-word-item.cursor-default {
  cursor: default;
}

.cat-zones-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .cat-zones-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.category-zone {
  background-color: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  min-height: 120px;
  transition: border-color var(--transition-normal);
}

.category-zone:hover {
  border-color: rgba(212, 175, 55, 0.5);
}

.category-zone.border-gold {
  border-color: var(--color-gold);
  border-width: 4px;
}

.cat-zone-title {
  text-align: center;
  font-weight: 700;
  color: var(--va-blue-night);
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cat-zone-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cat-buttons-container {
  text-align: center;
  margin-top: var(--space-2xl);
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
}

.cat-btn-check {
  padding: var(--space-sm) 1.25rem;
  margin-top: var(--space-xl);
  background-color: var(--color-gold);
  color: var(--color-white);
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.cat-btn-check:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.cat-btn-restart {
  padding: var(--space-lg) var(--space-2xl);
  background: linear-gradient(to right, var(--color-accent), #10b981);
  color: var(--color-white);
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.cat-btn-restart:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.05);
}

/* États des mots dans les catégories */
.cat-word-item.border-accent {
  border-color: var(--color-accent);
}

.cat-word-item.bg-green-100 {
  background-color: #d1fae5;
}

.cat-word-item.border-red-500 {
  border-color: var(--color-red-500);
}

.cat-word-item.bg-red-100 {
  background-color: #fee2e2;
}

.wrong-feedback.tf-arabic-word {
  font-size: 1.5rem;
}

.correct-feedback.tf-arabic-word {
  font-size: 1.5rem;
}

/* ========================================
   COMPOSANTS: ALERTES
======================================== */
.alert-yellow {
  background-color: var(--color-yellow-100);
  border: 2px solid var(--color-yellow-400);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.alert-yellow-strong {
  color: var(--color-yellow-800);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  display: block;
}

.alert-yellow-text {
  color: var(--color-yellow-600);
  margin-top: var(--space-sm);
}

/* ========================================
   COMPOSANTS: CARTES
======================================== */
.quiz-card {
  max-width: 48rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.quiz-desc {
  color: var(--color-gray-700);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.quiz-feedback {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.quiz-next-btn {
  margin-top: var(--space-lg);
  padding: var(--space-sm) var(--space-xl);
  background-color: var(--color-green-500);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-normal);
}

.quiz-next-btn:disabled,
.opacity-50 {
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-next-btn:hover:not(:disabled) {
  background-color: var(--color-green-600);
}

/* ========================================
   COMPOSANTS: CARTES MÉMOIRE
======================================== */
.memory-front,
.memory-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.6s ease;
  padding: var(--space-lg);
}

@media (max-width: 768px) {
  #memoryBoard {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   COMPOSANTS: CARTES DE STATS
======================================== */
.progress-bar-stats {
  position: relative;
  margin-bottom: var(--space-xs);
  height: 0.125rem;
  width: 100%;
  border-radius: var(--radius-full);
  background-color: var(--color-gray-200);
}

.progress-gradient {
  position: absolute;
  height: 0.125rem; /* équivaut à h-0.5 */
  border-radius: var(--radius-full);
  background-image: linear-gradient(to right, #f87171, var(--color-yellow-400), var(--color-green-500)); /* from-red-400 → via-yellow-400 → to-green-500 */
  transition-property: all;
  transition-duration: 700ms;
}

.stats-box p {
  margin: 0;
}

/* ========================================
   COMPOSANTS: FEEDBACK
======================================== */
.feedback {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
}

.feedback.correct {
  background-color: var(--color-green-50);
  color: var(--color-green-700);
  border: 1px solid var(--color-green-100);
}

.feedback.incorrect {
  background-color: var(--color-red-50);
  color: var(--color-red-700);
  border: 1px solid var(--color-red-100);
}

/*==============
   COMPOSANTS: FAQ
==============*/
/* Masque le marker natif (WebKit / Blink) */
#faq-group details summary::-webkit-details-marker {
  display: none;
}

/* Masque le marker natif pour navigateurs supportant ::marker */
#faq-group details summary::marker {
  content: "";
  display: none;
}

#faq-group details summary {
  position: relative;
  padding-right: 2rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  outline: none;
}

#faq-group details summary::after {
  content: "+";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  transition: transform 0.18s ease, opacity 0.18s ease;
  display: inline-block;
  width: 1.2rem;
  text-align: center;
}

#faq-group details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(0deg);
}
@media (max-width: 640px) {
  #faq-group details summary {
    padding-right: 2.6rem;
  }
  #faq-group details summary::after {
    right: 0.6rem;
  }
}

#faq-group details[open] summary {
  font-weight: 700;
}

#faq-group details summary::after {
  color: var(--wp--preset--color--gold);
}

/*----------
   COMPOSANTS: MODAL
----------*/
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


/************************
Skeleton loader animation 
***********************/
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-button {
  height: 2.5rem;
  width: 100px;
}

.skeleton-card {
  height: 150px;
  margin-bottom: 1rem;
}

/* Pour les petites cartes de KPI */
.skeleton-kpi {
  height: 80px;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* Pour les blocs type "objectif" */
.skeleton-goal {
  height: 120px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

/* Pour les listes ou tableaux (catégories, exercices, phrases, etc.) */
.skeleton-line {
  height: 1.2rem;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

/* Variante plus grande (titre ou entête de section) */
.skeleton-title {
  width: 60%;
  height: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 6px;
}

/* Optionnel : pour regrouper visuellement les skeletons dans un container */
.skeleton-section {
  padding: 1rem 0;
}

/* Pour les graphiques */
.chart-skeleton {
    width: 100%;
    height: 300px; /* ou la hauteur de ton chart */
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/*==============================
   COMPOSANTS: BADGES
==============================*/
.va-badges-grid {
    margin: 2rem 0;
}

.va-badges-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.va-badges-title {
    margin: 0;
    font-size: 1.75rem;
    color: #333;
}

.va-badges-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.va-badges-count strong {
    color: #4CAF50;
    font-size: 1.3rem;
}

.va-badges-container {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.va-badge-card {
    position: relative;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.va-badge-card.is-unlocked {
    border-color: var(--va-gold);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

.va-badge-card.is-locked {
    opacity: 0.6;
}

.va-badge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.va-badge-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.va-badge-emoji-locked {
    filter: grayscale(100%);
    opacity: 0.5;
}

.va-badge-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: #333;
}

.va-badge-description {
    font-size: 0.95rem;
    color: #666;
    margin: 0.5rem 0;
}

.va-badge-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0 0.5rem;
}

.va-badge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    transition: width 0.3s ease;
}

.va-badge-progress-text {
    font-size: 0.9rem;
    color: #555;
    margin: 0.5rem 0 0;
}

.va-badge-progress-percentage {
    color: #4CAF50;
    font-weight: 600;
}

.va-badge-unlocked-date {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.75rem;
    font-style: italic;
}

.va-badge-new-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--va-gold);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--va-gold);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 1024px) {
    .va-badges-container[style*="grid-template-columns"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .va-badges-container[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .va-badges-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .va-badges-container[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Toast notification */
.va-badge-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid var(--va-gold);
    border-radius: 1rem;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    max-width: 380px;
    width: 90%;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.3s ease;
}

.va-badge-toast--show {
    transform: translateX(0);
    opacity: 1;
}

.va-badge-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    position: relative;
}

.va-badge-toast-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.va-badge-toast-text {
    flex: 1;
    min-width: 0;
}

.va-badge-toast-title {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-green-600, #2E7D32);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.va-badge-toast-name {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.va-badge-toast-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
}

.va-badge-toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.va-badge-toast-close:hover {
    background-color: #f5f5f5;
    color: #666;
}

/* Notice pour badges non vus */
.va-unseen-badges-notice {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, var(--purple-700, #8B5CF6), var(--blue-700, #3B82F6));
    color: white;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
    z-index: 99999;
    animation: slideInRight 0.5s ease;
    max-width: 320px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.va-unseen-badges-notice--hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.va-unseen-badges-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.va-unseen-badges-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.va-unseen-badges-text {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.va-unseen-badges-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.va-unseen-badges-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .va-badge-toast {
        left: 20px;
        right: 20px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .va-badge-toast--show {
        transform: translateY(0);
    }
    
    .va-unseen-badges-notice {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}