/* ============================================================
   Bar-mitsva d'Eytan — 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) ---------- */

/* Lato — tout le texte courant */
@font-face { font-family:'Lato'; font-weight:400; font-display:swap;
  src:url('fonts/Lato-2.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:'Lato'; font-weight:400; font-display:swap;
  src:url('fonts/Lato-1.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:'Lato'; font-weight:700; font-display:swap;
  src:url('fonts/Lato-4.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:'Lato'; font-weight:700; font-display:swap;
  src:url('fonts/Lato-3.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; }

/* Aboreto — le prénom « Eytan » de la cérémonie */
@font-face { font-family:'Aboreto'; font-weight:400; font-display:swap;
  src:url('fonts/Aboreto-2.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:'Aboreto'; font-weight:400; font-display:swap;
  src:url('fonts/Aboreto-1.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; }

/* Cormorant Upright — la barre de navigation, et les titres de section
   (elle remplace « carmenta », voir LISEZ-MOI.md) */
@font-face { font-family:'Cormorant Upright'; font-weight:500; font-display:swap;
  src:url('fonts/CormorantUpright-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:'Cormorant Upright'; font-weight:500; font-display:swap;
  src:url('fonts/CormorantUpright-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:'Cormorant Upright'; font-weight:600; font-display:swap;
  src:url('fonts/CormorantUpright-6.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:'Cormorant Upright'; font-weight:600; font-display:swap;
  src:url('fonts/CormorantUpright-5.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; }

/* Caveat — le prénom « Eytan » de la soirée (remplace « wonderful-day ») */
@font-face { font-family:'Caveat'; font-weight:400 600; font-display:swap;
  src:url('fonts/Caveat-4.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:'Caveat'; font-weight:400 600; font-display:swap;
  src:url('fonts/Caveat-3.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; }

/* Noto Serif Hebrew — le « בסד » et le prénom hébraïque */
@font-face { font-family:'Noto Serif Hebrew'; font-weight:400 600; 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; }
@font-face { font-family:'Noto Serif Hebrew'; font-weight:400 600; 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; }

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

:root {
  --bleu:        #1E5E7A;   /* la couleur signature, tirée de la mer   */
  --bleu-survol: #286E8D;   /* boutons au survol                       */
  --bleu-degrade:#377E9D;   /* haut du dégradé du RSVP                 */
  --sable:       #E4C8A1;   /* bas du dégradé du RSVP                  */
  --blanc:       #FFFFFF;

  /* « carmenta » et « wonderful-day » sont déclarées en premier : si tu
     déposes ces fichiers de police dans fonts/, ils reprennent la main. */
  --titre:  'carmenta', 'Cormorant Upright', Georgia, serif;
  --script: 'wonderful-day', 'Caveat', cursive;
  --nom:    'Aboreto', Georgia, serif;
  --corps:  'Lato', system-ui, sans-serif;
  --nav:    'Cormorant Upright', Georgia, serif;
  --hebreu: 'Noto Serif Hebrew', Georgia, serif;

  --hauteur-nav: 80px;
}

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

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--hauteur-nav); }

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

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

/* Le « בסד » posé en haut à droite de chaque grande section */
.bsd {
  font-family: var(--hebreu);
  font-size: 25px;
  font-weight: 600;
  color: var(--blanc);
  text-align: right;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* ---------- 4. HERO ---------- */

.hero {
  /* 100vh moins la barre de navigation : les deux tiennent sur le 1er écran */
  min-height: calc(100vh - var(--hauteur-nav));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background-image: url('images/fond-hero.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* effet parallaxe sur grand écran, comme sur le site d'origine */
@media (min-width: 1025px) {
  .hero { background-attachment: fixed; }
}

/* ---------- 5. LA BARRE DE NAVIGATION (elle se colle en haut au défilement) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--hauteur-nav);
  background: var(--bleu);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

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

.nav a {
  font-family: var(--nav);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--blanc);
  text-decoration: none;
  transition: color .3s;
}

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

/* ---------- 6. LES GRANDES SECTIONS PHOTO ---------- */

.section {
  padding: 80px 50px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.section--tefilines { background-image: url('images/fond-tefilines.jpg'); }
.section--soiree    { background-image: url('images/fond-soiree.jpg'); }

/* le dégradé bleu → sable du RSVP */
.section--rsvp {
  background-image: linear-gradient(180deg, var(--bleu-degrade) 0%, var(--sable) 100%);
}

.contenu { width: 80%; margin: 0 auto; }

/* ---------- 7. LES CARTES BLANCHES TRANSLUCIDES ---------- */

.carte {
  position: relative;
  padding: 100px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.carte::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, .62);
  opacity: .9;
  pointer-events: none;
}

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

.carte + .carte { margin-top: 10px; }

/* ---------- 8. LE TEXTE DES CARTES ---------- */

.logo-eytan { width: 15%; margin: 0 auto 20px; }

.titre-section {
  font-family: var(--titre);
  font-size: 40px;
  font-weight: 500;
  color: var(--bleu);
  margin: 0 0 22px;
}

.texte {
  font-family: var(--corps);
  font-size: 18px;
  line-height: 32px;
  color: var(--bleu);
  margin: 0 0 18px;
  max-width: 620px;
}

.prenom {
  font-family: var(--nom);
  font-size: 60px;
  font-weight: 500;
  color: var(--bleu);
  line-height: 1.2;
  margin: 10px 0 4px;
}

.prenom-hebreu {
  font-family: var(--hebreu);
  font-size: 30px;
  font-weight: 500;
  color: var(--bleu);
  line-height: 1.4;
  margin: 0 0 22px;
  direction: rtl;
}

/* le prénom en écriture manuscrite, pour la soirée */
.prenom-fete {
  font-family: var(--script);
  font-size: 90px;
  font-weight: 500;
  color: var(--bleu);
  line-height: 1.1;
  margin: 6px 0;
}

/* ---------- 9. BOUTONS ---------- */

.bouton {
  display: inline-block;
  background: var(--bleu);
  color: var(--blanc);
  font-family: var(--corps);
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  padding: 13px 30px;
  margin-top: 14px;
  cursor: pointer;
  transition: background-color .3s;
}

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

/* ---------- 10. RSVP ---------- */

.bloc-formulaire {
  width: 80%;
  margin: 10px auto 0;
  padding: 30px 25px;
  background: rgba(255, 255, 255, .87);
  text-align: center;
}

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

.champ { margin-bottom: 18px; }

.champ label {
  display: block;
  font-family: var(--corps);
  font-size: 16px;
  color: var(--bleu);
  margin-bottom: 6px;
}

.champ input,
.champ select {
  width: 100%;
  font-family: var(--corps);
  font-size: 16px;             /* 16px : évite le zoom auto sur iPhone */
  color: var(--bleu);
  background: var(--blanc);
  border: 1px solid rgba(30, 94, 122, .35);
  border-radius: 2px;
  padding: 12px 14px;
  appearance: none;
}

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

.formulaire .bouton { width: 100%; }

.merci {
  display: none;
  font-family: var(--corps);
  font-size: 18px;
  line-height: 32px;
  color: var(--bleu);
  margin-top: 20px;
}

.merci.visible { display: block; }

.note-eta { margin-top: 34px; }

/* ---------- 11. 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(--corps);
  font-size: 16px;
  color: var(--bleu);
  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(--corps);
  font-size: 12px;
  color: #69727d;
  margin: 4px 0;
}

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

/* ============================================================
   12. TABLETTE ET MOBILE
   ============================================================ */

@media (max-width: 1024px) {
  .section  { padding: 50px 0; }
  .contenu  { width: 85%; }
  .nav ul   { gap: 0 40px; }
}

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

  .hero    { padding: 18px 15px; }
  .section { padding: 20px 15px; }
  .contenu { width: 100%; }

  .nav     { padding: 0; }
  .nav ul  { gap: 6px 22px; }
  .nav a   { font-size: 16px; }

  .bsd { font-size: 20px; }

  .carte          { padding: 50px 15px; }
  .logo-eytan     { width: 30%; }
  .titre-section  { font-size: 35px; }
  .texte          { font-size: 15px; line-height: 1.7em; }
  .prenom         { font-size: 50px; }
  .prenom-hebreu  { font-size: 20px; }
  .prenom-fete    { font-size: 70px; }

  .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; }
  .hero { background-attachment: scroll; }
}

/* ---------- LA MUSIQUE D'AMBIANCE ---------- */

.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(--bleu);
  color: var(--blanc);
  display: none;                /* n'apparait 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-musique 4s linear infinite; }

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

@media (prefers-reduced-motion: reduce) {
  .musique.tourne svg { animation: none; }
}
