/*
Theme Name: Clement Photo
Theme URI: http://localhost/clementpetiteau/
Author: Antigravity
Author URI: #
Description: Thème WordPress One-page "Apple Style" Dark Mode pour photographe d'architecture
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clement-photo
*/

/* Reset & Base Styles */
:root {
  --bg-color: #05141e; /* Très sombre bleuté */
  --text-color: #f7f7ff; /* Ghost White */
  --text-muted: #d5d5d8; /* Dust Grey */
  --accent-color: #0078a3; /* Cerulean */
  --accent-light: #7cb8d1; /* Sky Reflection */
  --nav-bg: rgba(5, 20, 30, 0.7);
  --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--text-muted);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.8rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center {
  text-align: center;
}

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

/* Elementor Override */
.elementor-compatible-area {
  width: 100%;
  padding-top: 60px; /* offset for sticky header */
}

/* Header & Glassmorphism Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.brand-logo {
  display: block;
  max-width: 150px;
  height: auto;
  max-height: 50px;
  object-fit: contain;
}

.brand-logo.logo-jpg {
  width: 50px;
  height: 80px;
  max-height: none;
  object-fit: cover;
  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.site-brand {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links li a {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-color);
  opacity: 0.8;
  padding: 10px;
}

.nav-links li a:hover {
  opacity: 1;
  color: #7cb8d1;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 1;
}

/* Portfolio Section (Masonry Grid) */
.portfolio-masonry {
  column-count: 3;
  column-gap: 1.5rem;
  margin-top: 3rem;
  width: 100%;
}

.portfolio-masonry .portfolio-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #111;
  /* Retrait du recadrage (aspect-ratio/max-height) pour afficher la taille native */
}

.portfolio-masonry .portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-masonry .portfolio-item:hover img {
  transform: scale(1.05);
}

/* About & Contact Section */
.about-section, .contact-section {
  background-color: #0a0a0a;
}

/* Contact Button Fix for WordPress defaults */
.contact-section a {
  position: relative;
  z-index: 10;
  overflow: hidden;
  background-color: var(--accent-light) !important;
  color: #05141e !important;
}
.contact-section a::before, .contact-section a::after {
  display: none !important;
}

/* Effet de Superposition (Scroll Stacking) */
/*
   body: overflow-x: clip pour éviter le scroll horizontal,
   mais SURTOUT pas overflow: hidden sur Elementor, sinon STICKY est cassé !
*/
html, body {
  overflow-x: clip;
}

.elementor, .elementor-section-wrap {
  overflow: visible !important;
}

/* ---------------------------------------------------- */
/* VOS CLASSES PERSONNALISÉES POUR ELEMENTOR (NO-CODE)  */
/* ---------------------------------------------------- */

/* 1. Entrez cette classe Elementor pour un conteneur simple (taille écran)
      Il restera fixé en haut pour se faire recouvrir. */
.apple-stack-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 10;
}

/* 2. Entrez cette classe Elementor pour un conteneur TRÈS LONG 
      Il défilera jusqu'au bout, puis se figera pour se faire recouvrir. */
.apple-stack-scroll {
  position: sticky !important;
  top: var(--sticky-top, 90px) !important;
  z-index: 10;
}

/* 3. Ombre pour détacher la carte de celle du dessous (Optionnel) */
.apple-shadow {
  box-shadow: 0 -20px 40px rgba(0,0,0,0.8);
}

/* 4. Règle système pour le Footer Custom (HFE)
      Permet au footer de glisser AUTOMATIQUEMENT par-dessus la dernière section figée */
.site-footer {
  position: relative;
  z-index: 20;
}

/* Responsive Menu Burger & Typography */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001; /* Above nav links */
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
  transform-origin: left;
}

@media (max-width: 768px) {
  .section {
    padding: 6rem 0; /* Plus petit padding sur mobile */
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr; /* 1 colonne sur mobile */
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
  }

  /* Forcer la liste Elementor à se comporter comme notre menu mobile vertical */
  .nav-links .elementor-widget-container,
  .nav-links .elementor-icon-list-items {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 3rem !important;
  }
  
  .nav-links.active {
    transform: translateY(0);
  }
  
  .nav-links li a,
  .nav-links .elementor-icon-list-text {
    font-size: 1.5rem !important; /* Plus gros sur mobile */
    font-weight: 600 !important;
  }

  /* Croix pour le burger menu actif */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
  }
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .portfolio-item { aspect-ratio: 3/4; }
}

/* =============== SECTION TRAVAILLONS ENSEMBLE (FOOTER) =============== */
.site-footer {
  background-color: #030a0f;
  color: #fff;
  padding: 5rem 2rem 2rem;
  position: relative;
  z-index: 20; /* Passe au-dessus du dernier conteneur sticky */
  display: flex;
  align-items: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.footer-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-subtitle {
  font-size: 1.2rem;
  color: #a0aab2;
  margin-bottom: 3rem;
}

.footer-contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  font-size: 1.1rem;
  flex-wrap: wrap;
}

.contact-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #7cb8d1;
}

.contact-separator {
  color: #4a5568;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-socials a {
  color: #a0aab2;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #718096;
  font-size: 0.9rem;
}

.back-to-top {
  color: #a0aab2;
  text-decoration: none;
  font-size: 2.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.back-to-top:hover {
  color: #fff;
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  .footer-contact-info { flex-direction: column; gap: 1rem; }
  .contact-separator { display: none; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* ========================================================
   SECTIONS NATIVES (Remplacement d'Elementor)
======================================================== */
.scroll-anchor {
    scroll-margin-top: 100px;
}

.custom-section {
    padding: 6rem 2rem;
    position: relative;
    width: 100%;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Empêche la vidéo de déborder de la section */ z-index: 15;
}

/* Background Vidéo Natif (Z-Index Négatif) */
.section-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

.section-container {
    width: 100%;
    max-width: 1200px;
}

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

/* Groupement Horizontal (Row) */
.cms-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* S'empile sur téléphone */
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
    margin: 20px 0;
}
.cms-row > * {
    flex: 1 1 300px; /* Les éléments se partagent la surface, min 300px avant de s'empiler */
    min-width: 0; /* Empêche les vidéos/images larges d'exploser la largeur de leur flex-item */
    margin: 0 !important; /* Neutraliser la marge des auto-media */
}


.auto-media {
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    margin: 0 auto;
    display: block;
}

.media-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.portfolio-header {
    margin-bottom: 4rem;
    text-align: center;
}

.about-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Grille Auto-Galerie (Masonry CSS) */
.auto-galerie {
    column-count: 3;
    column-gap: 1.5rem;
    width: 100%;
    margin: 40px auto;
}
.auto-galerie img, .auto-galerie video {
    width: 100%;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    border-radius: 10px;
    transition: transform 0.3s ease;
}
.auto-galerie img:hover, .auto-galerie video:hover {
    transform: scale(1.02);
}



/* --- FORMULAIRE DE CONTACT --- */
.clement-contact-form-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}
.clement-contact-form .form-group {
    margin-bottom: 20px;
}
.clement-contact-form input, 
.clement-contact-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.clement-contact-form input:focus, 
.clement-contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-light);
    background: rgba(0, 0, 0, 0.8);
}
.clement-contact-form .submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--text-color);
    color: var(--bg-color);
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}
.clement-contact-form .submit-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}
.contact-success {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #16a34a;
}
.contact-error {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #dc2626;
}

/* --- LIGHTBOX MODAL --- */
.cms-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cms-lightbox.active {
    display: flex;
    opacity: 1;
}
.cms-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cms-lightbox-content img, .cms-lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.cms-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}
.lightbox-trigger {
    cursor: zoom-in;
}
