/* Page d'accueil des Viguenets — version 2, ambiance parchemin illustré */
:root {
  --foret:#263F32; --creme:#F3EBDD; --terre:#943F35;
  --cuir:#68452F; --or:#C6A45B;
}
* { box-sizing:border-box; }
html { min-height:100%; background:#EBD7B3; }
body {
  margin:0; min-height:100vh; color:var(--foret);
  background:#EBD7B3 url('Graphique/Fond_Accueil_Parchemin.png') center top / cover fixed no-repeat;
  font-family:Georgia,'Times New Roman',serif;
}
.accueil { position:relative; z-index:1; width:min(1280px,calc(100% - 52px)); margin:auto; padding:24px 0 18px; }
.entete { text-align:center; margin-bottom:110px; }
.logo { display:block; width:min(440px,78vw); height:auto; margin:0 auto 6px; filter:drop-shadow(0 3px 4px rgba(45,35,17,.14)); }
.signature { margin:0; color:var(--foret); font-size:clamp(16px,1.8vw,21px); font-style:italic; letter-spacing:.035em; text-shadow:0 1px 2px rgba(255,250,230,.75); }
.ornement { width:min(230px,45vw); height:1px; margin:13px auto 0; background:linear-gradient(90deg,transparent,#943F35,transparent); position:relative; }
.ornement:after { content:'✦'; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); padding:0 10px; background:#F2DDB8; color:var(--terre); font-size:13px; }
.contenu-principal { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(340px,.9fr); align-items:center; gap:clamp(24px,4vw,54px); }
.grille-boutons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(12px,1.8vw,22px); align-content:center; }
.bouton-rubrique { display:block; overflow:visible; line-height:0; background:transparent; border:0; border-radius:0; box-shadow:none; transition:transform .2s ease,filter .2s ease; }
.bouton-rubrique img { display:block; width:100%; height:auto; object-fit:contain; }
.bouton-rubrique:hover,.bouton-rubrique:focus-visible { transform:translateY(-3px) scale(1.015); filter:drop-shadow(0 7px 8px rgba(65,43,20,.25)); outline:none; }
.carnet {
  position:relative; width:min(100%,410px); min-height:520px; margin:0 auto;
  padding:18px 18px 18px 43px; border:1px solid rgba(47,29,18,.55);
  border-radius:9px 14px 14px 9px;
  background:linear-gradient(105deg,rgba(35,20,12,.42),transparent 10%),repeating-linear-gradient(8deg,rgba(255,255,255,.025) 0 1px,transparent 1px 5px),linear-gradient(145deg,#8b6547,#5d3d2a 56%,#755038);
  box-shadow:10px 15px 25px rgba(50,33,20,.28),inset 0 1px 1px rgba(255,255,255,.25);
  transform:perspective(1100px) rotateY(-1deg) rotateZ(-.25deg);
}
.carnet:before { content:""; position:absolute; inset:7px 8px 7px 30px; border-radius:4px 10px 10px 4px; background:#e9d7b7; box-shadow:inset 0 0 0 1px rgba(111,79,51,.25),2px 3px 5px rgba(35,22,12,.24); }
.tranche-pages { position:absolute; z-index:1; top:13px; right:5px; bottom:13px; width:9px; border-radius:0 6px 6px 0; background:repeating-linear-gradient(to bottom,#e8d8bc 0 3px,#cbb997 3px 4px); }
.spirale { position:absolute; z-index:4; left:9px; top:20px; bottom:20px; display:flex; flex-direction:column; justify-content:space-around; }
.spirale span { display:block; width:28px; height:13px; margin-left:-4px; border:3px solid #b99550; border-right-color:#e1c77f; border-radius:12px; background:transparent; box-shadow:1px 2px 2px rgba(25,17,9,.45); }
.couverture { position:absolute; z-index:3; inset:17px 20px 17px 34px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; border:1px solid rgba(221,190,128,.65); border-radius:4px 9px 9px 4px; color:#f2dfb6; background:radial-gradient(ellipse at 50% 38%,rgba(194,151,96,.18),transparent 58%),repeating-linear-gradient(8deg,rgba(255,255,255,.025) 0 1px,transparent 1px 5px),linear-gradient(135deg,#79543b,#4e3325 65%,#68472f); box-shadow:inset 0 0 0 5px rgba(201,166,102,.13),inset 0 0 22px rgba(20,10,5,.3); }
.couverture p { margin:17px 0 12px; font-size:clamp(28px,3vw,40px); line-height:1.22; font-variant:small-caps; letter-spacing:.04em; text-shadow:0 2px 3px rgba(0,0,0,.55); }
.couverture small { font-size:13px; color:#e4d0a8; font-style:italic; }
.medaillon { width:65px; height:65px; border:2px solid var(--or); border-radius:50%; display:grid; place-items:center; box-shadow:inset 0 0 0 4px rgba(198,164,91,.2),0 2px 8px rgba(0,0,0,.3); }
.medaillon span { font-size:29px; color:#e8d19d; }
.ruban { width:74px; height:3px; background:linear-gradient(90deg,transparent,var(--or),transparent); }
.page-carnet {
  position:relative; z-index:2; min-height:484px; display:flex; flex-direction:column;
  padding:8px 8px 8px; border:0; border-radius:4px 9px 9px 4px;
  background:transparent url('Graphique/Fond_Parchemin.png') center / 100% 100% no-repeat;
  box-shadow:none;
}
.zone-affiche { position:relative; display:flex; flex:1; min-height:440px; align-items:center; justify-content:center; padding:8px 8px 22px; }
.affiche-cliquable { display:flex; align-items:center; justify-content:center; width:100%; min-height:0; padding:0; border:0; background:transparent; cursor:pointer; }
.affiche-cliquable img { display:block; width:auto; max-width:94%; height:auto; max-height:420px; object-fit:contain; filter:drop-shadow(0 4px 7px rgba(40,25,13,.28)); transition:opacity .15s ease; }
.pied-carnet { margin:0; padding:5px 0 0; text-align:center; color:#75543a; font-size:12px; font-style:italic; }
.commandes-affiche { position:absolute; left:50%; bottom:3px; transform:translateX(-50%); display:flex; align-items:center; gap:13px; padding:3px 8px; border-radius:20px; background:rgba(248,238,220,.92); color:#68452f; font-size:12px; }
.commandes-affiche button { border:0; background:transparent; color:#68452f; font:22px Georgia; cursor:pointer; }
.coin-plus { position:absolute; z-index:5; top:12px; right:7px; width:38px; height:38px; border:1px solid #b9965a; border-radius:0 0 0 8px; background:linear-gradient(135deg,#fff8e9,#d9c39a); color:#68452f; font:bold 24px Georgia; cursor:pointer; box-shadow:-2px 2px 5px rgba(50,30,15,.2); }
.autres-evenements { position:absolute; z-index:8; inset:28px 22px 28px 42px; padding:26px 20px 18px; border:1px solid #b79b6d; border-radius:4px; background:#f5ead5; box-shadow:0 12px 28px rgba(30,20,12,.32); overflow:auto; }
.autres-evenements[hidden] { display:none; }
.autres-evenements h2 { margin:0 0 16px; color:#68452f; text-align:center; font-size:21px; }
.autres-evenements ul { list-style:none; margin:0; padding:0; }
.autres-evenements li { display:flex; align-items:center; gap:10px; padding:11px 0; border-top:1px solid rgba(104,69,47,.2); font-size:13px; }
.autres-evenements li time { font-weight:bold; color:var(--terre); white-space:nowrap; }
.autres-evenements li span { flex:1; overflow-wrap:anywhere; }
.autres-evenements li a,.autres-evenements li button { border:1px solid #a98b5c; border-radius:4px; padding:4px 8px; background:#eee0c4; color:#503a27; font:inherit; cursor:pointer; }
.fermer-autres { position:absolute; right:9px; top:5px; border:0; background:none; color:#68452f; font-size:27px; cursor:pointer; }
.pied-site { display:flex; justify-content:center; gap:8px; margin-top:20px; color:#5c4936; font-size:12px; text-shadow:0 1px rgba(255,255,255,.6); }
.visionneuse { position:fixed; z-index:20; inset:0; display:flex; align-items:center; justify-content:center; padding:30px; background:rgba(25,18,13,.84); }
.visionneuse[hidden] { display:none; }
.visionneuse img { max-width:min(92vw,1000px); max-height:88vh; object-fit:contain; box-shadow:0 12px 35px rgba(0,0,0,.5); }
.fermer-visionneuse { position:absolute; top:16px; right:22px; border:0; background:transparent; color:#fff; font-size:42px; cursor:pointer; }
@media(max-width:820px) {
  body { background-attachment:scroll; }
  .accueil { width:min(620px,calc(100% - 30px)); padding-top:18px; }
  .contenu-principal { grid-template-columns:1fr; gap:28px; }
  .grille-boutons { max-width:520px; width:100%; margin:0 auto; }
  .carnet { width:min(100%,410px); min-height:500px; transform:none; }
  .page-carnet { min-height:464px; }
  .zone-affiche { min-height:420px; }
}
@media(max-width:480px) {
  .accueil { width:calc(100% - 20px); }
  .entete { margin-bottom:18px; }
  .logo { width:min(340px,84vw); }
  .signature { font-size:15px; }
  .grille-boutons { gap:9px; }
  .carnet { min-height:430px; padding:14px 12px 14px 34px; }
  .page-carnet { min-height:398px; }
  .zone-affiche { min-height:355px; }
  .affiche-cliquable img { max-height:345px; }
  .spirale span { width:24px; height:11px; }
  .autres-evenements { inset:22px 12px 22px 30px; padding:26px 12px 14px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
