/* ---- theme.css ----
   Mode nuit : activé par theme.js avec html[data-theme="dark"].
   Chargé après les CSS de chaque page : on ne fait que remplacer les couleurs. */

/* ---------- bouton soleil / lune ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.3s ease;
}
.theme-toggle:hover { opacity: 1; transform: rotate(-15deg); }
.theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

/* galleries / contact: pinned top-right */
.theme-toggle--corner {
  position: fixed;
  top: 1.25rem;
  right: 2rem;
  z-index: 101;
  color: var(--ink);
}
@media (max-width: 560px) {
  .theme-toggle--corner { right: 1.1rem; }
}

/* mode jour : on déclare explicitement « clair » pour que le navigateur du téléphone
   (ex. Samsung Internet / Chrome « mode sombre forcé ») n'assombrisse pas les photos tout seul */
:root { color-scheme: light; }

/* ---------- palette nuit (toutes les pages) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-cream: #0f0d0c;
  --ink:      #ece8e4;
  --ink-soft: #9c958f;
  --accent:   #c9785a;
}

/* logos noirs -> blancs (galeries, contact) */
html[data-theme="dark"] .nav-logo img[src*="LOGO N"] { filter: invert(1); }

/* fines lignes de séparation */
html[data-theme="dark"] .tagline,
html[data-theme="dark"] .page-footer { border-top-color: rgba(255, 255, 255, 0.08); }

/* ---------- galeries (Mode, Concert, Event, Produit) ---------- */
html[data-theme="dark"] .stack-label { text-shadow: 0 0 10px rgba(0, 0, 0, 0.55); }
html[data-theme="dark"] .stack-media { box-shadow: 0 64px 75px -40px rgba(0, 0, 0, 0.9); }

/* visionneuse plein écran */
html[data-theme="dark"] .tilt-viewer { background: #0b0908; }
html[data-theme="dark"] .tv-caption { color: #ece8e4; }
html[data-theme="dark"] .tv-close { color: #ffffff; }
html[data-theme="dark"] .tv-media { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9); }

/* ---------- About ---------- */
html[data-theme="dark"] .about-stats {
  background: rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ---------- Contact (calendrier) ---------- */
html[data-theme="dark"] body.page-contact {
  --paper:     #191614;
  --line:      rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);
  --hover:     rgba(255, 255, 255, 0.06);
  --secondary: #2a2421;
  --danger:    #f07167;
}
html[data-theme="dark"] .page-contact .btn-primary { background: #a85a3f; }
html[data-theme="dark"] .page-contact .btn-primary:hover { background: #bd6a4d; }
html[data-theme="dark"] .page-contact .day-cell.is-out { background: rgba(255, 255, 255, 0.025); }
html[data-theme="dark"] .page-contact .day-cell.drop-on,
html[data-theme="dark"] .page-contact .tcell.drop-on,
html[data-theme="dark"] .page-contact .day-slot.drop-on { background: rgba(201, 120, 90, 0.16); }
html[data-theme="dark"] .page-contact .dlg { background: rgba(0, 0, 0, 0.6); }

/* ---------- logos « They trusted me » ----------
   Logos sombres sur fond transparent -> éclaircis en gardant leurs couleurs
   (invert + hue-rotate). Les logos sur fond carré foncé (dose, laPlace, OKX) restent tels quels. */
html[data-theme="dark"] .logo-item[src*="Fuego"],
html[data-theme="dark"] .logo-item[src*="IMBH"],
html[data-theme="dark"] .logo-item[src*="Break Everything"],
html[data-theme="dark"] .logo-item[src*="Paris_La"] { filter: invert(1) hue-rotate(180deg); }
