:root{
  --bg:#f5f1e8;
  --paper:#fffdf8;
  --ink:#203429;
  --muted:#7a746c;
  --line:#ded6c8;
  --green:#234f3b;
  --green-dark:#17392b;
  --green-soft:#dce6dd;
  --gold:#b28a46;
  --gold-soft:#e8d6ab;
  --danger:#9e3434;
  --shadow:0 18px 45px rgba(55,45,32,.10);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at top left,rgba(178,138,70,.08),transparent 26rem),
    linear-gradient(180deg,#f8f5ee 0%,var(--bg) 100%);
  color:var(--ink);
}

body::before,
body::after{
  content:"";
  position:fixed;
  z-index:-1;
  width:240px;
  height:240px;
  border:1px solid rgba(35,79,59,.12);
  border-radius:50%;
}

body::before{top:-140px;left:-120px}
body::after{right:-150px;bottom:-140px}

a{color:var(--green)}

.wrap{
  width:min(760px,100%);
  margin:auto;
  padding:28px 18px 70px;
}

.hero{
  text-align:center;
  padding:28px 4px 20px;
}

.hero-kicker,
.gallery-kicker{
  color:var(--gold);
  font-size:.82rem;
  font-weight:800;
  letter-spacing:.28em;
  text-transform:uppercase;
  margin-bottom:15px;
}

.hero h1,
.gallery-cover h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-weight:500;
  color:var(--green-dark);
  font-size:clamp(3rem,11vw,5rem);
  line-height:.95;
}

.hero h1 span,
.gallery-cover h1 span{
  color:var(--gold);
  font-size:.64em;
  font-style:italic;
  font-weight:400;
}

.hero-ornament{
  margin:18px 0 20px;
  color:var(--gold);
  font-family:Georgia,serif;
  font-size:2rem;
}

.hero-photo-frame{
  position:relative;
  padding:9px;
  border:1px solid rgba(178,138,70,.45);
  background:rgba(255,255,255,.6);
  border-radius:30px;
  box-shadow:var(--shadow);
}

.hero-photo-frame::before,
.hero-photo-frame::after{
  content:"";
  position:absolute;
  width:58px;
  height:58px;
  border-color:var(--gold);
  opacity:.5;
}

.hero-photo-frame::before{
  top:-7px;
  left:-7px;
  border-top:1px solid;
  border-left:1px solid;
  border-radius:24px 0 0 0;
}

.hero-photo-frame::after{
  right:-7px;
  bottom:-7px;
  border-right:1px solid;
  border-bottom:1px solid;
  border-radius:0 0 24px 0;
}

.hero-photo{
  width:100%;
  max-height:520px;
  object-fit:cover;
  object-position:center;
  border-radius:22px;
  display:block;
}

.hero-intro{
  max-width:600px;
  margin:30px auto 5px;
  color:#5f675f;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.16rem;
  line-height:1.7;
}

.card{
  background:rgba(255,253,248,.96);
  border:1px solid rgba(178,138,70,.30);
  border-radius:28px;
  padding:26px;
  box-shadow:var(--shadow);
}

.form-title{
  text-align:center;
  padding:4px 0 12px;
  margin-bottom:8px;
}

.form-title-small{
  display:block;
  color:var(--gold);
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.22em;
  font-weight:800;
  margin-bottom:7px;
}

.form-title strong{
  display:block;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.7rem;
  font-weight:500;
  color:var(--green-dark);
}

label{
  display:block;
  font-weight:700;
  margin:18px 0 8px;
  color:var(--green-dark);
}

input[type=text],
input[type=password],
textarea,
input[type=file]{
  width:100%;
  font:inherit;
  color:var(--ink);
  border:1px solid #d8d0c2;
  border-radius:14px;
  padding:14px;
  background:#fff;
  outline:none;
}

input[type=text]:focus,
input[type=password]:focus,
textarea:focus{
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(178,138,70,.12);
}

textarea{
  resize:vertical;
  min-height:150px;
  line-height:1.5;
}

.file-input{
  position:absolute;
  width:1px!important;
  height:1px;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
}

.photo-button{
  display:flex;
  align-items:center;
  gap:14px;
  padding:15px;
  border:1px dashed rgba(35,79,59,.45);
  background:var(--green-soft);
  border-radius:16px;
  cursor:pointer;
  margin-top:8px;
}

.photo-button:hover{background:#d4e1d6}

.photo-icon{font-size:1.6rem}

.photo-button strong{display:block}

.photo-button small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-weight:400;
}

.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-weight:400;
  color:#5e655e;
}

.check input{margin-top:4px}

button,
.button-link{
  display:inline-block;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,var(--green),var(--green-dark));
  color:white;
  text-decoration:none;
  font:inherit;
  font-weight:800;
  padding:15px 21px;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(35,79,59,.18);
}

.card>button{
  width:100%;
  margin-top:22px;
}

button:hover,
.button-link:hover{filter:brightness(1.06)}

.muted,
.small,
time,
small{color:var(--muted)}

.center{
  text-align:center;
  margin-top:26px;
}

.book-link{
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.08rem;
  text-decoration:none;
  border-bottom:1px solid var(--gold-soft);
  padding-bottom:4px;
}

.alert{
  background:#fff0f0;
  border:1px solid #ecc0c0;
  padding:12px 14px;
  border-radius:12px;
  margin:0 0 14px;
}

.preview-wrap{
  margin-top:14px;
  padding:8px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
}

.preview-wrap img{
  width:100%;
  max-height:440px;
  object-fit:cover;
  border-radius:13px;
  display:block;
}

.site-footer{
  margin-top:50px;
  text-align:center;
  color:var(--gold);
  letter-spacing:.25em;
  font-size:.76rem;
  font-weight:800;
}

/* GALERIE / LIVRE */

.gallery-wrap{
  width:min(1050px,100%);
  margin:auto;
  padding:34px 18px 80px;
}

.gallery-cover{
  max-width:760px;
  margin:0 auto 42px;
  padding:34px 20px 26px;
  text-align:center;
}

.gallery-cover p{
  color:var(--muted);
  font-size:1rem;
  margin:0 0 22px;
}

.album-list{
  display:grid;
  gap:34px;
}

.album-page{
  position:relative;
  width:min(860px,100%);
  margin:auto;
  background:var(--paper);
  border:1px solid rgba(178,138,70,.26);
  border-radius:28px;
  padding:28px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.album-page::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  background:linear-gradient(var(--green),var(--gold));
  opacity:.65;
}

.album-page-number{
  position:absolute;
  right:24px;
  top:18px;
  color:rgba(178,138,70,.7);
  font-family:Georgia,serif;
  font-size:.85rem;
  letter-spacing:.18em;
}

.album-photo-wrap{
  margin:4px 0 26px;
  padding:9px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
}

.album-photo{
  display:block;
  width:100%;
  max-height:640px;
  object-fit:contain;
  background:#f2eee6;
  border-radius:14px;
}

.album-text{
  max-width:680px;
  margin:auto;
  position:relative;
  text-align:center;
  padding:2px 10px 4px;
}

.quote-mark{
  font-family:Georgia,"Times New Roman",serif;
  color:var(--gold-soft);
  font-size:5rem;
  line-height:.7;
  height:45px;
}

.album-text p{
  margin:0 auto 20px;
  font-family:Georgia,"Times New Roman",serif;
  color:#37473d;
  font-size:clamp(1.05rem,2vw,1.35rem);
  line-height:1.7;
}

.album-signature{
  font-weight:800;
  color:var(--green);
  margin-top:14px;
}

.album-text time{
  display:block;
  margin-top:7px;
  font-size:.8rem;
}

.gallery-bottom{
  text-align:center;
  margin-top:38px;
}

.empty{
  max-width:700px;
  margin:auto;
  background:#fff;
  padding:30px;
  border-radius:20px;
  text-align:center;
  border:1px solid var(--line);
}

/* ADMIN - conservé simple */

.admin-wrap{
  max-width:1200px;
  margin:auto;
  padding:30px 18px 60px;
}

.admin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:24px;
}

.admin-head h1{margin:0}

.admin-list{display:grid;gap:16px}

.admin-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  display:grid;
  grid-template-columns:180px 1fr;
}

.admin-card img{
  width:180px;
  height:100%;
  min-height:180px;
  object-fit:cover;
}

.admin-content{padding:18px}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:16px;
}

.actions form{margin:0}

.secondary{background:#6b6b6b}
.danger{background:var(--danger)}

.thanks{
  text-align:center;
  margin-top:70px;
}

.big{font-size:4rem}

.thanks h1{
  font-family:Georgia,"Times New Roman",serif;
  color:var(--green-dark);
  font-size:clamp(2rem,8vw,3.4rem);
}

.thanks .button-link{margin-top:14px}
.link-secondary{display:block;margin-top:18px}

@media(max-width:650px){
  .wrap{padding:18px 14px 52px}

  .hero{padding-top:18px}

  .hero h1,
  .gallery-cover h1{
    font-size:clamp(2.75rem,14vw,4rem);
  }

  .hero-photo{
    max-height:430px;
  }

  .card{
    padding:21px 17px;
    border-radius:22px;
  }

  .album-page{
    padding:22px 16px 24px;
    border-radius:22px;
  }

  .album-photo{
    max-height:none;
  }

  .admin-card{grid-template-columns:1fr}
  .admin-card img{width:100%;height:250px}

  .gallery-cover .button-link{
    width:100%;
    text-align:center;
  }
}

@media print{
  body{background:#fff}

  .gallery-cover .button-link,
  .gallery-bottom{
    display:none;
  }

  .album-page{
    box-shadow:none;
    break-after:page;
    page-break-after:always;
    border:1px solid #ddd;
  }
}
