/*
Theme Name: SeenByTimeo
Theme URI: https://seenbytim.fr
Author: Timéo Loos
Author URI: https://seenbytim.fr
Description: Thème minimaliste éditorial pour photographe événementiel.
Version: 3.1
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: seenbytimeo
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */

:root {
  --bg:        #FAFAF8;
  --bg-soft:   #F4F2EE;
  --bg-card:   #EEEAE4;
  --border:    #E2DDD7;
  --text:      #1A1714;
  --muted:     #7A736A;
  --accent:    #1A1714;
  --gold:      #C8A96E;
  --font:      'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-serif:'DM Serif Display', Georgia, serif;
  --nav-h:     68px;
  --container: 1200px;
}

html.dark {
  --bg:      #141210;
  --bg-soft: #1C1917;
  --bg-card: #242018;
  --border:  #332E28;
  --text:    #F0EDE8;
  --muted:   #8A8278;
  --accent:  #F0EDE8;
}

/* Empêche le flash au chargement */
html:not(.theme-ready) * {
  transition: none !important;
}

/* Bouton toggle thème */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: block;
  width: 18px;
  height: 18px;
}

html:not(.dark) .theme-toggle .icon-moon { display: none; }
html.dark       .theme-toggle .icon-sun  { display: none; }

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html.theme-ready body,
html.theme-ready #site-header,
html.theme-ready .nav-inner,
html.theme-ready .testimonial,
html.theme-ready .gallery-item,
html.theme-ready .photo-item,
html.theme-ready #lightbox {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--nav-h);
  background-color: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html.dark #site-header {
  background-color: rgba(20, 18, 16, 0.92) !important;
}

#site-header.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 32px;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.nav-burger span {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-burger.open span:nth-child(2) {
  opacity: 0;
}
.nav-burger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

#site-nav ul {
  display: flex;
  align-items: center;
  gap: 36px;
}

#site-nav a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}

#site-nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text);
  transition: width 0.25s ease;
}

#site-nav a:hover,
#site-nav a.active {
  color: var(--text);
}

#site-nav a:hover::after,
#site-nav a.active::after {
  width: 100%;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-inline: 32px;
}

.hero-eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease both;
  animation-delay: 0.2s;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.0;
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease both;
  animation-delay: 0.5s;
}

.hero-subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease both;
  animation-delay: 0.8s;
}

.hero-content .btn {
  animation: fadeInUp 0.6s ease both;
  animation-delay: 1s;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scrollPulse 2.5s ease-in-out infinite;
  animation-delay: 1.5s;
  opacity: 0;
}

.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-indicator-arrow {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, var(--muted));
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  50%       { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   BOUTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.btn-ghost::before {
  content: '←';
}

.btn-ghost:hover {
  color: var(--text);
}

/* ============================================================
   SECTIONS GÉNÉRIQUES
   ============================================================ */

.section {
  padding: 100px 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 32px;
}

.section-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 48px;
  line-height: 1.15;
}

.section-divider {
  width: 32px;
  height: 1px;
  background-color: var(--border);
  margin: 20px auto;
}

/* ============================================================
   PORTFOLIO / GALERIE GRID
   ============================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-card);
  aspect-ratio: 4/3;
  display: block;
  text-decoration: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(250, 250, 248, 0);
  transition: background-color 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 28px;
}

.gallery-item:hover .gallery-item-overlay {
  background-color: rgba(250, 250, 248, 0.08);
}

.gallery-item-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-item-title {
  opacity: 1;
  transform: translateY(0);
}

.gallery-placeholder {
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   SECTION À PROPOS
   ============================================================ */

.about-section {
  background-color: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-photo {
  aspect-ratio: 3/4;
  overflow: hidden;
  background-color: var(--bg-card);
}

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

.about-text .section-eyebrow { margin-bottom: 12px; }
.about-text .section-title   { margin-bottom: 24px; }

.about-text p {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 16px;
}

.about-text .btn {
  margin-top: 32px;
}

.about-stats {
  display: flex;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.about-stat {
  flex: 1;
  padding-inline: 24px;
  border-left: 1px solid var(--border);
}

.about-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.about-stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.about-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   SECTION AVIS CLIENTS
   ============================================================ */

.testimonials-section {
  background-color: var(--bg-soft);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.testimonial {
  position: relative;
  background-color: var(--bg);
  padding: 40px 36px;
  border: 1px solid var(--border);
}

.testimonial-quote {
  position: absolute;
  top: 16px;
  left: 28px;
  font-family: var(--font-serif);
  font-size: 5rem;
  line-height: 1;
  color: var(--border);
  user-select: none;
  pointer-events: none;
}

.testimonial-stars {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 20px;
  margin-top: 16px;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 28px;
}

.testimonial-author-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.testimonial-author-role {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
}

/* ============================================================
   SECTION CONTACT
   ============================================================ */

.contact-section {
  background-color: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  display: inline-block;
}

.contact-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text);
  transition: width 0.25s ease;
}

.contact-links a:hover {
  color: var(--text);
}

.contact-links a:hover::after {
  width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-field {
  position: relative;
}

.form-field label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%237A736A' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 20px;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-bottom-color: var(--text);
}

.form-field textarea {
  resize: none;
  min-height: 120px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--border);
}

.form-message {
  padding: 14px 20px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.form-message.success {
  background-color: #f0faf0;
  border: 1px solid #c3e6c3;
  color: #2d6a2d;
}

.form-message.error {
  background-color: #fdf2f2;
  border: 1px solid #f5c6c6;
  color: #922;
}

/* ============================================================
   FOOTER
   ============================================================ */

#site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background-color: var(--bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 32px;
}

.footer-copy,
.footer-nav a,
.footer-social a {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-nav a {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-social a:hover {
  color: var(--text);
}

.footer-social {
  text-align: right;
}

/* ============================================================
   PAGE BLOG / SINGLE
   ============================================================ */

.page-header {
  padding: 140px 0 60px;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  padding: 80px 0;
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: var(--bg-card);
  margin-bottom: 20px;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card-meta {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.single-content {
  max-width: 740px;
  margin: 80px auto;
  padding-inline: 32px;
}

.single-content h2,
.single-content h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text);
  margin: 40px 0 16px;
}

.single-content p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ============================================================
   SINGLE GALERIE
   ============================================================ */

.galerie-header {
  padding: 140px 0 60px;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.galerie-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 16px;
}

.galerie-excerpt {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
}

.gallery-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 60px 0;
}

.photo-item {
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-card);
  aspect-ratio: 4/3;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.photo-item:hover img {
  transform: scale(1.04);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(250, 250, 248, 0.97);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#lightbox.active {
  display: flex;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: opacity 0.15s ease;
}

#lightbox-img.fading {
  opacity: 0;
}

#lightbox-prev,
#lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 16px;
  transition: color 0.2s;
  z-index: 10000;
  font-size: 1.4rem;
}

#lightbox-prev { left: 20px; }
#lightbox-next { right: 20px; }

#lightbox-prev:hover,
#lightbox-next:hover {
  color: var(--text);
}

#lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  transition: color 0.2s;
  z-index: 10000;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font);
}

#lightbox-close:hover {
  color: var(--text);
}

#lightbox-counter {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: var(--font);
}

/* ============================================================
   PAGE 404
   ============================================================ */

.error-404 {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-h) 32px 0;
}

.error-404-number {
  font-family: var(--font-serif);
  font-size: 8rem;
  font-weight: 400;
  color: var(--border);
  line-height: 1;
  margin-bottom: 20px;
}

.error-404-title {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 40px;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — 900px
   ============================================================ */

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-photo {
    aspect-ratio: 4/3;
    max-width: 480px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .gallery-photos {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }

  .footer-nav { justify-content: center; }
  .footer-social { text-align: center; }
}

/* ============================================================
   RESPONSIVE — 640px
   ============================================================ */

@media (max-width: 640px) {
  .nav-burger {
    display: flex;
  }

  #site-nav ul {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    background-color: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
  }

  #site-nav.open ul {
    display: flex;
  }

  #site-nav ul li a {
    display: block;
    padding: 14px 32px;
    font-size: 0.8rem;
  }

  .section {
    padding: 72px 0;
  }

  .container {
    padding-inline: 20px;
  }

  .nav-inner {
    padding-inline: 20px;
  }

  .hero-title {
    font-size: clamp(2.8rem, 10vw, 4.5rem);
  }

  .about-stats {
    flex-direction: column;
    gap: 24px;
  }

  .about-stat {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }

  .about-stat:first-child {
    border-top: none;
    padding-top: 0;
  }

  .gallery-photos {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  #lightbox-prev { left: 4px; }
  #lightbox-next { right: 4px; }
}
