:root {
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --accent-color: #ffffff;
  --accent-hover: #d1d1d1;
}

/* --- Thème Sombre (Par défaut) --- */
html[data-theme="dark"] {
  --bg-main: #0a0b0e;
  --panel-bg: rgba(18, 20, 29, 0.9);
  --header-bg: rgba(8, 8, 10, 0.95);
  --footer-bg: rgba(17, 17, 20, 0.95);
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.1);
  --filter-bg: rgba(255, 255, 255, 0.05);
  --filter-border: rgba(255, 255, 255, 0.1);
  --filter-text: #ffffff;
}

/* --- Thème Clair (Light Mode Contrasté & Propre) --- */
html[data-theme="light"] {
  --bg-main: #f1f5f9;
  --panel-bg: rgba(255, 255, 255, 0.9);
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: rgba(241, 245, 249, 0.95);
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: rgba(0, 0, 0, 0.1);
  --filter-bg: rgba(0, 0, 0, 0.05);
  --filter-border: rgba(0, 0, 0, 0.15);
  --filter-text: #0f172a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Background Animé / Vidéo Fixe --- */
.bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -2;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: brightness(0.5) contrast(1.1);
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 10, 0.75);
  z-index: -1;
  pointer-events: none;
}

/* --- Header & Nav Responsive (Thématisé) --- */
header, .header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 85px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  max-height: 65px;
}

.logo-container img, .logo-icon, .site-logo {
  max-height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-main);
  text-transform: uppercase;
}

/* Nav Desktop */
nav {
  display: flex;
  align-items: center;
}

nav a, .nav-link {
  color: var(--text-main);
  text-decoration: none;
  margin-left: 25px;
  transition: color 0.3s, border-color 0.3s;
  font-size: 0.95rem;
  letter-spacing: 1px;
  background: none;
  border: none;
  cursor: pointer;
}

nav a:hover, nav a.active, .nav-link:hover, .nav-link.active {
  color: var(--text-main);
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 4px;
}

/* Bouton Hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  z-index: 1100;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  transition: all 0.3s ease;
}

/* --- Main Layout SPA --- */
main, .main-container {
  margin-top: 90px;
  padding: 0 15px 40px 15px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  flex: 1;
  width: 100%;
}

#appContent {
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
  min-height: 60vh;
}

#appContent.fade-out {
  opacity: 0;
}

/* --- Category Filters & Sub-Tags --- */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn, .category-filter-btn {
  background: var(--filter-bg);
  border: 1px solid var(--filter-border);
  color: var(--filter-text);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.85rem;
}

.filter-btn:hover, .filter-btn.active, .category-filter-btn:hover, .category-filter-btn.active {
  background: var(--text-main) !important;
  color: var(--bg-main) !important;
  border-color: var(--text-main) !important;
  font-weight: bold;
}

.sub-tags-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -5px;
  margin-bottom: 20px;
}

.tag-chip, .tag-btn {
  background: var(--filter-bg);
  border: 1px solid var(--filter-border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* --- Gallery Grid Fluid (Responsive Mobile) --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }
}

.gallery-item {
  position: relative;
  background: var(--panel-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  aspect-ratio: 2 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  pointer-events: none;
}

.gallery-item img.censored-thumb {
  filter: blur(14px) brightness(0.7);
  transform: scale(1.1);
}

.badge-18 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 10, 12, 0.9);
  color: #ff4757;
  border: 1px solid #ff4757;
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.75rem;
  z-index: 5;
  pointer-events: none;
}

.overlay-protection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: transparent;
}

/* --- Page Headers --- */
.page-section {
  padding: 5px 0 20px 0;
}

h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* --- Page À Propos (Responsive Mobile) --- */
.apropos-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

/* Masqué par défaut sur mobile pour éviter la superposition */
.global-falling-bg {
  display: none !important;
}

@media (min-width: 900px) {
  .global-falling-bg {
    display: grid !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0 10px;
    opacity: 0.32;
    filter: grayscale(40%) contrast(110%);
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
}

.falling-col {
  display: flex;
  flex-direction: column;
  gap: 30px;
  animation: globalFallAnimation linear infinite;
}

.col-1 { animation-duration: 28s; animation-delay: 0s; }
.col-2 { animation-duration: 38s; animation-delay: -12s; }
.col-3 { animation-duration: 30s; animation-delay: -5s; }
.col-4 { animation-duration: 42s; animation-delay: -18s; }
.col-5 { animation-duration: 33s; animation-delay: -8s; }

.falling-card {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
}

.falling-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

@keyframes globalFallAnimation {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0%); }
}

.apropos-hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 25px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

@media (min-width: 850px) {
  .apropos-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    padding: 40px;
  }
}

.apropos-img-box {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

@media (min-width: 850px) {
  .apropos-img-box {
    max-width: 100%;
  }
}

.apropos-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apropos-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.apropos-tag {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
  text-align: center;
}

@media (min-width: 850px) {
  .apropos-tag { text-align: left; }
}

.apropos-content h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 15px;
  letter-spacing: 1px;
  color: var(--text-main);
}

@media (min-width: 850px) {
  .apropos-content h2 { text-align: left; font-size: 2rem; }
}

.apropos-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: center;
}

@media (min-width: 850px) {
  .apropos-bio { text-align: left; }
}

.apropos-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

@media (min-width: 850px) {
  .apropos-highlights { justify-content: flex-start; }
}

.hl-item {
  background: var(--filter-bg);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-main);
}

.apropos-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 500px) {
  .apropos-actions {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 850px) {
  .apropos-actions { justify-content: flex-start; }
}

.btn-hero {
  padding: 10px 20px;
  background: var(--text-main);
  color: var(--bg-main);
  border: 1px solid var(--text-main);
  border-radius: 30px;
  font-weight: bold;
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-hero-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* --- Pricing Grid (Responsive) --- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 650px) {
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.price-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.price-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.price-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blurred-tarif-img {
  filter: blur(10px) brightness(0.7);
}

.price-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.price-card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.price-card-body .price {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.price-card-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 20px 0 !important;
  flex-grow: 1;
}

.price-card-list li {
  color: var(--text-muted) !important;
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.price-card-action {
  margin-top: auto;
  width: 100%;
}

.price-card-action .btn-hero {
  width: 100%;
  display: block;
}

/* --- Avis Clients & Formulaires (Responsive) --- */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

@media (min-width: 650px) {
  .reviews-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.review-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 10px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.review-stars { color: #ffa502; font-size: 1rem; }
.review-role { font-size: 0.7rem; background: var(--filter-bg); padding: 2px 8px; border-radius: 20px; color: var(--text-muted); }
.review-text { font-style: italic; line-height: 1.5; margin-bottom: 12px; color: var(--text-muted); font-size: 0.9rem; }
.review-author { font-weight: bold; text-align: right; color: var(--text-main); font-size: 0.85rem; }

.review-form-container, .contact-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--panel-bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.8rem; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 6px;
  font-size: 0.9rem;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--text-main);
  border: none;
  color: var(--bg-main);
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

/* --- Modals & Lightbox (Responsive Mobile) --- */
.modal-overlay, .modal, .lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.modal-overlay.active, .modal.active, .lightbox-overlay.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

/* Boutons Lightbox adaptés mobile */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(18, 20, 29, 0.9);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  z-index: 3100;
}

.nav-prev { left: 10px; }
.nav-next { right: 10px; }

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(18, 20, 29, 0.9);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3100;
}

.lightbox-credit { margin-top: 10px; z-index: 3100; text-align: center; }
.lightbox-credit a {
  color: #ffffff !important;
  background: var(--panel-bg);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  font-size: 0.8rem;
}

.modal-card, .legal-card {
  position: relative !important;
  background: var(--panel-bg);
  color: var(--text-main);
  padding: 30px 20px 20px 20px;
  border-radius: 14px;
  text-align: left;
  max-width: 95vw;
  width: 100%;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-close, .legal-close, .close-btn, .modal-card > [class*="close"] {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  background: var(--filter-bg) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
  font-size: 1rem !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 10 !important;
}

/* --- Footer & Cookies (Responsive) --- */
footer, .footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 15px 20px;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* --- Bandeau Cookies (Corrigé Mobile) --- */
.cookie-banner {
  position: fixed;
  bottom: -150px;
  left: 0;
  width: 100%;
  background: var(--panel-bg);
  border-top: 1px solid var(--border-color);
  padding: 15px;
  z-index: 4000;
  visibility: hidden;
  opacity: 0;
  transition: bottom 0.4s ease-in-out, opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.cookie-banner.active {
  bottom: 0;
  visibility: visible;
  opacity: 1;
}

.cookie-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-size: 0.85rem;
}

.btn-cookie {
  background: var(--text-main);
  color: var(--bg-main);
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* --- Menu Mobile Hamburger --- */
@media (max-width: 900px) {
  header, .header {
    padding: 10px 15px;
    max-height: 70px;
  }
  .nav-toggle { display: flex; }
  nav, #navMenu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 240px;
    height: calc(100vh - 70px);
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 20px;
    transition: right 0.3s ease-in-out;
  }
  nav.active, #navMenu.active { right: 0; }
  nav a, .nav-link { margin: 0 0 20px 0; font-size: 1rem; width: 100%; }
}