:root{
  --bg:#fbfaf9;
  --ink:#40424b;
  --muted:#7a7f8c;
  --card:#ffffffcc;
  --line:#e9e7e4;

  --shadow: 0 10px 30px rgba(25,25,25,.08);
  --shadow2: 0 14px 40px rgba(25,25,25,.12);

  --radius:18px;
  --radius2:24px;

  --container: 1120px;

  --accent:#d98b6b;
  --accent2:#c97a5d;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:var(--bg);
}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
.container{max-width:var(--container);margin:0 auto;padding:0 22px}

/* =========================
   HEADER
========================= */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(251,250,249,.86);
  backdrop-filter: blur(8px);
  border-bottom:1px solid rgba(0,0,0,.04);
}
.header-inner{
  min-height:74px;
  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap:18px;
}
.brand{display:flex;align-items:center;gap:10px}
.brand-mark{
  height:54px;
  border-radius:12px;
  object-fit:cover;
  display:block;
}
.text-mark{
    display: block;
    margin: auto;
    max-width: 360px;
}
.brand-text{font-family:"Cormorant Garamond", serif;letter-spacing:.08em;font-size:26px}

.nav-primary{
  justify-self:center;
  margin:0;
}
.menu{display:flex;gap:22px;list-style:none;margin:0;padding:0}
.menu a{font-weight:500;color:#545966}

.header-actions{
  justify-self:end;
  display:flex;
  align-items:center;
  gap:10px;
}
.icon-btn{
  border:0;
  background:transparent;
  width:38px;height:38px;
  border-radius:12px;
  display:grid;place-items:center;
  cursor:pointer
}
.burger{display:none}
.burger-lines{width:18px;height:12px;position:relative}
.burger-lines:before,.burger-lines:after,.burger-lines span{content:"";position:absolute;left:0;right:0;height:2px;background:#5a5f6b;border-radius:2px}
.burger-lines:before{top:0}
.burger-lines:after{bottom:0}

.mobile-drawer{
  border-top:1px solid rgba(0,0,0,.05);
  padding:14px 0;
}
.mobile-menu{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:10px 0;
}
.mobile-menu a{
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.6);
  border:1px solid rgba(0,0,0,.05);
}

/* =========================
   HERO
========================= */
.hero{
  position:relative;
  padding:54px 0 30px;
  overflow:hidden
}
.hero-bg{
  position:absolute;
  inset:-60px -60px auto -60px;
  height:640px;

  background-image:
  /*
    radial-gradient(900px 280px at 50% 12%, rgba(255,255,255,.92), rgba(255,255,255,0)),
    linear-gradient(180deg, rgba(251,250,249,.92) 0%, rgba(251,250,249,.62) 45%, rgba(251,250,249,0) 100%),
    linear-gradient(0deg, rgba(251,250,249,.55) 0%, rgba(251,250,249,0) 45%), */
    url("../img/hero-forest.jpg");

  background-size: cover;
  background-position: center 26%;
  background-repeat: no-repeat;

  filter: saturate(.95) contrast(.98);
}
.hero-inner{position:relative;text-align:center}
.hero-title{
  font-family:"Cormorant Garamond", serif;
  font-size:78px;
  letter-spacing:.08em;
  margin:38px 0 20px;
  color:#5a5f6b;
  position:relative;
}
.hero-title::after{
  content:"";
  display:block;
  width:340px;
  max-width:72vw;
  height:1px;
  margin:16px auto 0;
  background:rgba(90,95,107,.22);
}
.hero-subtitle{margin:0 0 34px;color:#7c8190}

/* 4 cards top */
.top-links{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:22px;
  max-width:860px;
  margin:0 auto;
}
.top-card{
  position:relative;
  overflow:hidden;

  display:flex;
  align-items:center;
  gap:18px;

  padding:26px 30px;
  border-radius:var(--radius2);

  background:rgba(255,255,255,.55);
  box-shadow: var(--shadow);
  border:1px solid rgba(0,0,0,.04);
  min-height:108px;

  transition: transform .2s ease, box-shadow .2s ease;
}
.top-card:hover{transform: translateY(-2px); box-shadow: var(--shadow2);}

.top-card::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.30));
  pointer-events:none;
}
.top-card > *{position:relative;z-index:1}

/* backgrounds */
.top-card.card-mag{
  background-image: url("../img/card-magazine.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.top-card.card-ann{
  background-image: url("../img/card-annuaire.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.top-card.card-age{
  background-image: url("../img/card-agenda.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.top-card.card-eve{
  background-image: url("../img/card-evenements.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.top-card-icon{
  width:72px;
  height:72px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(0,0,0,.04);
}
.top-card-icon img{
  width:64px;
  height:64px;
  display:block;
  filter: drop-shadow(0 8px 12px rgba(25,25,25,.10));
}

.top-card-title{font-family:"Cormorant Garamond", serif;font-size:34px;color:#5a5f6b;line-height:1}
.top-card-sub{color:#7a7f8c;margin-top:6px}

/* =========================
   HOME PANELS (section centrale)
========================= */
.home-panels{padding:34px 0 26px}

.panel-wrap{
  background: rgba(255,255,255,.60);
  border: 1px solid rgba(0,0,0,.045);
  border-radius: 30px;
  box-shadow: 0 18px 55px rgba(30,30,30,.08);
  padding: 30px 34px;
}

.panel-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px 34px;
}

.panel{padding:10px 10px 16px}

/* title + thin rule */
.panel-head{margin-bottom:14px;}
.panel-title{
  font-family:"Cormorant Garamond", serif;
  color:#566070;
  font-size:24px;
  margin:0;
}
.panel-rule{
  height:1px;
  margin-top:12px;
  background: rgba(90,95,107,.18);
}

.cards-3{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.cards-2{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px
}

.mini-card{
  background:rgba(255,255,255,.78);
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 10px 26px rgba(25,25,25,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mini-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(25,25,25,.12);
}

.mini-card-media{height:112px;background:rgba(90,95,107,.06)}
.mini-card-media img{width:100%;height:100%;object-fit:cover}
.mini-card-body{padding:12px 12px 14px}
.mini-card-kicker{font-size:12px;color:rgba(90,95,107,.65)}
.mini-card-title{font-size:13px;font-weight:600;color:#454b57;margin-top:6px}



.mini-card-sub{
  font-size:12px;
  color:#7f8593;
  margin-top:4px;
}

.panel-cta{display:flex;justify-content:center;margin-top:14px}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 20px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.62);
  color:#5b606c;
  font-weight:500;
  box-shadow: 0 8px 22px rgba(25,25,25,.06);
  transition: box-shadow .18s ease, transform .18s ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(25,25,25,.10);
}
.btn-accent{background:linear-gradient(180deg,var(--accent),var(--accent2)); color:#fff;border-color:transparent}

/* list "A venir" */
.list{display:flex;flex-direction:column;gap:12px}
.list-item{
  display:flex;
  gap:14px;
  align-items:center;
  padding:14px;
  border-radius:16px;
  background:rgba(255,255,255,.74);
  border:1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 22px rgba(25,25,25,.06);
}
.date{
  width:56px;
  min-width:56px;
  height:56px;
  border-radius:16px;
  background:rgba(90,95,107,.07);
  border:1px solid rgba(0,0,0,.04);
  display:grid;place-items:center;
  text-align:center;
  font-weight:700;
  color:#5b606c;
  line-height:1.05;
}
.date small{display:block;font-size:11px;font-weight:600;color:#7c8190;margin-top:4px}
.list-title{font-weight:600;color:#4b505c}
.list-sub{font-size:12px;color:#7f8593;margin-top:2px}


/* ===== A VENIR (upcoming) ===== */
.up-item{
  position:relative;
  display:grid;
  grid-template-columns: 86px 1fr;
  gap:16px;
  align-items:center;

  padding: 14px 18px;
  border-radius: 18px;

  background: rgba(255,255,255,.74);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 12px 26px rgba(25,25,25,.08);

  overflow:hidden;
}

.up-date{
  width: 78px;
  height: 78px;
  border-radius: 18px;
  display:grid;
  place-items:center;
  text-align:center;
  padding: 14px;
  background: rgba(90,95,107,.06);
  border: 1px solid rgba(0,0,0,.04);
}

.up-day{
  font-size: 28px;
  font-weight: 700;
  color:#49505c;
  line-height:1;
}
.up-month{
  margin-top:6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing:.08em;
  color:#7a8190;
}

.up-body{position:relative; z-index:2; padding-right: 80px;}
.up-tag{
  font-size: 12px;
  color: rgba(217,139,107,.85);
  font-weight:600;
  margin-bottom: 4px;
}
.up-title{
  font-weight: 700;
  color:#46505e;
  margin: 0;
}
.up-sub{
  font-size: 12px;
  color:#7f8593;
  margin-top: 4px;
  max-width: 520px;
}



/* Thèmes couleurs (pastel) pour le bloc date */
.up-theme-sand .up-date{ background: rgba(205,187,162,.35); }
.up-theme-rose .up-date{ background: rgba(216,170,176,.32); }
.up-theme-green .up-date{ background: rgba(170,200,176,.32); }

/* Mobile */
@media (max-width: 640px){
  .up-item{grid-template-columns: 76px 1fr;}
  .up-date{width:70px;height:70px;border-radius:16px;}
  .up-body{padding-right: 0;}
  .up-art{display:none;} /* sur mobile on cache l’illustration comme souvent */
}

/* events */
.event-card{
  display:flex;
  flex-direction:column;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 10px 26px rgba(25,25,25,.08);
}
.event-media{height:120px;background:rgba(90,95,107,.06)}
.event-body{padding:12px}
.event-title{font-weight:700;color:#4b505c}
.event-sub{font-size:12px;color:#7f8593;margin-top:4px}
.event-meta{display:flex;justify-content:space-between;align-items:center;margin-top:10px;color:#7f8593;font-size:12px}
.chip{
  width:52px;
  height:22px;
  border-radius:10px;
  background:rgba(217,139,107,.22)
}

/* =========================
   NEWSLETTER
========================= */
.newsletter{padding:20px 0 56px}
.newsletter-box{
  border-radius:26px;
  background: linear-gradient(90deg, rgba(178,210,232,.45), rgba(244,216,200,.45));
  border:1px solid rgba(0,0,0,.04);
  box-shadow: var(--shadow);
  padding:28px;
  text-align:center;
}
.newsletter-title{font-family:"Cormorant Garamond", serif;color:#5a5f6b;font-size:28px;margin:0}
.newsletter-sub{color:#7f8593;margin:8px 0 16px}
.newsletter-form{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap}
.input{
  width:min(420px, 90vw);
  height:44px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  padding:0 16px;
  background:rgba(255,255,255,.75);
  outline:none;
}
.form-msg{margin-top:10px;font-size:13px}
.form-msg.ok{color:#2f7a49}
.form-msg.err{color:#a43838}

/* =========================
   FOOTER
========================= */
.site-footer{
  border-top:1px solid rgba(0,0,0,.05);
  padding:18px 0 26px;
  background:rgba(251,250,249,.86);
}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}
.footer-menu{gap:18px}
.social{display:flex;gap:10px}

/* =========================
   PAGES / POSTS
========================= */
.page-hero{padding:36px 0 8px}
.page-title{
  font-family:"Cormorant Garamond", serif;
  font-size:44px;
  color:#5a5f6b;
  margin:0;
}
.page-meta{color:#8a909e;margin-top:6px}
.content{padding:18px 0 56px}
.content-wrap{
  background:rgba(255,255,255,.70);
  border:1px solid rgba(0,0,0,.04);
  border-radius:28px;
  box-shadow: var(--shadow);
  padding:28px;
}
.prose{line-height:1.75;color:#4a4f5b}
.prose h2,.prose h3{font-family:"Cormorant Garamond", serif;color:#5a5f6b}
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}

/* =========================
   RESPONSIVE
========================= */
/* TABLETTE: on cache le menu desktop, mais on garde les 4 cartes en 2x2 */
@media (max-width: 980px){
  .nav-primary{display:none}
  .burger{display:grid}

  /* On garde 2 colonnes pour les cartes du haut */
  .top-links{grid-template-columns:repeat(2, 1fr)}

  /* Les panels passent en 1 colonne (plus lisible sur tablette) */
  .panel-grid{grid-template-columns:1fr}

  .post-grid{grid-template-columns:repeat(2, 1fr)}
  .hero-title{font-size:54px}
}

/* MOBILE: on passe les cartes du haut en 1 colonne */
@media (max-width: 640px){
  .top-links{grid-template-columns:1fr}
  .cards-3{grid-template-columns:1fr}
  .cards-2{grid-template-columns:1fr}
  .post-grid{grid-template-columns:1fr}

  .hero{padding-top:42px}
  .hero-title{font-size:44px}

  .newsletter-form{
    flex-direction:column;
    align-items:stretch;
  }
  .newsletter-form .input{width:100%}
  .newsletter-form .btn{width:100%}

  .footer-inner{flex-direction:column}
}


/* DEBUG/FIX: assure que le background agenda s'affiche */
.up-item{
  position: relative;
  overflow: hidden;
}

.up-art{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;

  width: 260px;           /* un peu plus large pour vérifier */
  z-index: 1;
  opacity: 1;             /* force visible */

  /* IMPORTANT: on force background-image (sinon une autre règle peut l'écraser) */
  background-image:
    linear-gradient(90deg,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,.55) 40%,
      rgba(255,255,255,.75) 100%
    ),
    var(--up-bg) !important;

  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;

  pointer-events: none;
}

/* contenu au-dessus */
.up-date,
.up-body{
  position: relative;
  z-index: 2;
}

