/* ============================================================
   Bar-mitsva de Lenny — 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) ---------- */

/* Manrope — tout le texte (elle remplace « tt-hoves-pro-trial-r », voir LISEZ-MOI.md) */
@font-face { font-family:'Manrope'; font-weight:500 600; font-display:swap;
  src:url('fonts/Manrope-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:'Manrope'; font-weight:500 600; font-display:swap;
  src:url('fonts/Manrope-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; }

/* Alumni Sans Inline One — les titres de section, en lettres évidées */
@font-face { font-family:'Alumni Sans Inline One'; font-weight:400; font-display:swap;
  src:url('fonts/AlumniSansInlineOne-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:'Alumni Sans Inline One'; font-weight:400; font-display:swap;
  src:url('fonts/AlumniSansInlineOne-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; }

/* Luckiest Guy — le prénom en gros (remplace « freight-train-gangst ») */
@font-face { font-family:'Luckiest Guy'; font-weight:400; font-display:swap;
  src:url('fonts/LuckiestGuy-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:'Luckiest Guy'; font-weight:400; font-display:swap;
  src:url('fonts/LuckiestGuy-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; }

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

:root {
  --encre:      #242424;   /* la couleur signature : texte, nav, boutons */
  --gris-fonce: #363636;   /* le bandeau sombre                          */
  --gris-clair: #EBEAEA;   /* fond des sections Soirée et RSVP           */
  --gris-form:  #F5F4F4;   /* fond du bloc formulaire                    */
  --trait:      #252525;   /* les filets au-dessus/dessous des photos    */
  --bordure:    rgba(134, 134, 134, .35);
  --blanc:      #FFFFFF;

  /* Les deux polices d'origine sont déclarées en premier : si tu déposes
     leurs fichiers dans fonts/, elles reprennent la main automatiquement. */
  --sans:  'tt-hoves-pro-trial-r', 'Manrope', system-ui, sans-serif;
  --titre: 'Alumni Sans Inline One', Impact, sans-serif;
  --graf:  'freight-train-gangst', 'Luckiest Guy', Impact, cursive;

  --hauteur-nav: 70px;
}

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

* { box-sizing: border-box; }

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

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

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

/* Le « בסד » posé en haut à droite de chaque section */
.bsd {
  font-family: var(--sans);
  font-size: 25px;
  color: var(--encre);
  text-align: right;
  width: 100%;
  margin: 0 0 10px;
}

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

.hero {
  min-height: 100vh;
  padding-top: 2px;
  background-color: var(--blanc);
  background-image: url('images/fond-hero.webp');
  background-position: bottom center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ---------- 5. LA BARRE DE NAVIGATION NOIRE (collante en haut) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--hauteur-nav);
  background: var(--encre);
  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(--sans);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--blanc);
  text-decoration: none;
  transition: color .3s;
}

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

/* ---------- 6. LES SECTIONS ----------
   Chaque section est un grand fond graffiti pleine largeur, sur lequel est
   posée une CARTE claire qui porte le texte. Le contenu est centré et limité
   à 1140 px : c'est ce qui laisse voir le graffiti de chaque côté.          */

.section {
  padding: 100px 50px;
  background-position: center;
  background-repeat: repeat;
}

/* Téfilines : motif graffiti répété, sur fond blanc */
.section--tefilines {
  background-color: var(--blanc);
  background-image: url('images/texture-tefilines.webp');
  background-size: contain;
}

/* Soirée : grand graffiti en fond, passé en noir et blanc */
.section--soiree {
  background-image: url('images/texture-claire.webp');
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(0);
}

/* RSVP : graffiti sombre en fond, noir et blanc lui aussi */
.section--rsvp {
  background-color: var(--gris-fonce);
  background-image: url('images/bandeau-sombre.webp');
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(0);
}

/* ---------- 7. LES CARTES CLAIRES POSÉES SUR LE GRAFFITI ---------- */

.carte {
  position: relative;
  max-width: 1140px;            /* la largeur de contenu du site d'origine */
  margin: 0 auto;
  padding: 20px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* la carte des Téfilines : blanche, avec un voile de texture à 15 % */
.carte--tefilines { background-color: var(--blanc); }

.carte--tefilines::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/texture-tefilines.webp');
  background-size: cover;
  background-position: center;
  opacity: .15;
  pointer-events: none;
}

/* la carte de la Soirée : gris clair uni */
.carte--soiree { background-color: var(--gris-clair); }

/* la carte du RSVP : gris clair + un souffle de texture à 2 % */
.carte--rsvp {
  background-color: var(--gris-clair);
  padding: 80px 20px;
}

.carte--rsvp::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/texture-claire.webp');
  background-size: contain;
  opacity: .02;
  pointer-events: none;
}

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

/* ---------- 7 bis. LES BANDEAUX PHOTO PLEINE LARGEUR ---------- */

/* encadrés d'un filet noir en haut et en bas, et en noir et blanc */
.bandeau {
  min-height: 600px;
  border-top: 2px solid var(--trait);
  border-bottom: 2px solid var(--trait);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(0);
}

.bandeau--1 { background-image: url('images/bandeau-1.webp'); background-position: bottom center; }
.bandeau--2 { background-image: url('images/bandeau-2.webp'); }

/* ---------- 8. LES TEXTES ---------- */

.illustration { width: 20%; margin: 0 auto 10px; }

/* l'illustration des téfilines est presque désaturée sur le site d'origine */
.illustration--tefilines { filter: saturate(10%); }

.titre-section {
  font-family: var(--titre);
  font-size: 30px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--encre);
  margin: 18px 0;
}

.texte {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--encre);
  margin: 0 0 18px;
}

/* le prénom, dans la police d'affichage */
.prenom {
  font-family: var(--graf);
  font-size: 50px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--encre);
  margin: 6px 0 16px;
}

/* les deux familles, l'une à gauche et l'autre à droite */
.familles {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 200px 20px;
}

.familles p {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  color: var(--encre);
  margin: 0;
}

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

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

.bouton {
  display: inline-block;
  background: var(--encre);
  color: var(--blanc);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  border: none;
  border-radius: 1px;
  padding: 13px 30px;
  margin-top: 10px;
  cursor: pointer;
  transition: box-shadow .3s;
}

.bouton:hover,
.bouton:focus-visible { box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5); color: var(--blanc); }

/* ---------- 10. LE FORMULAIRE RSVP ---------- */

.bloc-formulaire {
  width: 60%;
  margin: 20px auto 0;
  padding: 25px;
  background: var(--gris-form);
  border: 1px solid var(--bordure);
  border-radius: 5px;
}

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

.champ { margin-bottom: 16px; }

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

.champ input,
.champ select {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--encre);
  background: transparent;              /* comme sur le site d'origine */
  border: 1px solid var(--bordure);
  border-radius: 0;
  padding: 11px 13px;
  appearance: none;
}

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

/* le bouton d'envoi a ses propres réglages */
.formulaire .bouton {
  width: 100%;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 9px 25px;
  margin-top: 20px;
}

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

.merci.visible { display: block; }

/* ---------- 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(--sans);
  font-size: 14px;
  color: var(--encre);
  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(--sans);
  font-size: 12px;
  color: #69727d;
  margin: 4px 0;
}

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

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

@media (max-width: 1024px) {
  .familles { padding: 10px 50px 20px; }
  .illustration { width: 30%; }
  .section { padding: 40px 20px; }
  .carte { max-width: 1024px; }
  .bloc-formulaire { width: 80%; }
}

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

  .nav ul { gap: 4px 18px; }
  .nav a  { font-size: 12px; }

  .bandeau { min-height: 250px; }
  .section { padding: 40px 20px; }
  .carte   { max-width: 767px; }

  .bsd { font-size: 20px; }

  .familles { flex-direction: column; gap: 8px; padding: 10px 0; }
  .familles p { font-size: 13px; text-align: center !important; }

  .illustration { width: 50%; }
  .illustration--soiree { width: 45%; }

  /* les titres sont plus GROS sur mobile — c'est voulu sur le site d'origine */
  .titre-section { font-size: 35px; }

  .carte--tefilines::before { opacity: .12; }
  .carte--rsvp { padding: 50px 10px 80px; }

  .bloc-formulaire { width: 100%; padding: 20px 10px; }
}

/* Respecte les personnes qui ont désactivé les animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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