/* ======================================================
   VARIABLES / THEME
   ====================================================== */
:root{
  --text-color: rgba(47, 6, 1, 1);
  --highlight-color: #ffd700;
  --font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Palette site */
  --gold: #F4C84A;
  --cream: #F7EAD2;
  --shadow: rgba(0,0,0,.35);

  /* UI */
  --radius: 18px;

  /* Optionnel */
  --color1: rgba(47, 6, 1, 1);
  --color2: rgba(254, 240, 184, 1);
}

/* ======================================================
   RESET DE BASE
   ====================================================== */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
img{ max-width: 100%; height: auto; display: block; }

/* ======================================================
   BODY / BACKGROUND
   ====================================================== */
body{
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-family);
  overflow: auto;        /* on laisse défiler */
  min-height: 100vh;     /* page >= hauteur écran */
  height: auto;
  width: 100%;           /* évite les débordements liés à 100vw */
  position: relative;
}

/* Fond animé en dégradé (canvas étoiles derrière) */
@keyframes gradientMove{
  0%{ background-position: 0% 100%; }
  50%{ background-position: 100% 0%; }
  100%{ background-position: 0% 100%; }
}
#gradientBackground{
  background: linear-gradient(-45deg, #ffffff, rgba(254,240,184,1) 25%, rgba(47,6,1,1));
  background-size: 400% 400%;
  animation: gradientMove 20s ease infinite;
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
canvas#backgroundCanvas{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Respecte la préférence système */
@media (prefers-reduced-motion: reduce){
  #gradientBackground{ animation: none !important; }
}

/* ======================================================
   LIENS (STYLE GLOBAL)
   ====================================================== */
a{
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color .2s, text-decoration .2s;
}
a:hover,
a:focus{
  color: #fff;
  text-decoration: underline;
}

/* ======================================================
   LAYOUT DE PAGE
   ====================================================== */
.wrap{
  min-height: 100dvh;
  display: grid;
  place-items: center;
  gap: 32px;                 /* + d’air entre hero et 1ère carte */
  padding: 32px 16px;
  position: relative;
  z-index: 2;
}
@media (min-width: 900px){
  .wrap{ gap: 40px; }        /* un peu plus d’air sur desktop */
}

/* ======================================================
   HERO
   ====================================================== */
.hero{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.hero .logo{
  max-width: 500px;
  width: 80%;
  height: auto;
}
#logo-evenement{ max-width: 180px; width: 60%; }

h1{
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.1rem, 2.8vw, 2rem);
  line-height: 1.15;
  letter-spacing: .3px;
  max-width: 92vw;
}
h1 span{ color: var(--gold); }

/* ======================================================
   CARTES (CARD)
   ====================================================== */
.card{
  width: min(880px, 92vw);
  background: linear-gradient(180deg, rgba(244,200,74,.06), rgba(0,0,0,.35));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px var(--shadow);
  backdrop-filter: saturate(130%) blur(2px);
  padding: 22px clamp(16px, 3vw, 32px);
  overflow: hidden;
}

.card .card-title{
  margin: 0 0 .6rem;
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  color: var(--gold);
  letter-spacing: .2px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.card .card-title::after{
  content: "";
  display: block;
  width: 72px; height: 3px;
  margin: .5rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .9;
}
.card .card-description{
  margin: 0 0 .6rem;
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--cream);
  letter-spacing: .2px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

/* ======================================================
   DETAILS (DATE / LIEU / CTA TEXTUEL)
   ====================================================== */
.details{
  text-align: center;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
}
.details .date{ font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--gold); }
.details .place{ opacity: .95; margin: .35rem 0 .6rem; }
.details .cta{
  margin: .6rem 0 .9rem;
  padding: .4rem .8rem;
  border: 1px dashed rgba(244,200,74,.7);
  border-radius: 12px;
  background: rgba(244,200,74,.08);
  color: var(--cream);
}
.details .site a{ color: var(--gold); font-weight: 700; }
.details a:hover{ text-decoration: underline; }

/* ======================================================
   SECTION SOIRÉE / MENU (COMPAT .menu & .soiree)
   ====================================================== */
.menu, .soiree{
  border: 2px solid rgba(244,200,74,.55);
  background: linear-gradient(180deg, rgba(244,200,74,.06), rgba(0,0,0,.35));
}
.menu h2, .soiree h2{
  margin: 0 0 .6rem;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  color: var(--gold);
  letter-spacing: .3px;
  line-height: 1.2;
}
.menu-content, .soiree-content{
  display: grid;
  gap: .35rem;
  font-size: clamp(.98rem, 1.6vw, 1.1rem);
  overflow-wrap: anywhere;
}

/* Ancienne liste 'soirée' (gardée si utilisée ailleurs) */
.soiree-item{ padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.soiree-item:last-child{ border-bottom: none; }
.soiree-item h3{ margin: 0; font-size: 1.1rem; color: var(--gold); font-weight: 600; }
.soiree-item p{ margin: .2rem 0 0; font-size: .95rem; color: var(--cream); }
.soiree-item p.details{ font-size: .9rem; opacity: .9; }

/* ======================================================
   TIMELINE VERTICALE (PROGRAMME)
   ====================================================== */
.timeline{
  position: relative;
  display: grid;
  gap: 14px;
  padding: 6px 0 2px;
}
.timeline::before{
  content: "";
  position: absolute;
  left: 108px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(244,200,74,.9), rgba(244,200,74,.25));
  opacity: .85;
}
.timeline-item{
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: start;
  gap: 16px;
  position: relative;
}
.timeline-item::before{
  content: "";
  position: absolute;
  left: 108px; top: 10px;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(244,200,74,.18), 0 2px 8px var(--shadow);
}
.timeline .time{
  justify-self: end;
  min-width: 96px;
  text-align: right;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--gold);
}
.timeline .content{
  background: linear-gradient(180deg, rgba(244,200,74,.05), rgba(0,0,0,.25));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px var(--shadow);
  backdrop-filter: saturate(120%) blur(1.5px);
}
.timeline .content h3{
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.timeline .content p{
  margin: 0;
  font-size: .97rem;
  color: var(--cream);
  opacity: .95;
}

/* Menu intégré dans la timeline (section Dîner) */
.timeline .content .menu-mini{
  margin: .35rem 0 0;
  padding-left: 1.1rem;
}
.timeline .content .menu-mini li{
  margin: .15rem 0;
  color: var(--cream);
}

/* Responsive timeline */
@media (max-width: 560px){
  .timeline{ gap: 12px; }
  .timeline::before{ left: 20px; }
  .timeline-item{
    grid-template-columns: 1fr;
    padding-left: 36px;
  }
  .timeline-item::before{ left: 20px; top: 2px; }
  .timeline .time{
    justify-self: start;
    min-width: auto;
    text-align: left;
    font-size: .95rem;
    color: var(--gold);
    margin-bottom: 4px;
  }
  .timeline .content{ padding: 10px 12px; }
}

/* ======================================================
   CARTE DÎNER (INDEX) — BANNIÈRE + CTA
   ====================================================== */
.card.diner{ text-align: center; }

/* Image bannière : afficher l'image entière, sans rognage */
.dinerbanniere{
  display: block;
  margin: 0 auto;
  padding : 5px;
  width: 100%;            /* s’adapte à la largeur de la carte */
  max-width: 560px;       /* limite visuelle confortable */
  height: auto;           /* conserve les proportions */
  border-radius: 12px;
  box-shadow: 0 10px 24px var(--shadow);
}

.card.diner .card-title{ margin-top: .6rem; }

.card-intro{
  margin: .25rem auto .4rem;
  opacity: .95;
  color: var(--cream);
  font-size: clamp(.98rem, 1.7vw, 1.05rem);
}

/* Badges (date / lieu / prix) */
.badges{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .35rem 0 .2rem;
}
.badge{
  display: inline-block;
  padding: .25rem .55rem;
  border: 1px solid rgba(244,200,74,.55);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--cream);
  background: rgba(244,200,74,.08);
}

/* CTA : outline par défaut + version contrastée (primaire) */
.cta-block{ margin-top: .6rem; }
.cta-button{
  background: transparent;
  color: var(--gold);
  border: 1px dashed rgba(244,200,74,.7);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.cta-button:hover{
  background: rgba(244,200,74,.08);
  color: #fff;
}
.cta-button.cta-large{
  display: inline-block;
  padding: .7rem 1.1rem;
  font-weight: 800;
  border-radius: 12px;
  font-size: clamp(1rem, 2.2vw, 1.05rem);
}

/* Variante bouton primaire très contrastée */
.cta-button.cta-contrast{
  display: inline-block;
  background: var(--gold);
  color: #2f0601;
  border: none;
  border-radius: 12px;
  padding: .8rem 1.25rem;
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.05rem);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.cta-button.cta-contrast:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.3);
  filter: brightness(1.03);
}
.cta-button.cta-contrast:active{
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.cta-button.cta-contrast:focus-visible{
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Mobile : image pleine largeur mais jamais rognée, CTA pleine largeur */
@media (max-width: 560px){
  .dinerbanniere{
    max-width: 92%;
    box-shadow: 0 6px 16px var(--shadow);
  }
  .cta-button.cta-large,
  .cta-button.cta-contrast{
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
}

/* ======================================================
   FOOTER
   ====================================================== */
.footer{
  position: static;
  margin: 2rem auto 1rem;
  padding: 0 1rem;
  color: #bbb;
}
.footer-inner{
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: .5rem;
}
/* Liens footer */
.footer a{
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.footer a:hover{
  text-decoration: underline;
  color: #fff;
}
/* Contrôles footer */
.footer-controls{
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}
.footer-controls button{
  background: transparent;
  color: #bbb;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.footer-controls button:hover{
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
/* Footer mobile centré */
@media (max-width: 600px){
  .footer{ margin: 1.25rem auto; }
  .footer-controls button{ font-size: 11px; padding: 5px 9px; }
  .footer-inner{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

/* ======================================================
   BOUTON TEL / SMS (révélation)
   ====================================================== */
.howto{ text-align: center; }
.reveal-btn{
  background: transparent;
  color: var(--gold);
  border: 1px dashed rgba(244,200,74,.7);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.reveal-btn:hover{ background: rgba(244,200,74,.08); }
.phone-link{
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted rgba(244,200,74,.6);
}
.phone-link:hover{ text-decoration: underline; }
/* Bouton + lien révélé : nouvelle ligne, centré, non coupé */
.howto .reveal-btn,
.howto .phone-link{
  display: block;
  margin: 8px auto 0;
  width: fit-content;
  white-space: nowrap;
}

/* ======================================================
   BACKGROUNDS RESPONSIVE (images fixes)
   ====================================================== */
@media (max-width: 768px){
  body{ background-attachment: scroll; }
  body::before{
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
      radial-gradient(ellipse at 50% 55%,
        transparent 0%, transparent 35%,
        rgba(0,0,0,.25) 70%, rgba(0,0,0,.45) 100%
      ),
      image-set(
        url('../img/bg-invite-mobile@1x.webp') type('image/webp') 1x,
        url('../img/bg-invite-mobile@2x.webp') type('image/webp') 2x,
        url('../img/bg-invite-mobile@1x.jpg')  type('image/jpeg') 1x
      );
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .wrap{ gap: 16px; padding: 24px 12px; }
  .hero{ gap: 4px; }
  .hero > .logo{ width: clamp(240px, 86vw, 720px); }
  .hero h1{ font-size: clamp(1rem, 4.5vw, 1.6rem); }
  .card{ padding: 18px clamp(14px, 4vw, 24px); }

  :root{
    --logo-crop: min(40px, 5vh);
    --after-logo-gap: 6px;
  }
}
@media (max-width: 420px){
  .hero > .logo{ width: clamp(200px, 90vw, 620px); }
  .hero h1{ letter-spacing: .2px; line-height: 1.2; }
  :root{
    --logo-crop: min(24px, 4vh);
    --after-logo-gap: 6px;
  }
}
@media (min-width: 1200px){
  body::before{
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
      radial-gradient(ellipse at 50% 55%,
        transparent 0%, transparent 35%,
        rgba(0,0,0,.25) 70%, rgba(0,0,0,.45) 100%
      ),
      image-set(
        url('../img/bg-invite-desktop@1x.webp') type('image/webp') 1x,
        url('../img/bg-invite-desktop@2x.webp') type('image/webp') 2x,
        url('../img/bg-invite-desktop@1x.jpg')  type('image/jpeg') 1x
      );
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }
  .hero > .logo{ width: clamp(420px, 46vw, 1100px); }
  .wrap{ gap: 40px; }
  .hero h1{ font-size: clamp(1.2rem, 2.4vw, 2.1rem); }
}
@media (orientation: landscape) and (max-height: 480px){
  :root{
    --logo-crop: min(28px, 5vh);
    --after-logo-gap: 6px;
  }
  .hero > .logo{ width: clamp(220px, 50vw, 560px); }
  .wrap{ padding: 16px 12px; gap: 12px; }
  .hero h1{ font-size: clamp(.95rem, 2.2vw, 1.4rem); }
}
