/* ============================================================
   Yoela & Shalev — 15 août 2023 / כ״ח באב תשפ״ג
   Reproduction en HTML autonome du site d'origine.
   Toutes les couleurs et les tailles viennent du site original.
   ============================================================ */

/* ---------- 1. POLICES (toutes locales, le site marche hors-ligne) ---------- */

/* Rouge Script — les prénoms et les grands titres */
@font-face { font-family:'Rouge Script'; font-weight:400 700; font-display:swap;
  src:url('fonts/RougeScript-1.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Noto Serif Hebrew — TOUT le reste du texte, français compris.
   C'est la trouvaille de ce template : une seule police pour les deux langues. */
@font-face { font-family:'Noto Serif Hebrew'; font-weight:400 700; font-display:swap;
  src:url('fonts/NotoSerifHebrew-3.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Noto Serif Hebrew'; font-weight:400 700; font-display:swap;
  src:url('fonts/NotoSerifHebrew-2.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Noto Serif Hebrew'; font-weight:400 700; font-display:swap;
  src:url('fonts/NotoSerifHebrew-1.woff2') format('woff2');
  unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }

/* ---------- 2. LA PALETTE DU SITE ---------- */

:root {
  --sauge:       #B0BB85;   /* le fond de la page de garde, sous la photo */
  --sable:       #B9AA96;   /* barre de navigation, hero, compte à rebours */
  --taupe:       #A79783;   /* le texte du faire-part, les boutons         */
  --taupe-fonce: #867865;   /* boutons au survol                           */
  --blanc:       #FFFFFF;

  --script: 'Rouge Script', cursive;
  --serif:  'Noto Serif Hebrew', Georgia, serif;

  --hauteur-nav: 70px;
}

/* ---------- 3. BASES ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--taupe);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

/* Bloque le défilement tant que l'invitation n'est pas ouverte */
body.pas-de-scroll { height: 100vh; overflow: hidden; }

img { max-width: 100%; display: block; }

/* ---------- 4. PAGE DE GARDE (la couverture à ouvrir) ---------- */

.couverture {
  position: fixed;
  inset: 0;
  z-index: 999;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--sauge);
  background-image: url('images/fond-couverture.webp');
  background-position: 0 -499px;
  background-size: cover;
  background-repeat: no-repeat;
}

/* le voile taupe posé sur la photo */
.couverture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(360deg, #A7978352 100%, #14141403 100%);
  opacity: .37;
}

.couverture__contenu {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  padding: 0 24px;
  border-radius: 10px;
  text-align: center;
  color: var(--blanc);
}

.couverture__monogramme { width: 11%; margin: 0 auto 26px; }

.couverture__noms {
  font-family: var(--script);
  font-size: 80px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--blanc);
  margin: 0 0 10px;
}

.couverture__date {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--blanc);
  margin: 0 0 30px;
}

/* ---------- 5. BOUTONS ---------- */

/* le bouton d'ouverture : blanc, texte taupe */
.bouton-ouvrir {
  display: inline-block;
  background: var(--blanc);
  color: var(--taupe);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 1px;
  padding: 13px 30px;
  cursor: pointer;
  transition: background-color .3s, color .3s;
}

.bouton-ouvrir:hover,
.bouton-ouvrir:focus-visible { background: var(--taupe); color: var(--blanc); }

/* le bouton Waze : taupe, texte blanc */
.bouton {
  display: inline-block;
  background: var(--taupe);
  color: var(--blanc);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 1px;
  padding: 13px 30px;
  margin-top: 24px;
  cursor: pointer;
  transition: background-color .3s;
}

.bouton:hover,
.bouton:focus-visible { background: var(--taupe-fonce); color: var(--blanc); }

/* ---------- 6. HERO ---------- */

.hero {
  min-height: 100vh;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  background-image: url('images/fond-hero.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__bloc {
  width: 100%;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: center;
}

/* le sélecteur de langue, en haut à droite */
.langues { display: flex; align-items: center; margin-bottom: auto; }

.langues a {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--sable);
  text-decoration: none;
  padding: 0 10px;
}

.langues a:first-child {
  font-weight: 700;
  text-decoration: underline;
  border-right: 1px solid var(--sable);
  padding: 0 10px 0 20px;
}

.hero__noms {
  font-family: var(--script);
  font-size: 50px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--sable);
  width: 100%;
  margin: 0 0 8px;
}

.hero__date {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--sable);
  width: 100%;
  margin: 0 0 20px;
}

/* ---------- 7. LE COMPTE À REBOURS ---------- */

.compteur {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.compteur__case {
  background-color: #B3ADA521;
  border-style: solid;
  border-width: 0 5px 5px 0;      /* l'anneau blanc décalé, comme l'original */
  border-color: var(--blanc);
  border-radius: 100px;
  width: 96px;
  height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: none;
}

.compteur__chiffre {
  font-family: var(--script);
  font-size: 40px;
  font-weight: 400;
  color: var(--sable);
  display: block;
  line-height: 1;
}

.compteur__libelle {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 400;
  color: var(--sable);
  display: block;
}

/* ---------- 8. LA BARRE DE NAVIGATION ----------
   Attention : sur le site d'origine elle N'EST PAS collante. Elle reste
   posée en bas de la photo d'accueil. Pour la coller en haut au défilement,
   il suffit d'ajouter :  position: sticky; top: 0; z-index: 100;          */

.nav {
  width: 100%;
  min-height: var(--hauteur-nav);
  background: var(--sable);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 15px;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 44px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--blanc);
  text-decoration: none;
  transition: color .3s;
}

.nav a:hover,
.nav a:focus-visible { color: #F0EAE2; }

/* ---------- 9. LES SECTIONS SUR FOND PAPIER ---------- */

.section {
  position: relative;
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* le fond texturé, posé à 50 % d'opacité comme sur le site d'origine */
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/fond-papier.webp');
  background-size: cover;
  background-position: center;
  opacity: .5;
  pointer-events: none;
}

.section > * { position: relative; z-index: 1; }

.monogramme-section { width: 8%; margin: 0 auto 10px; }

/* ---------- 10. LE TEXTE DU FAIRE-PART ---------- */

.titre-script {
  font-family: var(--script);
  font-size: 60px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--taupe);
  margin: 0 0 10px;
}

.ornement { width: 51%; margin: 0 auto 26px; }

/* les deux familles, l'une à gauche et l'autre à droite */
.familles {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 0 15px;
}

.familles p {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 25px;
  letter-spacing: -.5px;
  color: var(--taupe);
  margin: 0;
}

.familles p:first-child { text-align: start; }
.familles p:last-child  { text-align: end; }

.texte {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 25px;
  letter-spacing: -.5px;
  color: var(--taupe);
  max-width: 700px;
  margin: 0 0 14px;
  padding: 0 15px;
}

.texte--date { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.texte--petit { font-size: 12px; }

.prenoms {
  font-family: var(--script);
  font-size: 80px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--taupe);
  margin: 10px 0 16px;
}

/* ---------- 11. GALERIE ---------- */

.galerie { padding: 0; }

.galerie__grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  width: 100%;
}

.galerie__photo {
  width: 100%;
  aspect-ratio: 1 / 1;          /* les vignettes sont carrées */
  object-fit: cover;
  transition: transform .8s ease;
}

.galerie__photo:hover { transform: scale(1.04); }

/* ---------- 12. RSVP ---------- */

.bloc-formulaire {
  width: 60%;
  margin: 20px auto 0;
  padding: 30px 20px;
  background: rgba(255, 255, 255, .49);
  border: 2px solid var(--blanc);
  border-radius: 15px;
}

.formulaire { max-width: 520px; margin: 0 auto; text-align: left; }

.champ { margin-bottom: 16px; }

.champ label {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--taupe);
  margin-bottom: 5px;
}

.champ input,
.champ select {
  width: 100%;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--taupe);
  background: transparent;              /* comme sur le site d'origine */
  border: 1px solid rgba(167, 151, 131, .5);
  border-radius: 2px;
  padding: 11px 13px;
  appearance: none;
}

.champ input:focus,
.champ select:focus { outline: none; border-color: var(--taupe); }

.formulaire .bouton { width: 100%; margin-top: 20px; }

.merci {
  display: none;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--taupe);
  margin-top: 18px;
  text-align: center;
}

.merci.visible { display: block; }

/* ---------- 13. BOUTON MUSIQUE ---------- */

.musique {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .7);
  background: var(--taupe);
  color: var(--blanc);
  display: none;                /* n'apparaît que si un fichier son existe */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.musique.visible { display: flex; }
.musique svg { width: 20px; height: 20px; fill: currentColor; }
.musique.tourne svg { animation: rotation 4s linear infinite; }

@keyframes rotation { to { transform: rotate(360deg); } }

/* ---------- 14. PIED DE PAGE ---------- */

.barre-signature {
  min-height: 70px;
  background: var(--blanc);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
}

.barre-signature p {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--taupe);
  margin: 0;
  text-align: center;
}

.pied {
  background: var(--blanc);
  padding: 22px 24px 30px;
  text-align: center;
}

.pied__logo { width: 150px; margin: 0 auto 10px; }

.pied p {
  font-family: var(--serif);
  font-size: 12px;
  color: #69727d;
  margin: 4px 0;
}

.pied a { color: var(--taupe); text-decoration: none; }

/* ============================================================
   15. TABLETTE ET MOBILE
   ============================================================ */

@media (max-width: 1024px) {
  .hero { min-height: 95vh; padding-top: 0; }
  .hero__bloc { padding: 20px 0 0; align-items: center; }
  .section { padding: 80px 15px; }
  .couverture__monogramme { width: 20%; }
  .monogramme-section { width: 25%; }
  .galerie__grille { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .compteur { gap: 18px; }
  .familles p { font-size: 11px; line-height: 1.6em; letter-spacing: -.7px; }
  .bloc-formulaire { width: 80%; }
}

@media (max-width: 767px) {
  :root { --hauteur-nav: 50px; }

  .couverture {
    background-position: center center;
  }
  .couverture::before { opacity: .55; }
  .couverture__contenu { max-width: 500px; }
  .couverture__monogramme { width: 25%; }
  .couverture__noms { font-size: 60px; }
  .couverture__date { font-size: 16px; }

  .hero__noms { font-size: 40px; }
  .hero__date { letter-spacing: 1px; }

  .compteur { gap: 8px; }
  .compteur__case { width: 68px; height: 68px; border-width: 0 3px 3px 0; }
  .compteur__chiffre { font-size: 26px; }
  .compteur__libelle { font-size: 10px; }

  .nav ul { gap: 4px 22px; }
  .nav a  { font-size: 14px; }

  .titre-script { font-size: 50px; }
  .prenoms      { font-size: 50px; }
  .ornement     { width: 84%; }

  .familles { flex-direction: column; gap: 10px; }
  .familles p { text-align: center !important; }

  .texte        { font-size: 14px; line-height: 1.4em; }
  .texte--date  { font-size: 20px; }
  .texte--petit { font-size: 14px; }

  .galerie__grille { grid-template-columns: 1fr; gap: 3px; }
  .bloc-formulaire { width: 100%; padding: 24px 15px; }
}

/* Respecte les personnes qui ont désactivé les animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .musique.tourne svg { animation: none; }
  .galerie__photo { transition: none; }
}
