/* ============================================================
   Tarteaucitron Custom CSS - InvestirSansMillions
   Adaptation au thème dark/light du site
   Phase 42 - 08/05/2026
   ============================================================ */

/* ===== Bandeau d'alerte (en bas de l'écran) ===== */

/* Mode dark (par défaut sur le site) */
#tarteaucitronAlertBig {
  background: #1f2937 !important; /* dark-800 */
  color: #f9fafb !important;
  border-top: 2px solid #3b82f6 !important; /* primary-500 */
  padding: 20px !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
}

#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
  color: #f9fafb !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* Mode light (si l'utilisateur a choisi le thème clair) */
html:not(.dark) #tarteaucitronAlertBig {
  background: #ffffff !important;
  color: #111827 !important;
  border-top: 2px solid #3b82f6 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
}

html:not(.dark) #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
  color: #111827 !important;
}

/* ===== Boutons (Tout accepter / Tout refuser / Personnaliser) ===== */

#tarteaucitronAlertBig button,
#tarteaucitronAlertBig #tarteaucitronCloseAlert,
#tarteaucitronAlertBig #tarteaucitronPersonalize,
#tarteaucitronAlertBig #tarteaucitronAllDenied2 {
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  margin: 5px !important;
}

/* Bouton "Tout accepter" - couleur primaire */
#tarteaucitronPersonalize,
.tarteaucitronAllow {
  background: #3b82f6 !important; /* primary-500 */
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
}

#tarteaucitronPersonalize:hover,
.tarteaucitronAllow:hover {
  background: #2563eb !important; /* primary-600 */
  border-color: #2563eb !important;
}

/* Bouton "Tout refuser" - neutre */
#tarteaucitronAllDenied2,
.tarteaucitronDeny {
  background: transparent !important;
  color: inherit !important;
  border: 1px solid #6b7280 !important; /* gray-500 */
}

#tarteaucitronAllDenied2:hover,
.tarteaucitronDeny:hover {
  background: rgba(107, 114, 128, 0.1) !important;
}

/* Bouton "Personnaliser" - secondaire */
#tarteaucitronCloseAlert {
  background: transparent !important;
  color: inherit !important;
  border: 1px solid #6b7280 !important;
}

#tarteaucitronCloseAlert:hover {
  background: rgba(107, 114, 128, 0.1) !important;
}

/* ===== Panneau de gestion détaillée (ouvert via "Gérer mes cookies") ===== */

/* Mode dark */
#tarteaucitron {
  font-family: 'Inter', system-ui, sans-serif !important;
}

#tarteaucitron #tarteaucitronServices,
#tarteaucitron #tarteaucitronInfo,
#tarteaucitron .tarteaucitronBorder,
#tarteaucitronRoot div#tarteaucitron {
  background: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #374151 !important;
}

#tarteaucitron #tarteaucitronClosePanel {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

#tarteaucitron .tarteaucitronTitle {
  background: #111827 !important;
  color: #f9fafb !important;
}

#tarteaucitron .tarteaucitronTitle button {
  color: #f9fafb !important;
}

#tarteaucitron .tarteaucitronH1,
#tarteaucitron .tarteaucitronH2,
#tarteaucitron .tarteaucitronH3,
#tarteaucitron .tarteaucitronH4 {
  color: #f9fafb !important;
}

#tarteaucitron .tarteaucitronAsk {
  background: #111827 !important;
  border-color: #374151 !important;
}

/* Mode light - panneau */
html:not(.dark) #tarteaucitron #tarteaucitronServices,
html:not(.dark) #tarteaucitron #tarteaucitronInfo,
html:not(.dark) #tarteaucitron .tarteaucitronBorder,
html:not(.dark) #tarteaucitronRoot div#tarteaucitron {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #e5e7eb !important;
}

html:not(.dark) #tarteaucitron .tarteaucitronTitle {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

html:not(.dark) #tarteaucitron .tarteaucitronTitle button {
  color: #111827 !important;
}

html:not(.dark) #tarteaucitron .tarteaucitronH1,
html:not(.dark) #tarteaucitron .tarteaucitronH2,
html:not(.dark) #tarteaucitron .tarteaucitronH3,
html:not(.dark) #tarteaucitron .tarteaucitronH4 {
  color: #111827 !important;
}

html:not(.dark) #tarteaucitron .tarteaucitronAsk {
  background: #f9fafb !important;
  border-color: #e5e7eb !important;
}

/* ===== Boutons accept/deny dans le panneau détaillé ===== */

#tarteaucitron .tarteaucitronAllow {
  background: #10b981 !important; /* green-500 */
  color: #ffffff !important;
}

#tarteaucitron .tarteaucitronDeny {
  background: #ef4444 !important; /* red-500 */
  color: #ffffff !important;
}

/* ===== Liens dans la bannière ===== */

#tarteaucitronAlertBig a,
#tarteaucitron a {
  color: #3b82f6 !important;
  text-decoration: underline !important;
}

#tarteaucitronAlertBig a:hover,
#tarteaucitron a:hover {
  color: #60a5fa !important;
}

/* ===== Responsive mobile ===== */

@media (max-width: 768px) {
  #tarteaucitronAlertBig {
    padding: 15px !important;
  }
  
  #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
    font-size: 13px !important;
  }
  
  #tarteaucitronAlertBig button {
    width: 100% !important;
    margin: 5px 0 !important;
  }
}
