/* ============================================================
   Shyrel & Ethan — 15.08.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 (fichier d'origine du site) */
@font-face {
  font-family: 'Rouge Script';
  src: url('fonts/RougeScript-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* Cinzel — remplace Trajan Pro (voir LISEZ-MOI.md) : capitales romaines */
@font-face {
  font-family: 'Cinzel';
  src: url('fonts/Cinzel-2.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  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: 'Cinzel';
  src: url('fonts/Cinzel-1.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  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;
}

/* Noto Serif Hebrew — les prénoms et la formule en hébreu */
@font-face {
  font-family: 'Noto Serif Hebrew';
  src: url('fonts/NotoSerifHebrew-1.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Noto Serif Hebrew';
  src: url('fonts/NotoSerifHebrew-3.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  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;
}

/* Montserrat — texte d'interface */
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-5.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  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: 'Montserrat';
  src: url('fonts/Montserrat-4.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  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;
}

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

:root {
  --vert-sauge:  #B0BB85;  /* voile de la page de garde        */
  --creme:       #EFEBDB;  /* fond du hero et voile du papier  */
  --bronze:      #946438;  /* boutons, texte du faire-part     */
  --olive:       #7C6F59;  /* prénoms, grands titres           */
  --taupe:       #A79783;  /* voile sur la photo de garde      */
  --or:          #A8995A;  /* bordure double de la carte       */
  --brun:        #6B5344;

  --script:  'Rouge Script', cursive;
  /* TrajanPro-Regular en premier : si tu déposes le vrai fichier de la police
     dans fonts/, il est utilisé automatiquement. Sinon Cinzel prend le relais. */
  --romaine: 'TrajanPro-Regular', 'Cinzel', Georgia, serif;
  --hebreu:  'Noto Serif Hebrew', 'Cinzel', serif;
  --ui:      'Montserrat', system-ui, sans-serif;
}

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

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--olive);
  font-family: var(--ui);
  -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(--vert-sauge);
  background-image: url('images/fond-couverture.jpg');
  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;
  text-align: center;
  color: #fff;
}

.couverture__monogramme { width: 110px; margin: 0 auto 18px; }

.couverture__noms {
  font-family: var(--script);
  font-size: 60px;
  line-height: 60px;
  margin: 0 0 14px;
  font-weight: 400;
}

.couverture__date {
  font-family: var(--romaine);
  font-size: 16px;
  line-height: 16px;
  margin: 0 0 6px;
  font-weight: 400;
}

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

.compteur {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 26px auto 0;
  padding: 0;
  list-style: none;
}

.compteur__case {
  background-color: #94643805;   /* bronze à 2 % — juste un souffle */
  border-radius: 50%;
  width: 92px;
  height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: none;
}

.compteur__chiffre {
  font-family: var(--romaine);
  font-weight: 400;
  display: block;
}

.compteur__libelle {
  font-family: var(--romaine);
  font-size: 13px;
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

/* variante de la page de garde : cercles pleins, texte blanc, écart serré */
.compteur--couverture { gap: 20px; max-width: 77%; }
.compteur--couverture .compteur__chiffre { font-size: 30px; color: #fff; }
.compteur--couverture .compteur__libelle { color: #fff; }

/* variante du hero : l'anneau doré décalé en bas à droite, texte olive */
.compteur--hero { gap: 69px; max-width: 56%; }
.compteur--hero .compteur__case {
  border-style: solid;
  border-width: 0 5px 5px 0;
  border-color: var(--olive);
}
.compteur--hero .compteur__chiffre { font-size: 40px; color: var(--olive); }
.compteur--hero .compteur__libelle { color: var(--olive); }

/* ---------- 6. BOUTONS ---------- */

.bouton {
  display: inline-block;
  background-color: var(--bronze);
  color: #fff;
  font-family: var(--romaine);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 3px;
  padding: 12px 28px;
  cursor: pointer;
  transition: background-color .25s ease;
}

.bouton:hover,
.bouton:focus-visible { background-color: var(--olive); color: #fff; }

.couverture .bouton { margin-top: 26px; }

/* ---------- 7. HERO ---------- */

.hero {
  min-height: 100vh;
  padding: 50px 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--creme);
  background-image: url('images/fond-hero.jpg');
  background-position: 0 -800px;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__monogramme { width: 110px; margin: 0 auto 18px; }

.hero__noms {
  font-family: var(--script);
  font-size: 60px;
  line-height: 1;
  color: var(--olive);
  margin: 0 0 14px;
  font-weight: 400;
}

.hero__date {
  font-family: var(--romaine);
  font-size: 16px;
  color: var(--olive);
  margin: 0;
  font-weight: 400;
}

/* ---------- 8. SECTIONS SUR PAPIER (invitation, galerie, RSVP) ---------- */

.papier {
  position: relative;
  background-image: url('images/texture-papier.webp');
  background-size: contain;
  background-repeat: repeat;
}

/* voile crème à 50 % pour adoucir la texture */
.papier::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--creme);
  opacity: .5;
  pointer-events: none;
}

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

.invitation { padding: 80px 100px; }

/* le monogramme en filigrane, derrière la carte */
.filigrane {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 50;
}

.filigrane::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/monogramme-bronze.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 44% auto;
  opacity: .14;
  pointer-events: none;
}

/* ---------- 9. LA CARTE D'INVITATION (bordure double dorée, coins arrondis) ---------- */

.carte {
  position: relative;
  z-index: 100;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 400px 24px;
  border: 6px double var(--or);
  border-radius: 400px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5) inset;
  background-image: url('images/fleurs-haut-droite.webp');
  background-position: top right;
  background-repeat: no-repeat;
  background-size: 74% auto;
}

/* le second bouquet, en bas à gauche */
.carte::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url('images/fleurs-bas-gauche.webp');
  background-position: bottom left;
  background-repeat: no-repeat;
  background-size: 58% auto;
  pointer-events: none;
}

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

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

.ornement { width: min(340px, 70%); margin: 0 auto; }

.titre-script {
  font-family: var(--script);
  font-size: 70px;
  line-height: 1.05;
  color: var(--olive);
  font-weight: 400;
  margin: 18px 0;
}

.formule-hebreu { width: min(420px, 80%); margin: 10px auto 26px; }

.faire-part {
  font-family: var(--romaine);
  font-size: 25px;
  line-height: 1.5;
  color: var(--bronze);
  font-weight: 400;
  margin: 14px 0;
  max-width: 640px;
}

.faire-part--familles { font-size: 20px; margin: 6px 0; }

.prenom {
  font-family: var(--script);
  font-size: 100px;
  line-height: 1;
  color: var(--olive);
  font-weight: 400;
  margin: 10px 0 0;
}

.prenom-hebreu {
  font-family: var(--hebreu);
  font-size: 40px;
  line-height: 1.4;
  color: var(--olive);
  font-weight: 400;
  margin: 0 0 10px;
  direction: rtl;
}

.esperluette {
  font-family: var(--script);
  font-size: 100px;
  line-height: 1;
  color: var(--olive);
  font-weight: 400;
  margin: 0;
}

.carte .bouton { margin-top: 30px; }

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

.galerie { padding: 60px 100px; }

.galerie__grille {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.galerie__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  transition: transform .5s ease;
}

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

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

.rsvp {
  padding: 80px 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.rsvp__titre {
  font-family: var(--script);
  font-size: 60px;
  line-height: 1;
  color: var(--olive);
  font-weight: 400;
  margin: 18px 0;
}

.formulaire {
  width: 100%;
  max-width: 520px;
  margin-top: 26px;
  text-align: left;
}

.champ { margin-bottom: 18px; }

.champ label {
  display: block;
  font-family: var(--romaine);
  font-size: 15px;
  color: var(--bronze);
  margin-bottom: 6px;
}

.champ input,
.champ select {
  width: 100%;
  font-family: var(--ui);
  font-size: 16px;              /* 16px : évite le zoom auto sur iPhone */
  color: var(--brun);
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(148, 100, 56, .35);
  border-radius: 3px;
  padding: 12px 14px;
  appearance: none;
}

.champ input:focus,
.champ select:focus {
  outline: none;
  border-color: var(--bronze);
  background: #fff;
}

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

.merci {
  display: none;
  font-family: var(--romaine);
  font-size: 20px;
  color: var(--bronze);
  margin-top: 22px;
}

.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, .6);
  background: var(--bronze);
  color: #fff;
  display: none;                /* apparaît une fois l'invitation ouverte */
  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 ---------- */

.pied {
  background: #fff;
  padding: 22px 24px;
  text-align: center;
}

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

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

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

/* ============================================================
   15. MOBILE — la majorité des invités ouvriront le site au téléphone
   ============================================================ */

@media (max-width: 1024px) {
  .couverture { background-position: 0 0; }
  .invitation { padding: 50px; }
  .galerie     { padding: 50px; }
  .rsvp        { padding: 50px; }
  .carte { border-width: 4px; border-radius: 200px; padding: 180px 20px 200px; }
  .compteur--hero { gap: 34px; }
}

@media (max-width: 767px) {
  .couverture {
    background-image: url('images/fond-couverture-mobile.jpg');
    background-position: center center;
  }

  .hero {
    background-image: url('images/fond-hero-mobile.jpg');
    background-position: top center;
  }

  .invitation { padding: 50px 15px; }
  .galerie    { padding: 40px 15px; }
  .rsvp       { padding: 50px 20px; }

  .couverture__noms,
  .hero__noms      { font-size: 46px; line-height: 1; }
  .couverture__monogramme,
  .hero__monogramme { width: 84px; }

  .compteur { gap: 10px; max-width: 100%; }
  .compteur--couverture,
  .compteur--hero  { gap: 10px; max-width: 100%; }
  .compteur__case  { width: 68px; height: 68px; }
  .compteur--couverture .compteur__chiffre { font-size: 22px; }
  .compteur--hero .compteur__chiffre { font-size: 24px; }
  .compteur--hero .compteur__case { border-width: 0 3px 3px 0; }
  .compteur__libelle { font-size: 10px; }

  .carte { border-radius: 140px; padding: 120px 16px 140px; }
  .carte,
  .carte::before { background-size: 80% auto; }

  .titre-script { font-size: 48px; }
  .prenom, .esperluette { font-size: 64px; }
  .prenom-hebreu { font-size: 28px; }
  .faire-part { font-size: 17px; }
  .faire-part--familles { font-size: 15px; }
  .rsvp__titre { font-size: 46px; }

  .galerie__grille { grid-template-columns: 1fr; gap: 14px; }
}

/* 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; }
}
