/*
  Feuille de styles globale pour le site Ana Ruiz.
  Styles modernes, sobres, responsives, organisés par section (navigation, galeries, diaporama, etc.)
*/
html, /* ==== Styles généraux ==== */
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat Alternates', Arial, sans-serif;
  background: #151516;
  min-height: 100vh;
  box-sizing: border-box;
  color: #e9ecef;
}

/* Background slideshow / image d'accueil — garde fallback gradient si l'image manque */
.background-slideshow {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  z-index: 0;
  background-image: url("../img/accueil.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  /* fallback visuel si l'image est absente */
  background-color: #222;
  filter: brightness(0.52) blur(1.2px) grayscale(10%);
  transition: background 1s, filter 0.8s;
  animation: bgFade 22s infinite alternate;
  display: block;
}

/* si tu veux forcer l'affichage malgré overrides potentiels */
body > .background-slideshow { z-index: 0; position: fixed; }

/* keyframes existants */
@keyframes bgFade {
  0% { filter: brightness(0.52) blur(1.2px) grayscale(10%); }
  100% { filter: brightness(0.57) blur(0.7px) grayscale(5%); }
}

body {
  position: relative;
  z-index: 1;
}

/* ===== NAVBAR UNIFIÉE (appliquée à toutes les pages) ===== */
:root{
  --nav-padding-vertical: 0.9rem;
  --nav-padding-horizontal: 1rem;
  --nav-bg: transparent;
  --nav-link-color: inherit;
  --nav-link-focus: rgba(255,255,255,0.06);
}

/* conteneur : légèrement plus large pour éviter les retours à la ligne */
.navbar{
  padding: var(--nav-padding-vertical) var(--nav-padding-horizontal) !important;
  background: var(--nav-bg) !important;
  position: relative;
  z-index: 60;
}
.navbar-container{
  max-width: 1280px; /* augmenté de 1180 -> 1280 pour tenir plus d'items */
  margin: 0 auto;
  display:flex;
  align-items:center;
  gap:1rem;
  padding:0 1rem;
}

/* logo / signature */
.nav-logo a{
  font-weight:700;
  white-space:nowrap;
  font-size: clamp(1rem, 1.4vw, 1.12rem) !important; /* légèrement réduit au max pour éviter débordement */
  text-decoration:none;
}
.nav-signature{ display:inline-block; margin-left:.4rem; height:22px; }

/* liens (desktop) : police un peu plus grande mais qui reste adaptative */
.nav-links{
  display:flex;
  gap:0.9rem;
  margin-left:auto;
  align-items:center;
  list-style:none;
  padding:0;
}
.nav-links li{ margin:0; }
.nav-links a{
  display:inline-block;
  padding:.55rem .75rem !important; /* léger ajustement */
  font-size: clamp(0.98rem, 1.4vw, 1.18rem) !important; /* compromis desktop/mobile */
  line-height:1;
  color: var(--nav-link-color);
  text-decoration:none;
  border-radius:.35rem;
  transition: background .12s, transform .08s;
}

/* focus / hover accessible */
.nav-links a:focus,
.nav-links a:hover{
  background: var(--nav-link-focus);
  outline: none;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.03);
}

/* accepter les deux classes utilisées par les scripts */
.nav-links.open, .nav-links.show { display:flex !important; }

/* MOBILE : menu hamburger (les étiquettes du menu ont police confortable) */
@media (max-width: 840px){
  .nav-logo a{ font-size: clamp(0.92rem, 3.6vw, 1.02rem) !important; max-width:160px; overflow:hidden; text-overflow:ellipsis; display:inline-block; vertical-align:middle; }
  .hamburger{ margin-left:auto; width:44px; height:38px; font-size:1.05rem; border-radius:.5rem; }
  .nav-links{ display:none; flex-direction:column; align-items:stretch; width:100%; gap:0; padding:0.25rem 0; }
  .nav-links.open, .nav-links.show { display:flex !important; }

  /* lorsque le menu mobile est ouvert : centrer les libellés et autoriser le retour à la ligne */
  .nav-links.open a, .nav-links.show a{
    font-size: clamp(1rem, 4.2vw, 1.12rem) !important;
    padding:.6rem .9rem !important;
    text-align:center !important;
    white-space: normal !important; /* autorise le wrapping au lieu de tronquer */
    width:100%;
    box-sizing: border-box;
  }
}

/* très petits écrans : compacter sans perdre lisibilité */
@media (max-width: 380px){
  .nav-logo a{ max-width:120px; font-size:0.88rem !important; }
  .nav-links a{ font-size:0.94rem !important; padding:.42rem .7rem !important; }
}

/* garantir priorité sur styles inline sur certaines pages */
.navbar, .nav-links a { -webkit-font-smoothing:antialiased; }

/* ==== Barre de navigation ==== */
.navbar {
  width: 100vw;
  position: fixed;
  top: 0; left: 0;
  background: rgba(28, 28, 31, 0.70);
  z-index: 3000;
  box-shadow: 0 8px 28px #14141424;
  backdrop-filter: blur(10px);
  animation: navbarFadeIn 1.1s;
  padding: 0;
}
@keyframes navbarFadeIn {
  from { opacity: 0; transform: translateY(-20px);}
  to { opacity: 1; transform: translateY(0);}
}
.nav-logo a {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  letter-spacing: 2px;
  color: #f4efe9;
  text-decoration: none;
  text-shadow: 0 2px 8px #1b1b1f55;
  transition: color 0.2s;
}
.nav-logo a:hover {
  color: #ded6c2;
}
.hamburger {
  display: none;
  background: none;
  color: #b8bac2;
  font-size: 2.2rem;
  border: none;
  cursor: pointer;
}
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3vw;
  width: 100%;
  box-sizing: border-box;
}
.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 2vw;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  overflow-x: auto;
}
.nav-links a {
  color: #e9ecef;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 1px;
  padding: 5px 16px;
  border-radius: 22px;
  transition: background 0.15s, color 0.14s;
}
.nav-links a.active, .nav-links a:hover {
  color: #d1cbbf;
  background: rgba(200, 195, 175, 0.07);
}
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  position: relative;
}
.hero {
  background: rgba(38, 37, 41, 0.38);
  margin-top: 17vh;
  border-radius: 22px;
  padding: 3.5vw 7vw 3vw 7vw;
  box-shadow: 0 6px 32px #18101823;
  text-align: center;
  max-width: 670px;
  backdrop-filter: blur(5px);
  animation: heroFadeIn 1.5s;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px);}
  to { opacity: 1; transform: translateY(0);}
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: #f4efe9;
  text-shadow: 0 2px 14px #22222844;
  margin-bottom: 1.1em;
  letter-spacing: 1.5px;
  font-weight: 700;
}
.hero p {
  font-size: 1.18rem;
  font-weight: 400;
  color: #cec9c4;
  text-shadow: 0 1px 2px #34343ad1;
  margin-bottom: 2.1em;
}
.btn, .glass-btn {
  display: inline-block;
  font-family: inherit;
  padding: 0.88rem 2.3rem;
  font-size: 1.13rem;
  background: rgba(238, 233, 222, 0.15);
  border: none;
  border-radius: 32px;
  color: #ded6c2;
  text-shadow: 0 1px 5px #222c;
  font-weight: 700;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 11px #0d0d1040;
  letter-spacing: 1.1px;
  transition: background 0.14s, color 0.14s, box-shadow 0.13s, transform 0.13s;
  cursor: pointer;
}
.btn:hover, .glass-btn:hover {
  background: rgba(238, 233, 222, 0.23);
  color: #f4efe9;
  transform: scale(1.032);
  box-shadow: 0 6px 22px #1118222b;
}

/* ==== Footer commun ==== */
footer {
  width: 100%;
  text-align: center;
  color: #a5a6a6;
  padding: 2rem 0 1.2rem 0;
  position: relative;
  z-index: 10;
  font-size: 1rem;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px #19191c2a;
}
footer a {
  color: #b8bac2;
  text-decoration: none;
  margin-left: 1em;
  font-weight: 500;
}
footer a:hover {
  text-decoration: underline;
  color: #e9ecef;
}
.fade-in { opacity: 0; transition: opacity 1.1s;}
.fade-in.visible { opacity: 1;}
/* Responsive */
@media (max-width: 900px) {
  .hero { padding: 6vw 4vw; }
  .hero h1 { font-size: 2rem; }

  /* menu mobile : conteneur centré et libellés centrés / non tronqués */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(28, 28, 31, 0.97);
    flex-direction: column;
    gap: 0;
    padding: 1em 0;
    z-index: 4000;
    text-align: center;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    text-align: center !important;
    white-space: normal !important; /* autorise l'enroulement au lieu de tronquer */
    padding: .8rem 1rem;
    box-sizing: border-box;
  }
  .nav-links.show { display: flex; }
  .hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    color: inherit;
    cursor: pointer;
    margin-left: 1em;
  }
  .navbar-container { padding: 0.5rem 2vw; }
}

@media (max-width: 600px) {
  .navbar { padding: 0.7rem 2vw; }
  .nav-links { gap: 0.6em; }
  .hero { padding: 9vw 2vw; }

  /* menu mobile compact (pops over) : centrage et wrapping */
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.2em;
    background: rgba(28, 28, 31, 0.98);
    position: absolute;
    top: 50px;
    right: 4vw;
    padding: 1.4em 1.6em;
    border-radius: 18px;
    box-shadow: 0 4px 28px #2c185d38;
    text-align: center;
  }
  .nav-links.show { display: flex; }
  .nav-links a { text-align: center !important; white-space: normal !important; display: block; width: 100%; padding: .7rem 1rem; }

  .hamburger { display: block; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 1.08rem; }
  .hero p { font-size: 0.92rem; }
  .btn, .glass-btn { font-size: 0.91rem; padding: 0.7rem 1rem; }
}
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(22,21,30,0.94);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.5s;
}
.lightbox-img {
  max-width: 93vw;
  max-height: 88vh;
  box-shadow: 0 6px 44px #19102877;
  border-radius: 16px;
  background: #222;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 38px;
  color: #fff;
  font-size: 2.8rem;
  cursor: pointer;
  z-index: 2100;
  font-weight: 400;
  opacity: 0.85;
  transition: opacity 0.16s;
}
.lightbox-close:hover { opacity: 1; }

/* Champs de formulaire vraiment transparents */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
  background: transparent !important; /* force la transparence */
  color: #f4efe9;
  border: 1px solid #b8bac2;
  border-radius: 14px;
  padding: 0.9em 1.2em;
  font-size: 1.08rem;
  box-shadow: 0 2px 14px #19171b18;
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
  /* Pour éviter le fond noir sur iOS */
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  box-shadow: 0 2px 14px #19171b18, 0 0 0 1000px transparent inset;
}

input:focus,
textarea:focus,
select:focus {
  background: rgba(28, 28, 31, 0.13) !important; /* très léger voile au focus */
  box-shadow: 0 4px 22px #19171b33, 0 0 0 1000px transparent inset;
  border-color: #e9ecef;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7em;
}

.nav-signature {
  height: 2.2em;
  max-width: 120px;
  object-fit: contain;
  margin-left: 0.2em;
  opacity: 0.85;
  transition: opacity 0.2s, max-width 0.2s, height 0.2s;
  filter: drop-shadow(0 2px 6px #0004);
  display: inline-block;
}

/* Adapter la taille sur mobile */
@media (max-width: 600px) {
  .nav-signature {
    height: 1.3em;
    max-width: 70px;
    margin-left: 0.15em;
  }
}

/* Garantit clic sur déclencheur */
.gallery-desc { pointer-events:auto; }
.lightbox-overlay:not(.open) { pointer-events:none; }

/* === Lightbox Global & Galerie === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.92);
  z-index: 6000;
  touch-action: none;
}
.lightbox-overlay.open { display: flex; }
.lightbox-frame {
  width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: calc(env(safe-area-inset-top,0px) + 8px) calc(env(safe-area-inset-right,0px) + 10px) calc(env(safe-area-inset-bottom,0px) + 8px) calc(env(safe-area-inset-left,0px) + 10px);
  gap: 10px;
}
#lightbox-close {
  position: static;
  background: rgba(255,255,255,.30);
  color: #fff;
  border: 0;
  padding: .52rem .9rem;
  font-size: 1rem;
  line-height: 1;
  border-radius: 34px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  flex: 0 0 auto;
}
#lightbox-close:hover,#lightbox-close:focus { background: rgba(255,255,255,.44); outline: none; }
.lightbox-inner {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity .25s;
  -webkit-user-select: none;
  user-select: none;
  display: block;
}
#lightbox-img.ready { opacity: 1; }
body.lb-open { overflow: hidden; }
body.lb-open .navbar { transform: translateY(-130%); opacity: 0; pointer-events: none; transition: .25s; }

/* Bouton + sur vignettes */
.gallery-work { position: relative; }
.zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: 0;
  padding: .36rem .58rem;
  font-size: .8rem;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  opacity: .85;
}
.zoom-btn:hover,.zoom-btn:focus { opacity: 1; }

/* Bloc description étendu (si pas déjà défini) */
.expanded-text {
  position: relative;
  z-index: 30;
  background: rgba(20,20,22,0.96);
  border-radius: 12px;
  padding: 1rem .9rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  overflow: hidden;
  color: #d7d2cf;
  margin: 0 auto;
  max-width: 780px;
  box-sizing: border-box;
  display: none;
  opacity: 0;
  transform-origin: top center;
  transform: translateY(-6px);
  transition: opacity .26s ease, transform .26s ease;
}
.expanded-text.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  margin-top: 1rem;
}
.expanded-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.04);
  border: 0;
  color: #ece3de;
  padding: .18rem .5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  display: none;
}
.expanded-text.open .expanded-close { display: block; }
.expanded-text p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  margin: 0 0 1rem;
  line-height: 1.7;
  color: #d7d2cf;
  font-size: 1rem;
}
.expanded-text blockquote {
  font-style: italic;
  margin: 1rem 0;
  color: #e6dccf;
  border-left: 3px solid rgba(255,255,255,0.04);
  padding-left: 1rem;
}
.expanded-text .source {
  text-align: right;
  font-style: italic;
  color: #bfb6ad;
  margin-top: 0.6rem;
  font-size: 0.95rem;
}

/* Affichage immédiat des blocs avec fade-in */
.fade-in{
  opacity:1!important;
  transform:none!important;
  transition:none!important;
}

/* Lightbox + boutons + (global) */
.lightbox-overlay{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.92);z-index:6000;}
.lightbox-overlay.open{display:flex;}
.lightbox-frame{width:100vw;height:100dvh;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;box-sizing:border-box;padding:calc(env(safe-area-inset-top,0px)+8px) calc(env(safe-area-inset-right,0px)+10px) calc(env(safe-area-inset-bottom,0px)+8px) calc(env(safe-area-inset-left,0px)+10px);gap:10px;}
#lightbox-close{background:rgba(255,255,255,.30);color:#fff;border:0;padding:.52rem .9rem;font-size:1rem;line-height:1;border-radius:34px;cursor:pointer;backdrop-filter:blur(4px);}
#lightbox-close:hover,#lightbox-close:focus{background:rgba(255,255,255,.44);outline:none;}
.lightbox-inner{flex:1 1 auto;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;}
#lightbox-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;opacity:0;transition:opacity .25s;display:block;}
#lightbox-img.ready{opacity:1;}
body.lb-open{overflow:hidden;}
.zoom-btn{position:absolute;top:8px;right:8px;background:rgba(0,0,0,.55);color:#fff;border:0;padding:.36rem .58rem;font-size:.8rem;line-height:1;border-radius:6px;cursor:pointer;opacity:.85;}
.zoom-btn:hover,.zoom-btn:focus{opacity:1;}

