/* ===== MAISON SAUVAGE — Style final ===== */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500&display=swap');

@font-face {
  font-family: 'Wildemount';
  src: url('fonts/Wildemount Demo.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --noir:   #1a0f07;
  --brun:   #2e1c0e;
  --terre:  #8b4e1e;
  --ambre:  #c9a06a;
  --sable:  #e8d5b8;
  --creme:  #f2ebe0;
  --doux:   #ede4d5;
  --gris:   #7a6040;
  --font-titre: 'Playfair Display', Georgia, serif;
  --font-body:  'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--creme); color: var(--brun); font-size: 16px; line-height: 1.7; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
header {
  position: sticky; top: 0; z-index: 100;
  background-image: url('images/fond-metal.jpg');
  background-size: cover;
  background-position: center;
  border-bottom: none;
  box-shadow: 0 3px 14px rgba(0,0,0,.6);
}
/* overlay sombre pour lisibilité */
header::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(12,4,1,.14);
  pointer-events: none; z-index: 0;
}
nav {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  height: 82px;
}

.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 72px; width: auto; filter: brightness(1.8) drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
.nav-logo-placeholder { width: 46px; height: 42px; border: 1.5px dashed var(--ambre); display: flex; align-items: center; justify-content: center; font-size: 8px; color: var(--ambre); text-align: center; line-height: 1.3; }

/* Marque centrée */
.nav-brand-center {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center; text-decoration: none;
  pointer-events: none;
}
.nav-brand-name {
  font-family: 'Wildemount', 'Pacifico', cursive;
  font-size: 44px;
  color: #F5E8D0;
  text-shadow: 0 1px 6px rgba(0,0,0,.7), 0 0 20px rgba(0,0,0,.4);
  line-height: 1;
  letter-spacing: .01em;
}
.nav-brand-sub {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(220,185,130,.75);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* Masquer l'ancien nav-name */
.nav-name { display: none; }

nav ul { display: flex; gap: 1.8rem; list-style: none; justify-content: flex-end; }
nav ul a { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: rgba(230,195,145,.65); transition: color .2s; }
nav ul a:hover, nav ul a.active { color: var(--ambre); }

/* RECHERCHE */
.search-wrap { display: flex; align-items: center; background: rgba(0,0,0,.28); border: 1px solid rgba(201,160,106,.28); padding: 0 10px; gap: 6px; height: 32px; }
.search-wrap input { background: none; border: none; outline: none; font-size: 12px; color: #F0E0C8; font-family: var(--font-body); width: 160px; }
.search-wrap input::placeholder { color: rgba(201,160,106,.5); }

.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ambre); margin-left: auto; }

/* ===== HERO ===== */
.hero { position: relative; min-height: 600px; display: flex; align-items: center; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1600&q=85'); background-size: cover; background-position: center 40%; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(20,8,2,.50) 0%, rgba(20,8,2,.28) 45%, rgba(20,8,2,.02) 100%); }
.hero-content { position: relative; max-width: 1200px; width: 100%; margin: 0 auto; padding: 3.5rem 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-text { display: flex; flex-direction: column; }
.hero-eyebrow { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ambre); margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; }
.hero-eyebrow::before { content: ''; width: 20px; height: 1px; background: var(--ambre); display: block; }
.hero h1 { font-family: var(--font-titre); font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 400; color: #f5ede0; line-height: 1.12; margin-bottom: .8rem; }
.hero h1 em { font-style: italic; color: var(--ambre); }
.hero-baseline { position: absolute; bottom: 1.5rem; left: 0; right: 0; text-align: center; font-family: var(--font-titre); font-style: italic; font-size: clamp(.9rem, 1.8vw, 1.2rem); color: var(--sable); text-shadow: 0 1px 6px rgba(0,0,0,.7); letter-spacing: .02em; }
.hero-sub { font-size: .95rem; color: #b09070; line-height: 1.8; margin-bottom: 1.8rem; }
.btn-primary { display: inline-block; background: var(--terre); color: #f5ede0; padding: .75rem 1.8rem; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; transition: background .2s; align-self: flex-start; }
.btn-primary:hover { background: #a05a22; }

/* ===== CADRE PHOTO (dans hero) ===== */
.hero-cadre {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at center, black 27%, transparent 68%);
  mask-image: radial-gradient(ellipse 85% 80% at center, black 27%, transparent 68%);
  background: transparent;
}
.hero-cadre #slides-container { position: absolute; inset: 0; }
.hero-cadre .slide { position: absolute; inset: 0; display: flex; gap: 0; opacity: 0; transition: opacity 1.5s ease-in-out; background: transparent; }
.hero-cadre .slide.active { opacity: 1; }
.hero-cadre .slide-btn { display: none; }
.hero-cadre .slide-dots { display: none; }
.hero-cadre .slide-veil { display: none; }
.hero-cadre .slide-label { display: none; }

/* ===== DIAPORAMA (dans .hero-cadre) ===== */
.slide-img { flex: 1; object-fit: contain; min-width: 0; height: 100%; display: block; background: transparent; }
.slide-dots { position: absolute; bottom: 1.2rem; right: 1rem; display: flex; gap: 6px; z-index: 2; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.3); cursor: pointer; transition: background .3s; border: none; padding: 0; }
.dot.active { background: var(--ambre); }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(20,10,4,.45); border: 1px solid rgba(201,160,106,.3); color: var(--ambre); width: 36px; height: 36px; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: background .2s; z-index: 2; }
.slide-btn:hover { background: rgba(139,78,30,.7); }
.slide-btn.prev { left: .6rem; }
.slide-btn.next { right: .6rem; }

/* ===== DISCIPLINES ===== */
.disciplines { background: var(--brun); display: grid; grid-template-columns: repeat(4, 1fr); }
.disc { padding: 1.8rem; border-right: 1px solid rgba(255,200,120,.07); }
.disc:last-child { border-right: none; }
.disc-ico { font-size: 1.2rem; color: var(--ambre); margin-bottom: .6rem; }
.disc h3 { font-family: var(--font-titre); font-size: .95rem; font-weight: 400; color: var(--sable); margin-bottom: .4rem; }
.disc p { font-size: .82rem; color: #5a4030; line-height: 1.65; }

/* ===== GALERIE ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.galerie-section { padding: 3.5rem 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.2rem; }
.section-head h2 { font-family: var(--font-titre); font-size: 1.6rem; font-weight: 400; color: #3d2610; }
.section-head a { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--terre); }

.search-info { font-size: 11px; color: #9a7a5a; margin-bottom: .8rem; min-height: 16px; font-style: italic; }

/* FILTRES */
.galerie-filtres { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filtre-btn { background: none; border: 1px solid rgba(139,78,30,.3); color: var(--terre); padding: .3rem .9rem; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: all .2s; font-family: var(--font-body); }
.filtre-btn.actif, .filtre-btn:hover { background: var(--brun); color: var(--sable); border-color: var(--brun); }

.galerie-grid { columns: 3; column-gap: 6px; margin-bottom: 6px; }
#galerie-home { columns: 7; }
#galerie { columns: 8; }
.carte { break-inside: avoid; margin-bottom: 6px; overflow: hidden; position: relative; background: var(--doux); cursor: pointer; display: block; }
.carte.hidden { display: none; }
.carte:hover .carte-ov { opacity: 1; }
.carte-img-wrap { position: relative; width: 100%; overflow: hidden; }
.carte-img-wrap img { width: 100%; height: auto; display: block; transition: transform .35s; }
.carte:hover .carte-img-wrap img { transform: scale(1.04); }

/* Survol — atelier uniquement */
#galerie .carte { transition: opacity .25s ease; }
#galerie .carte:hover { opacity: .7; }
#galerie .carte:hover .carte-img-wrap img { transform: none; }
#galerie .carte-ov { display: none; }

/* Preview flottante */
#hover-preview-wrap { position: fixed; pointer-events: none; z-index: 999; display: none; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
#hover-preview-wrap img { display: block; width: 280px; height: auto; }
#hover-preview-label { position: absolute; bottom: 0; left: 0; right: 0; padding: .5rem .75rem; background: linear-gradient(to top, rgba(15,8,2,.82), rgba(15,8,2,0)); font-family: var(--font-body); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sable); line-height: 1.3; }
.carte-img-placeholder { width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, #d4c5b0, #c2ae95); display: flex; align-items: center; justify-content: center; color: var(--gris); font-size: 12px; }
.carte-ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,8,2,.82) 0%, rgba(15,8,2,.18) 50%, rgba(15,8,2,0) 72%); opacity: 0; transition: opacity .28s; display: flex; align-items: flex-end; padding: .75rem .9rem; }
.carte-ov span { font-family: var(--font-titre); font-size: .88rem; font-style: italic; color: var(--sable); line-height: 1.3; }
.carte-cat { position: absolute; top: 8px; left: 9px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(139,78,30,.85); padding: 2px 6px; }
.carte-body { padding: .8rem 1rem; }
.carte-titre { font-family: var(--font-titre); font-size: 1rem; font-weight: 400; color: #3d2610; }
.carte-date { font-size: 11px; color: var(--gris); margin-top: .2rem; }
.no-result { grid-column: 1/-1; text-align: center; padding: 2rem; font-size: .9rem; color: #9a7a5a; font-style: italic; }

/* ===== LIGHTBOX ===== */
/* ===== LIGHTBOX ===== */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(15,8,2,.93); z-index: 999; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lb-close { position: absolute; top: 1.2rem; right: 1.8rem; background: none; border: none; color: var(--ambre); font-size: 2rem; cursor: pointer; line-height: 1; z-index: 10; }

/* Vue mosaïque */
.lb-mosaic { display: flex; flex-direction: column; gap: 1.2rem; width: min(94vw, 1020px); max-height: 90vh; overflow-y: auto; padding: 2rem 2rem 1.5rem; scrollbar-width: thin; scrollbar-color: rgba(201,160,106,.2) transparent; }
.lb-mosaic-info h2 { font-family: var(--font-titre); color: var(--sable); font-size: 1.4rem; font-weight: 400; }
.lb-mosaic-info p { color: var(--ambre); font-size: .82rem; margin-top: .4rem; line-height: 1.5; }
.lb-mosaic-grid { columns: 3; column-gap: 4px; }
.lb-mosaic-grid img { width: 100%; height: auto; display: block; break-inside: avoid; margin-bottom: 4px; cursor: pointer; transition: opacity .15s; }
.lb-mosaic-grid img:hover { opacity: .72; }

/* Vue plein écran */
.lb-fullscreen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default; }
.lb-fullscreen img { max-width: min(88vw, 1100px); max-height: 82vh; object-fit: contain; cursor: default; }
.lb-back { position: absolute; top: 1.2rem; left: 1.8rem; background: none; border: 1px solid rgba(201,160,106,.35); color: var(--ambre); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: .35rem .85rem; cursor: pointer; font-family: var(--font-body); transition: background .15s; }
.lb-back:hover { background: rgba(201,160,106,.1); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(20,10,4,.5); border: 1px solid rgba(201,160,106,.3); color: var(--ambre); width: 48px; height: 48px; font-size: 2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-counter { color: #9a7a5a; font-size: .8rem; margin-top: .6rem; }

/* ===== INTERLUDE ===== */
.interlude { position: relative; height: 180px; overflow: hidden; display: flex; align-items: center; }
.int-photo { position: absolute; inset: 0; background-image: url('https://images.unsplash.com/photo-1541123437800-1bb1317badc2?w=1600&q=80'); background-size: cover; background-position: center 30%; }
.int-veil { position: absolute; inset: 0; background: rgba(25,12,4,.74); }
.int-content { position: relative; max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.int-content blockquote { font-family: var(--font-titre); font-size: clamp(1rem, 2.5vw, 1.4rem); font-style: italic; color: var(--sable); line-height: 1.55; max-width: 700px; }
.int-content cite { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7a5a30; margin-top: .8rem; font-style: normal; display: block; }

/* ===== PAGES INTERNES ===== */
.page-hero { background: var(--brun); color: var(--sable); padding: 3.5rem 0 2.5rem; }
.page-hero h1 { font-family: var(--font-titre); font-size: clamp(2rem, 5vw, 3rem); font-weight: 400; margin-bottom: .5rem; color: var(--sable); }
.page-hero p { color: #7a6040; font-size: .9rem; }

/* À PROPOS */
.apropos-content { padding: 3.5rem 0; max-width: 680px; }
.apropos-content h2 { font-family: var(--font-titre); font-size: 1.4rem; font-weight: 400; color: #3d2610; margin: 2rem 0 .7rem; }
.apropos-content p { color: var(--gris); line-height: 1.9; margin-bottom: .9rem; }
.btn-outline { display: inline-block; border: 1.5px solid var(--terre); color: var(--terre); padding: .65rem 1.5rem; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; transition: all .2s; }
.btn-outline:hover { background: var(--brun); color: var(--sable); border-color: var(--brun); }

/* CONTACT */
.contact-wrap { padding: 3.5rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-infos h2 { font-family: var(--font-titre); font-size: 1.4rem; font-weight: 400; color: #3d2610; margin-bottom: 1.2rem; }
.contact-infos p { color: var(--gris); margin-bottom: .7rem; font-size: .9rem; }
.contact-form label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--terre); margin-bottom: .3rem; margin-top: .9rem; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid rgba(139,78,30,.3); background: var(--creme); padding: .65rem .9rem; font-family: var(--font-body); font-size: .9rem; color: var(--brun); outline: none; transition: border .2s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--terre); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button { margin-top: 1.1rem; }

/* MESSAGES */
.msg-ok { background: #e8f5e8; border: 1px solid #a0c8a0; padding: .7rem 1rem; color: #2a6a2a; margin-bottom: 1.2rem; font-size: .88rem; }
.msg-err { background: #fbe8e8; border: 1px solid #d4a0a0; padding: .7rem 1rem; color: #8b2020; margin-bottom: 1.2rem; font-size: .88rem; }

/* ===== FOOTER ===== */
footer {
  position: relative;
  background-image: url('images/fond-metal.jpg');
  background-size: cover;
  background-position: center;
  color: var(--ambre); padding: 1.5rem 0; margin-top: 5px;
  box-shadow: 0 -3px 14px rgba(0,0,0,.55);
}
footer::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(10,3,1,.15);
  pointer-events: none; z-index: 0;
}
.footer-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(230,195,145,.75); padding-top: 10px; }
footer a { color: var(--ambre); }
footer a:hover { color: #F0E0C8; }

/* ===== ADMIN ===== */
.admin-body { background: #f0ebe2; }
.admin-wrap { max-width: 820px; margin: 0 auto; padding: 3rem 1.5rem; }
.admin-wrap h1 { font-family: var(--font-titre); font-size: 1.8rem; font-weight: 400; color: #3d2610; margin-bottom: 2rem; }
.admin-card { background: #fff; border: 1px solid #e0d8ce; padding: 2rem; margin-bottom: 2rem; }
.admin-card h2 { font-size: 1rem; font-weight: 500; color: #3d2610; margin-bottom: 1.2rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--terre); margin-bottom: .35rem; }
.field input, .field select, .field textarea { width: 100%; padding: .6rem .9rem; border: 1px solid #d4c8bc; background: #faf8f4; font-size: .9rem; font-family: var(--font-body); outline: none; transition: border .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--terre); }
.field textarea { min-height: 75px; resize: vertical; }
.field-check { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; font-size: .88rem; color: var(--gris); cursor: pointer; }
.field-check input[type=checkbox] { width: auto; }
.btn-admin { background: var(--brun); color: var(--sable); border: none; padding: .7rem 1.8rem; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; font-family: var(--font-body); transition: background .2s; }
.btn-admin:hover { background: var(--noir); }
.creation-list { list-style: none; }
.creation-list li { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid #e8e0d8; font-size: .88rem; }
.creation-list .thumb { width: 62px; height: 47px; object-fit: cover; background: #d4c5b0; flex-shrink: 0; }
.creation-list .thumb-ph { width: 62px; height: 47px; background: #d4c5b0; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.creation-list .info { flex: 1; }
.creation-list .info strong { display: block; color: #3d2610; }
.creation-list .info span { color: var(--gris); font-size: 12px; }
.star-badge { color: var(--ambre); font-size: 13px; }
.del-btn { background: none; border: 1px solid #c9a0a0; color: #8b2020; padding: .28rem .65rem; cursor: pointer; font-size: 11px; }
.del-btn:hover { background: #8b2020; color: #fff; }
.upload-preview { margin-top: .5rem; max-width: 200px; border: 1px dashed rgba(139,78,30,.3); padding: .3rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .disciplines { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  nav { grid-template-columns: auto 1fr auto; height: 72px; }
  .nav-brand-name { font-size: 22px; }
  .nav-brand-sub { display: none; }
  nav ul { display: none; }
  nav ul.open { display: flex; flex-direction: column; position: fixed; top: 72px; left: 0; right: 0; background: linear-gradient(160deg, #2A0E04 0%, #7A2E0C 60%, #4A1A06 100%); padding: 1.5rem 2rem; border-bottom: 2px solid #120302; gap: 1rem; z-index: 99; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
  .nav-toggle { display: block; }
  .search-wrap { display: none; }
  .hero-content { grid-template-columns: 1fr; gap: 2rem; }
  .hero-cadre { aspect-ratio: 16/9; }
  .hero { min-height: auto; padding-bottom: 2rem; }
  .contact-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .slideshow { height: 300px; }
  .galerie-grid { columns: 2; }
  #galerie-home { columns: 2; }
  #galerie { columns: 2; }
  .lb-mosaic-grid { columns: 2; }
}
@media (max-width: 500px) {
  .disciplines { grid-template-columns: 1fr 1fr; }
  .galerie-grid { columns: 1; }
  #galerie { columns: 1; }
  .lb-mosaic-grid { columns: 2; }
}
