/* =====================================================
   CSS OPTIMISÉ - Variables et Styles Réorganisés
===================================================== */

/* ==================== VARIABLES ==================== */
:root {
  /* Couleurs */
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-bg: #e8f0ff;

  --color-purple: #8b5cf6;
  --color-purple-bg: #f2ecff;

  --color-red: #ef4444;
  --color-red-bg: #fdebea;

  --color-white: #ffffff;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-hover-blue: 0 15px 35px rgba(37, 99, 235, 0.2);
  --shadow-hover-red: 0 15px 35px rgba(239, 68, 68, 0.2);
  --shadow-hover-purple: 0 15px 35px rgba(139, 92, 246, 0.25);
  --shadow-hover-gray: 0 15px 35px rgba(0, 0, 0, 0.12);

  /* Bordures */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --radius-full: 999px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-smooth: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Tailles de polices */
  --font-xs: 0.65rem;
  --font-sm: 0.85rem;
  --font-base: 1rem;
  --font-lg: 1.1rem;
  --font-xl: 1.3rem;
  --font-2xl: 1.8rem;
  --font-3xl: 2.2rem;
}

/* ==================== RESET & BASE ==================== */
.thema-page {
  background: linear-gradient(180deg, #ffffff 0%, #f3f5ff 40%, #f8f3f3 100%);
  min-height: 100vh;
  padding-top: 15px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==================== HEADER COMPACT ==================== */
.thema-header {
  padding: 0.75rem 0 1rem;
  margin-bottom: 1rem;
}

.header-minimal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* Navigation avec sélecteur */
.thema-navigation {
  flex: 1;
  max-width: 500px;
}

.thema-nav-label {
  display: block;
  font-size: var(--font-xs);
  font-weight: 800;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.select-premium-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-premium {
  width: 100%;
  padding: 0.6rem 2.8rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-gray-200);
  background: var(--color-white);
  font-weight: 800;
  font-size: var(--font-lg);
  color: var(--color-gray-800);
  cursor: pointer;
  appearance: none;
  transition: all var(--transition-base);
}

.select-premium:hover {
  border-color: var(--color-primary-light);
  background-color: #f8faff;
}

/* Fix pour les icônes Lucide */
.select-premium-wrapper svg {
  width: 18px !important;
  height: 18px !important;
  position: absolute;
  pointer-events: none;
}

.select-icon-left {
  left: 1rem;
  color: var(--color-primary-light);
}

.select-icon-right {
  right: 1rem;
  color: var(--color-gray-400);
}

/* Bouton Retour minimaliste */
.btn-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-gray-600);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-back-pill:hover {
  background: var(--color-gray-200);
  transform: translateX(-2px);
}

.btn-back-pill svg {
  width: 18px !important;
  height: 18px !important;
}

/* ==================== GRILLE D'ACTIVITÉS ==================== */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  align-items: stretch;
}

@media (max-width: 850px) {
  .activity-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==================== CARTES D'ACTIVITÉ ==================== */
.activity-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 25px;
  transition: all var(--transition-smooth);
  width: 100%;
  text-align: center;
  color: var(--color-gray-900);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(35px);
  animation: fadeUp 0.5s forwards ease-out;
}

.activity-card:hover {
  transform: translateY(-8px);
}

/* Animation d'entrée */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activity-card:nth-child(1) {
  animation-delay: 0.05s;
}

.activity-card:nth-child(2) {
  animation-delay: 0.15s;
}

.activity-card:nth-child(3) {
  animation-delay: 0.25s;
}

.activity-card:nth-child(4) {
  animation-delay: 0.35s;
}

/* Images des cartes */
.card-icon-bg {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon-bg img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.activity-card:hover .card-icon-bg img {
  transform: scale(1.1);
}

/* Typographie des cartes */
.activity-card h5 {
  font-size: var(--font-xl);
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--color-gray-900);
}

.activity-card p {
  font-size: 0.95rem;
  color: var(--color-gray-600);
  line-height: 1.6;
  margin: 0;
  max-width: 300px;
}

/* ==================== VARIANTES DE CARTES ==================== */
.card-blue {
  background-color: var(--color-primary-bg);
}

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

.card-blue img {
  filter: brightness(0.9) contrast(1.3) drop-shadow(0 4px 6px rgba(0, 85, 255, 0.18));
}

.card-white {
  background-color: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
}

.card-white:hover {
  box-shadow: var(--shadow-hover-gray);
}

.card-white img {
  filter: brightness(0.85) contrast(1.25) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.card-red {
  background-color: var(--color-red-bg);
}

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

.card-red img {
  filter: brightness(0.9) contrast(1.3) drop-shadow(0 4px 6px rgba(255, 60, 60, 0.18));
}

.card-purple {
  background-color: var(--color-purple-bg);
}

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

.card-purple img {
  filter: brightness(0.9) contrast(1.3) drop-shadow(0 4px 6px rgba(125, 80, 255, 0.2));
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .header-minimal {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .btn-back-pill {
    order: -1;
  }

  .activity-card {
    padding: 30px 20px;
  }

  .card-icon-bg {
    height: 140px;
  }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
  .activity-grid {
    gap: 1rem;
    margin-top: 2rem;
  }

  .activity-card {
    padding: 25px 15px;
  }

  .card-icon-bg {
    height: 120px;
  }

  .activity-card h5 {
    font-size: 1.2rem;
  }
}