/**
 * Styles pour le système de vidéos clips — assets/samples/clips/
 * Tous les sélecteurs de contenu sont préfixés par .clips-page
 * pour éviter les conflits avec style_base.css
 */

/* ===== VARIABLES THÈME clips ===== */
:root[data-theme="dark"] {
  --bg-primary: #111;
  --bg-secondary: #111;
  --text-primary: #fff;
  --text-secondary: #ccc;
  --accent: #d4d3d2;
  --tab-border: #666;
  --tab-border-subtle: rgba(255, 255, 255, 0.1);
  --tab-active-bg: #8B0000;
  --overlay-bg: rgba(0, 0, 0, 0.95);
}

:root[data-theme="light"] {
  --bg-primary: #fff;
  --bg-secondary: #fff;
  --text-primary: #111;
  --text-secondary: #666;
  --accent: #333;
  --tab-border: #999;
  --tab-border-subtle: rgba(0, 0, 0, 0.1);
  --tab-active-bg: #8B0000;
  --overlay-bg: rgba(255, 255, 255, 0.95);
}

/* ===== RESET MARGES main imposées par style_base.css ===== */
main:has(.clips-page) {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
}


/* ===== FOOTER clips ===== */
/* style_base.css n'a pas de règles footer — on définit ici */
.clips-page ~ footer,
body:has(.clips-page) footer {
  background: transparent;
  max-width: 800px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 60px 40px !important;
  text-align: center !important;
  border-top: 1px solid #8B0000;
  margin-top: 80px;
}

body:has(.clips-page) footer a {
  color: var(--accent, #333);
  text-decoration: none;
}

/* ===== SHOOTINGS SECTION ===== */


.clips-page .intro {
  max-width: 800px !important;
  margin: 40px auto 30px !important;
  padding: 0 40px !important;
  text-align: center !important;
  font-size: unset !important;
  line-height: unset !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

.clips-page .intro h1 {
  font-size: 2.5em !important;
  margin-bottom: 20px !important;
  font-weight: 300 !important;
  line-height: 1.2 !important;
}

.clips-page .intro-text p {
  font-size: 1.1em !important;
  line-height: 1.8 !important;
  color: var(--text-secondary);
  text-align: left !important;
  margin: 0 !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

/* ===== ONGLETS INTERCALAIRES ===== */
.clips-page .tabs-container {
  max-width: 1600px;
  margin: 60px auto 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
}

.clips-page .tabs-wrapper {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto auto;
  gap: 0;
  width: 100%;
}

.clips-page .tab {
  /* Reset complet des styles button de style_base.css */
  position: relative;
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--tab-border-subtle) !important;
  border-bottom: none !important;
  border-radius: 0 !important;
  border-top-right-radius: 12px !important;
  border-top-left-radius: 0 !important;
  padding: 15px 10px 18px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  min-height: unset !important;
  min-width: unset !important;
  display: block !important;
  align-items: unset !important;
  justify-content: unset !important;
  text-align: center !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: -1px;
  margin-bottom: -1px;
  transform-origin: bottom;
  width: 100%;
}

.clips-page .tab:hover {
  transform: translateY(-3px) scale(0.95);
  z-index: 5;
  border-color: rgba(255, 255, 255, 0.25);
  animation: none;
}

.clips-page .tab.active {
  background: var(--tab-active-bg, #8B0000) !important;
  color: #fff !important;
  z-index: 10;
  border-color: var(--tab-active-bg, #8B0000) !important;
}

@keyframes breathing {
  0%   { opacity: 0.70; transform: scale(1); }
  50%  { opacity: 1;    transform: scale(1.08); }
  100% { opacity: 0.70; transform: scale(1); }
}

.clips-page .tab.active {
  animation: breathing 3.9s ease-in-out infinite;
  transform-origin: center bottom;
}
.clips-page .tab:hover {
  animation: breathing 1.2s ease-in-out infinite;
  transform-origin: center bottom;
}

/* ===== GRILLE DE VIGNETTES ===== */
.clips-page .videos-grid-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0;
  background: var(--bg-secondary);
  min-height: 400px;
}

.clips-page .videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 400px);
  gap: 0;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
  50%  { opacity: 1; }
  to   { opacity: 1; transform: scale3d(1, 1, 1); }
}

.clips-page .video-thumbnail {
  position: relative;
  width: 400px;
  height: 400px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: scale3d(0.3, 0.3, 0.3);
}

.clips-page .video-thumbnail.visible {
  animation: zoomIn 0.6s ease-out forwards;
}

.clips-page .video-thumbnail.animated {
  opacity: 1;
  transform: scale3d(1, 1, 1);
  animation: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clips-page .video-thumbnail.animated:hover {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.clips-page .video-thumbnail img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.clips-page .video-overlay {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
  padding: 20px;
  transition: opacity 0.3s ease;
}

.clips-page .video-overlay-title {
  color: #fff;
  font-size: 16px !important;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.clips-page .play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 70px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #111;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.clips-page .video-thumbnail:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.clips-page .play-icon::before {
  content: '▶';
  display: block;
  margin-left: 4px;
}

.clips-page .no-videos {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
  font-size: 1.2em;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10000;
}
.lightbox.active { display: block; }

.lightbox-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--overlay-bg);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  margin: 50px auto;
  z-index: 10001;
}

.lightbox-close {
  position: absolute;
  top: -50px; right: 0;
  background: none; border: none;
  color: var(--text-primary);
  font-size: 40px;
  cursor: pointer;
  width: 50px; height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.lightbox-close:hover { transform: rotate(90deg); }

.lightbox-video-container {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
}
.lightbox-video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.lightbox-title {
  margin-top: 20px;
  font-size: 1.3em;
  text-align: center;
  color: var(--text-primary);
}

/* ===== À PROPOS ===== */
.clips-page .about-section {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 40px;
}

.clips-page .about-section h2 {
  font-size: 2em !important;
  margin-bottom: 30px !important;
  text-align: center !important;
  font-weight: 300 !important;
  line-height: 1.2 !important;
}

.clips-page .about-content p {
  font-size: 1.1em !important;
  line-height: 1.8 !important;
  color: var(--text-secondary);
  margin-bottom: 20px !important;
  text-align: left !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

.clips-page .director-profile {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.clips-page .director-photo {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.clips-page .director-bio p {
  margin: 0 !important;
  text-align: left !important;
  font-size: 1.1em !important;
  line-height: 1.8 !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

/* ===== SECTION SHOOTINGS ===== */
.shootings-section {
  max-width: 800px;
  margin: 60px auto 40px;
  padding: 0 40px;
}

.shootings-divider {
  width: 100%;
  height: 1px;
  background: #8B0000;
  margin-bottom: 30px;
}

.shootings-section p {
  font-size: 1.1em !important;
  line-height: 1.8 !important;
  color: var(--text-secondary);
  text-align: justify !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

.shootings-section a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.shootings-section a:hover { text-decoration: underline; }

/* Le footer utilise les styles de style_base.css */


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .clips-page .intro { margin: 40px auto 20px; padding: 0 20px; }
  .clips-page .intro h1 { font-size: 1.8em !important; }
  .clips-page .intro-text p { font-size: 1em !important; }
  .clips-page .tabs-container { padding: 0 10px; margin: 40px auto 0; }
  .clips-page .tab { padding: 10px 15px 13px; font-size: 13px; margin-right: -8px; border-top-right-radius: 8px; }
  .clips-page .videos-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: 100%; }
  .clips-page .video-thumbnail { width: 100%; height: auto; padding-bottom: 100%; }
  .clips-page .video-thumbnail img { position: absolute; }
  .clips-page .video-overlay { padding: 10px; }
  .clips-page .video-overlay-title { font-size: 12px !important; }
  .clips-page .play-icon { width: 50px; height: 50px; font-size: 20px; }
  .clips-page .about-section { padding: 0 20px; margin: 60px auto; }
  .shootings-section { padding: 0 20px; margin: 40px auto 20px; }
  .lightbox-content { width: 95%; margin: 20px auto; }
  .lightbox-close { top: -40px; font-size: 30px; }
}

@media (max-width: 480px) {
  .clips-page .intro h1 { font-size: 1.5em !important; }
  .clips-page .tab { padding: 8px 12px 11px; font-size: 12px; }
  .clips-page .videos-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ===== FOOTER LINKS - neutralise inline-flex de style_base.css ===== */
body:has(.clips-page) footer a[href^="mailto:"],
body:has(.clips-page) footer a[href^="tel:"],
body:has(.clips-page) footer a[href^="https://wa.me"] {
  display: inline !important;
  align-items: unset !important;
  gap: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  min-height: unset !important;
}

