/* ═══════════════════════════════════════════════════════════════
   PêcheLive — Thème clair (v4)
   Activé par data-theme="light" sur <html>.
   !important nécessaire : le <style> inline dans chaque page
   est chargé APRÈS ce fichier externe et a une priorité plus haute.
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] {
  --bg:        #ffffff !important;
  --bg2:       #ffffff !important;
  --bg3:       #f1f5f9 !important;
  --surface:   #ffffff !important;
  --surface2:  #f8fafc !important;
  --border:    #e2e8f0 !important;
  --border2:   #cbd5e1 !important;
  --accent:    #22d3ee !important;
  --accent2:   #38bdf8 !important;
  --accent-dim: rgba(8,145,178,0.08) !important;
  --accent-glow: rgba(8,145,178,0.12) !important;
  --warn:      #ea580c !important;
  --danger:    #dc2626 !important;
  --gold:      #d97706 !important;
  --text:      #0f172a !important;
  --text2:     #334155 !important;
  --text3:     #94a3b8 !important;
}

/* ── Base ── */
[data-theme="light"] body  { background: #ffffff !important; color: #0f172a !important; }
[data-theme="light"] #page { background: #f8fafc !important; }

/* ── Bouton thème : style unifié sur toutes les pages ── */
[data-theme="light"] #theme-toggle {
  background: #0891b2 !important;
  color: #ffffff !important;
  border-color: #0891b2 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 4px 12px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
}
[data-theme="light"] #theme-toggle:hover {
  background: #0e7490 !important;
  border-color: #0e7490 !important;
}

/* ── Topbar (admin) ── */
[data-theme="light"] #topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .topbar-title { color: #0f172a !important; }

/* ── Sidebar ── */
[data-theme="light"] #sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .sidebar-logo { border-color: #e2e8f0 !important; }
[data-theme="light"] .sidebar-logo-text { color: #0f172a !important; }
[data-theme="light"] .sidebar-logo-text span { color: #22d3ee !important; }
[data-theme="light"] .sidebar-logo-sub { color: #94a3b8 !important; }
[data-theme="light"] .sidebar-section { color: #94a3b8 !important; letter-spacing: 1px !important; }
[data-theme="light"] .nav-item { color: #334155 !important; }
[data-theme="light"] .nav-item:hover { background: #f0f9ff !important; color: #0369a1 !important; }
[data-theme="light"] .nav-item.active { background: #e0f2fe !important; color: #0369a1 !important; font-weight: 700 !important; }
[data-theme="light"] .sidebar-footer { background: #f8fafc !important; border-top: 1px solid #e2e8f0 !important; }
[data-theme="light"] .user-pill { background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: #334155 !important; }
[data-theme="light"] .user-avatar { background: #0891b2 !important; color: #fff !important; }
[data-theme="light"] #concours-select { background: #f8fafc !important; color: #0f172a !important; border-color: #e2e8f0 !important; }

/* ── Formulaires ── */
[data-theme="light"] .form-input,
[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
[data-theme="light"] .form-input:focus,
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: #22d3ee !important;
  box-shadow: 0 0 0 3px rgba(34,211,238,0.15) !important;
  outline: none !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: #94a3b8 !important; }
[data-theme="light"] .form-label { color: #334155 !important; }

/* ── Boutons ── */
[data-theme="light"] .btn-green  { background: #0891b2 !important; color: #ffffff !important; border: none !important; }
[data-theme="light"] .btn-green:hover { background: #0e7490 !important; filter: none !important; }
[data-theme="light"] .btn-ghost  { background: #ffffff !important; color: #334155 !important; border-color: #cbd5e1 !important; }
[data-theme="light"] .btn-ghost:hover { background: #f1f5f9 !important; }
[data-theme="light"] .btn-blue   { background: #e0f2fe !important; color: #0369a1 !important; border-color: #bae6fd !important; }
[data-theme="light"] .btn-gold   { background: #f59e0b !important; color: #ffffff !important; }

/* ── Tables ── */
[data-theme="light"] .table-wrap    { background: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .table-header  { background: #f8fafc !important; border-bottom-color: #e2e8f0 !important; }
[data-theme="light"] .table-header-title { color: #0f172a !important; }
[data-theme="light"] table th { background: #f1f5f9 !important; color: #475569 !important; border-bottom-color: #e2e8f0 !important; }
[data-theme="light"] table td { border-bottom-color: #f1f5f9 !important; color: #0f172a !important; }
[data-theme="light"] tr:hover td { background: #f8fafc !important; }

/* ── Cartes dashboard ── */
[data-theme="light"] .stat-card { background: #ffffff !important; border-color: #e2e8f0 !important; }

/* ── Modales ── */
[data-theme="light"] #modal-overlay,
[data-theme="light"] #tuto-overlay { background: rgba(15,23,42,0.5) !important; }
[data-theme="light"] .modal,
[data-theme="light"] #tuto-box { background: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .modal-header { background: #f8fafc !important; border-bottom-color: #e2e8f0 !important; }
[data-theme="light"] .modal-title  { color: #0f172a !important; }
[data-theme="light"] .modal-footer { border-top-color: #e2e8f0 !important; background: #f8fafc !important; }

/* ── Tutos ── */
[data-theme="light"] .tuto-card { background: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .tuto-card:hover { border-color: #22d3ee !important; }
[data-theme="light"] .tuto-content { color: #0f172a !important; }
[data-theme="light"] .tuto-content h2 { border-color: #e2e8f0 !important; color: #0f172a !important; }
[data-theme="light"] .tuto-content blockquote { background: #f0f9ff !important; border-color: #22d3ee !important; color: #334155 !important; }
[data-theme="light"] .tuto-content code { background: #f1f5f9 !important; color: #0e7490 !important; }
[data-theme="light"] .tuto-cat-title { color: #64748b !important; }

/* ── Code ── */
[data-theme="light"] code { background: #f1f5f9 !important; color: #0e7490 !important; }
[data-theme="light"] pre  { background: #f8fafc !important; border-color: #e2e8f0 !important; }

/* ── Toast ── */
[data-theme="light"] #toast.show { background: #0f172a !important; color: #f8fafc !important; }

/* ── Liens ── */
[data-theme="light"] a { color: #0891b2; }

/* ── Aides ── */
[data-theme="light"] #help-btn { background: #f1f5f9 !important; border-color: #cbd5e1 !important; color: #0891b2 !important; }

/* ══════════════════════════════════════════════════════
   PAGE D'ACCUEIL (index.html) — couleurs hardcodées
   ══════════════════════════════════════════════════════ */

/* Topbar semi-transparente → blanc */
[data-theme="light"] .topbar {
  background: rgba(255,255,255,0.97) !important;
  border-bottom-color: #e2e8f0 !important;
}
[data-theme="light"] .topbar-logo { color: #0f172a !important; }
[data-theme="light"] .topbar-logo span { color: #22d3ee !important; }
[data-theme="light"] .topbar-nav a { color: #334155 !important; }
[data-theme="light"] .topbar-nav a:hover { color: #0891b2 !important; }
[data-theme="light"] .topbar-cta { background: #0891b2 !important; color: #fff !important; }
[data-theme="light"] .menu-toggle { color: #0f172a !important; border-color: #e2e8f0 !important; }

/* Hero */
[data-theme="light"] .hero { background: #f0f9ff !important; }
[data-theme="light"] .hero h1, [data-theme="light"] .hero h1 span { color: #0f172a !important; }
[data-theme="light"] .hero p { color: #334155 !important; }
[data-theme="light"] .hero-badge { background: #e0f2fe !important; border-color: #bae6fd !important; color: #0369a1 !important; }
[data-theme="light"] .hero-cta { background: #0891b2 !important; color: #fff !important; }
[data-theme="light"] .hero-cta-secondary { background: #fff !important; color: #0891b2 !important; border-color: #cbd5e1 !important; }

/* Sections */
[data-theme="light"] body { background: #ffffff !important; }
[data-theme="light"] section, [data-theme="light"] .section { background: #ffffff !important; }
[data-theme="light"] section[style*="background: var(--bg2)"] { background: #f8fafc !important; }
[data-theme="light"] .section-label { color: #0891b2 !important; }
[data-theme="light"] .section-title { color: #0f172a !important; }
[data-theme="light"] .section-sub { color: #475569 !important; }

/* Cards fonctionnalités, étapes, FAQ */
[data-theme="light"] .feature-card { background: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .feature-card:hover { border-color: rgba(34,211,238,0.5) !important; }
[data-theme="light"] .feature-card h3 { color: #0f172a !important; }
[data-theme="light"] .feature-card p  { color: #475569 !important; }
[data-theme="light"] .feature-icon    { background: #e0f2fe !important; }
[data-theme="light"] .step  { background: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .step h3 { color: #0f172a !important; }
[data-theme="light"] .step p  { color: #475569 !important; }
[data-theme="light"] .faq-item  { border-color: #e2e8f0 !important; }
[data-theme="light"] .faq-q     { color: #0f172a !important; }
[data-theme="light"] .faq-answer { color: #475569 !important; background: #f8fafc !important; }

/* Footer */
[data-theme="light"] footer { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #475569 !important; }

/* Modal contact */
[data-theme="light"] .contact-modal { background: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .contact-modal input,
[data-theme="light"] .contact-modal textarea { background: #f8fafc !important; border-color: #cbd5e1 !important; color: #0f172a !important; }

/* Wave separator */
[data-theme="light"] .wave-separator { background: #f8fafc !important; }
[data-theme="light"] .wave-separator svg path { fill: #f8fafc !important; }

/* ═══════════════════════════════
   CAMÉRA : toujours sombre
   ═══════════════════════════════ */
[data-theme="light"] .pc-overlay { background: #000 !important; }

/* ══════════════════════════════════════════════
   BOUTON THÈME FLOTTANT — centré en haut
   Injecté par theme.js sur toutes les pages
   connectées (pas sur index.html)
   ══════════════════════════════════════════════ */
#pl-theme-widget {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99998;
  background: rgba(10,25,41,0.85);
  color: #22d3ee;
  border: 1px solid #22d3ee;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Outfit', system-ui, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
#pl-theme-widget:hover {
  background: #22d3ee;
  color: #0a1929;
  box-shadow: 0 4px 12px rgba(34,211,238,0.3);
}

/* En mode clair : fond blanc, texte bleu marine */
[data-theme="light"] #pl-theme-widget {
  background: rgba(255,255,255,0.95) !important;
  color: #0891b2 !important;
  border-color: #0891b2 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
}
[data-theme="light"] #pl-theme-widget:hover {
  background: #0891b2 !important;
  color: #ffffff !important;
}

/* Masquer les anciens boutons theme-toggle dans les headers
   (remplacés par le widget flottant) */
#theme-toggle { display: none !important; }

/* Bouton thème dans la nav de index.html */
[data-theme="light"] #index-theme-toggle {
  background: #0891b2 !important;
  color: #ffffff !important;
  border-color: #0891b2 !important;
  font-weight: 600;
}
