/* ===== SPIDEY — LE TIGRE DE SAVOIE ===== */

:root {
  --vert-profond: #0a1a05;
  --vert-fonce: #0d2b0a;
  --vert-moyen: #1a4a12;
  --vert-feuille: #2d6e1e;
  --vert-clair: #5ab835;
  --or: #c8962a;
  --or-clair: #e8b84b;
  --brun: #3d1f08;
  --brun-clair: #6b3d14;
  --blanc-chaud: #f0e8d0;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: #050e03;
  color: var(--blanc-chaud);
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  font-size: 18px;
  overflow-x: hidden;
}

/* Wallpaper fixe — fonctionne sur mobile contrairement à background-attachment:fixed */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('wallpaper.png');
  background-size: cover;
  background-position: center center;
  z-index: -2;
}

/* Surcouche sombre pour la lisibilité */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
  z-index: -1;
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, .titre-principal {
  font-family: 'Trajan Pro', 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== LIANES ===== */
.liane {
  position: fixed;
  top: -20px;
  width: 6px;
  background: linear-gradient(
    to bottom,
    var(--brun-clair) 0%,
    var(--brun) 30%,
    var(--vert-fonce) 60%,
    var(--brun) 80%,
    var(--brun-clair) 100%
  );
  border-radius: 3px;
  transform-origin: top center;
  z-index: 2;
  pointer-events: none;
}

.liane::before {
  content: '';
  position: absolute;
  top: 0; left: -2px; right: -2px; bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 18px,
    rgba(0,0,0,0.3) 18px, rgba(0,0,0,0.3) 22px
  );
  border-radius: 3px;
}

.liane-1 { left: 4%;  animation: balancement 7s  ease-in-out infinite; }
.liane-2 { left: 12%; animation: balancement 9s  ease-in-out infinite; animation-delay: -3s; width: 8px; }
.liane-3 { right: 5%; animation: balancement 8s  ease-in-out infinite; animation-delay: -1s; }
.liane-4 { right: 14%;animation: balancement 6s  ease-in-out infinite; animation-delay: -4s; width: 5px; }
.liane-5 { left: 48%; animation: balancement 10s ease-in-out infinite; animation-delay: -2s; width: 5px; }

@keyframes balancement {
  0%, 100% { transform: rotate(-3deg) skewX(-1deg); }
  50%       { transform: rotate(3deg)  skewX(1deg);  }
}

.feuille-liane {
  position: absolute;
  width: 40px; height: 20px;
  background: var(--vert-feuille);
  border-radius: 50% 0 50% 0;
  opacity: 0.85;
}
.feuille-liane.g { left: -38px; transform: rotate(-20deg); }
.feuille-liane.d { left: 6px;   transform: rotate(20deg);  border-radius: 0 50% 0 50%; background: var(--vert-moyen); }

/* ===== HEADER ===== */
#header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, transparent 100%);
}

.titre-principal {
  font-size: clamp(2.8rem, 8vw, 6rem);
  background: linear-gradient(to bottom, #e85d00 0%, #f5a800 45%, #f5d800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter:
    drop-shadow(4px 4px 0px #3d1000)
    drop-shadow(7px 7px 0px rgba(0,0,0,0.5))
    drop-shadow(0 0 30px rgba(230,120,0,0.6));
  line-height: 1.1;
  letter-spacing: 0.12em;
  transform: rotate(-3deg) skewX(-4deg);
  display: inline-block;
  animation: apparition 2s ease-out both;
}

.sous-titre {
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: var(--vert-clair);
  font-style: italic;
  margin-top: 12px;
  letter-spacing: 0.2em;
  text-shadow: 0 0 20px rgba(90,184,53,0.6);
  animation: apparition 2s ease-out 0.4s both;
}

@keyframes apparition {
  0%   { opacity: 0; transform: translateY(-20px) scale(0.95); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}



/* ===== DESCRIPTION ===== */
#description {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 24px;
  text-align: center;
}

.encart-description {
  background: linear-gradient(135deg,
    rgba(5,15,3,0.88) 0%,
    rgba(10,28,7,0.92) 50%,
    rgba(5,15,3,0.88) 100%
  );
  border: 1px solid var(--vert-feuille);
  border-top: 3px solid var(--or);
  border-bottom: 3px solid var(--or);
  padding: 32px 40px;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,0.6), inset 0 0 40px rgba(0,0,0,0.3);
  position: relative;
}
.encart-description::before {
  content: '🐆';
  position: absolute;
  top: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
.encart-description p {
  line-height: 1.8;
  color: var(--blanc-chaud);
  font-size: 1.1rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}
.encart-description strong { color: var(--or-clair); font-style: italic; }

/* ===== GALERIE ===== */
#galerie {
  position: relative;
  z-index: 10;
  padding: 0 20px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

#galerie h2 {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--or);
  text-shadow: 2px 2px 0 var(--brun), 0 0 30px rgba(200,150,42,0.5);
  margin-bottom: 40px;
  letter-spacing: 0.15em;
}

.grille-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ===== CARTE PHOTO ===== */
.carte-photo {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: var(--vert-fonce);
  border: 2px solid var(--vert-moyen);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: apparition-carte 0.6s ease-out both;
}
@keyframes apparition-carte {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.carte-photo:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 0 30px rgba(90,184,53,0.2);
  border-color: var(--or);
}
.carte-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.3s ease;
  filter: saturate(1.1) contrast(1.05);
}
.carte-photo:hover img {
  transform: scale(1.08);
  filter: saturate(1.3) contrast(1.1) brightness(1.05);
}

.carte-photo .coin-tl,
.carte-photo .coin-tr,
.carte-photo .coin-bl,
.carte-photo .coin-br {
  position: absolute;
  width: 16px; height: 16px;
  z-index: 5; pointer-events: none;
}
.carte-photo .coin-tl { top: 6px;    left: 6px;   border-top: 2px solid var(--or); border-left: 2px solid var(--or); }
.carte-photo .coin-tr { top: 6px;    right: 6px;  border-top: 2px solid var(--or); border-right: 2px solid var(--or); }
.carte-photo .coin-bl { bottom: 6px; left: 6px;   border-bottom: 2px solid var(--or); border-left: 2px solid var(--or); }
.carte-photo .coin-br { bottom: 6px; right: 6px;  border-bottom: 2px solid var(--or); border-right: 2px solid var(--or); }

.carte-photo .overlay-zoom {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,20,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex; align-items: flex-end;
  padding: 16px; z-index: 4;
}
.carte-photo:hover .overlay-zoom { opacity: 1; }
.overlay-zoom span {
  color: var(--blanc-chaud);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
}

.placeholder-vide {
  text-align: center; padding: 60px 20px;
  color: var(--vert-clair); font-style: italic; opacity: 0.7;
}
.placeholder-vide .gros-emoji {
  font-size: 5rem; display: block; margin-bottom: 20px;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
#lightbox.ouvert { opacity: 1; pointer-events: all; }
#lightbox img {
  max-width: 90vw; max-height: 85vh;
  object-fit: contain;
  border: 3px solid var(--or); border-radius: 4px;
  box-shadow: 0 0 80px rgba(200,150,42,0.3), 0 20px 80px rgba(0,0,0,0.8);
  transform: scale(0.9); transition: transform 0.3s ease;
}
#lightbox.ouvert img { transform: scale(1); }

#lightbox-fermer {
  position: absolute; top: 20px; right: 24px;
  background: none; border: 2px solid var(--or); color: var(--or-clair);
  font-size: 1.6rem; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
#lightbox-fermer:hover { background: var(--or); color: var(--brun); transform: rotate(90deg); }

#lightbox-nav-g,
#lightbox-nav-d {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); border: 2px solid var(--or); color: var(--or-clair);
  font-size: 2rem; width: 52px; height: 52px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
#lightbox-nav-g { left: 20px; }
#lightbox-nav-d { right: 20px; }
#lightbox-nav-g:hover,
#lightbox-nav-d:hover { background: var(--or); color: var(--brun); }

#lightbox-compteur {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: var(--blanc-chaud); font-size: 0.95rem; letter-spacing: 0.2em; opacity: 0.7;
}

/* ===== FOOTER ===== */
footer {
  position: relative; z-index: 10;
  text-align: center; padding: 30px 20px 40px;
  border-top: 1px solid var(--vert-moyen);
  color: var(--vert-clair); font-size: 0.9rem; opacity: 0.6; letter-spacing: 0.1em;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--vert-profond); }
::-webkit-scrollbar-thumb { background: var(--vert-moyen); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--vert-feuille); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .encart-description { padding: 24px 20px; }
  .grille-photos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  #lightbox-nav-g { left: 6px; }
  #lightbox-nav-d { right: 6px; }
}
