/* Nous Les Hébreux — feuille de style
   Reproduit la mise en page de l'ancien site Carrd, sans le framework Carrd. */

/* ---------- Polices (auto-hébergées, sous-ensemble latin) ---------- */
@font-face { font-family: 'Source Sans Pro'; font-style: normal; font-weight: 300; font-display: swap; src: url(/assets/fonts/source-sans-pro-300.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/source-sans-pro-400.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans Pro'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/source-sans-pro-600.woff2) format('woff2'); }
@font-face { font-family: 'Alef'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/alef-400.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/inter-500.woff2) format('woff2'); }

:root {
  --font-body: 'Source Sans Pro', system-ui, sans-serif;
  --font-tagline: 'Alef', sans-serif;
  --font-button: 'Inter', sans-serif;
  --line: rgba(255, 255, 255, 0.369);
  --glass-line: rgba(255, 255, 255, 0.271);
  --site-spacing: 0.75rem;
  --panel-spacing: 1.5rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 18pt; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-wrap: break-word;
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  line-height: 1;
}

h1, h2, p, ul, hr, figure { margin: 0; padding: 0; font: inherit; }
ul { list-style: none; }
a { color: inherit; transition: color 0.25s ease; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
.sprite { display: none; }
[hidden] { display: none !important; }

/* Voile de chargement (bleu-gris qui s'efface à l'ouverture) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 3;
  background: #8F9AB0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s;
}
.is-loading body::after { opacity: 1; visibility: visible; }

/* ---------- Fond vidéo ---------- */
.site-bg {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  background: url(/assets/videos/bg-poster.jpg) center / cover no-repeat;
}
.site-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* grain + voile clair par-dessus la vidéo */
.site-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' width='512' height='512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.875'/%3E%3CfeColorMatrix values='0.26953125 0 0 0 0 0 0.203125 0 0 0 0 0 0.27734375 0 0 0 0 0 0.4375 0'/%3E%3C/filter%3E%3Crect filter='url(%23n)' width='512' height='512' fill='transparent'/%3E%3C/svg%3E"),
    linear-gradient(rgba(206, 223, 242, 0.11), rgba(206, 223, 242, 0.11));
  background-size: 512px, auto;
}

/* ---------- Mise en page ---------- */
.site {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}
.site-main {
  display: flex;
  justify-content: center;
  max-width: 100%;
  text-align: center;
}
.site-inner {
  width: 60rem;
  max-width: 100%;
  padding: 0 3rem;
}
.site-inner > section > * { margin-block: var(--site-spacing); }
.site-inner > section > :first-child { margin-top: 0; }
.site-inner > section > :last-child { margin-bottom: 0; }

/* ---------- Logo ---------- */
.logo { display: block; line-height: 0; }
.logo img { width: 20.5rem; margin-inline: auto; }

/* ---------- Bloc d'accroche ---------- */
.site-inner > section > .hero { margin-top: 1.625rem; margin-bottom: 3rem; }
.hero-inner {
  display: inline-block;
  width: 36rem;
  max-width: 100%;
  padding: 0 4rem;
  vertical-align: top;
}
.hero-inner > * { margin-block: var(--panel-spacing); }
.hero-inner > :first-child { margin-top: 0; }
.hero-inner > :last-child { margin-bottom: 0; }

.tagline {
  font-family: var(--font-tagline);
  font-size: 1.625em;
  line-height: 1.75;
  text-align: center;
  text-shadow: 0.088rem 0.088rem 0.125rem #000;
}

.divider {
  height: 1rem;
  border: 0;
  background: linear-gradient(#555F61, #555F61) center / 100% 1px no-repeat;
}

/* ---------- Icônes réseaux sociaux ---------- */
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 1.5em;
}
.hero-inner > .socials { margin-top: 2rem; }
.site-inner > section > .socials { gap: 1.625rem; margin-block: 2rem; }
.site-inner > section > .socials:first-child { margin-top: 0; }

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
  border: 1px solid var(--line);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.11);
  background-image: linear-gradient(223deg, rgba(255, 255, 255, 0.122) 0%, transparent 100%);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.socials svg { width: 60%; height: 60%; fill: #fff; pointer-events: none; }
.socials a:hover { background-color: rgba(255, 255, 255, 0.341) !important; transform: scale(1.1125); }

.socials--brand .is-youtube   { background-color: #F76060; background-image: linear-gradient(223deg, #7A3B3B 0%, rgba(247, 96, 96, 0.012) 100%); }
.socials--brand .is-instagram { background-color: #FC00A7; background-image: linear-gradient(223deg, #EBC53F 0%, rgba(252, 0, 167, 0.012) 100%); }
.socials--brand .is-tiktok    { background-color: #000; }
.socials--brand .is-facebook  { background-color: #2400FF; background-image: linear-gradient(223deg, #6FCFF7 0%, rgba(36, 0, 255, 0.012) 100%); }
.socials--brand .is-linkedin  { background-color: #56A9F5; }
.socials--brand .is-x         { background-color: #000; }

/* ---------- Panneaux « verre dépoli » ---------- */
.site-inner > section > .panel { margin-top: 2.375rem; }
.site-inner > section > .panel:first-child { margin-top: 0; }
.panel {
  display: block;
  width: 100%;
  padding: 0.625rem 4rem;
  text-align: left;
  background-image: linear-gradient(46deg, rgba(255, 255, 255, 0.078) 0%, rgba(255, 255, 255, 0.271) 76%);
  -webkit-backdrop-filter: blur(0.1rem);
  backdrop-filter: blur(0.1rem);
  border: 1px solid var(--glass-line);
  border-radius: 2rem;
}
.panel > * { margin-block: var(--panel-spacing); }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.panel h2 { font-size: 1.75em; line-height: 1.75; font-weight: 400; }

.contact-intro { font-size: 1.125em; line-height: 1.75; }
.copyright { text-align: center; color: rgba(255, 255, 255, 0.761); line-height: 1.75; font-weight: 600; }

/* ---------- Biographie ---------- */
.back { display: flex; gap: 1.375rem; }
.panel > .back:not(:last-child) { margin-bottom: 2rem; }
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7.25rem;
  height: 2.75rem;
  padding: 0 0.5rem;
  border: 2px solid #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  line-height: 2.75rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s ease;
}
.btn-back svg { width: 1em; min-width: 16px; height: 100%; margin: 0 0.5em 0 -0.125em; fill: #fff; }
.btn-back:hover { transform: scale(1.0425); }

.panel .bio-name { font-size: 3em; line-height: 1.125; letter-spacing: -0.075rem; }
.bio-text { line-height: 1.75; font-weight: 600; }

/* ---------- Page de liens ---------- */
.link-buttons { display: flex; flex-direction: column; gap: 1.25rem; }
.link-buttons a {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  height: 3.5rem;
  padding: 0 1.75rem;
  border: 2px solid var(--line);
  border-radius: 0.625rem;
  background-color: rgba(255, 255, 255, 0.11);
  background-image: linear-gradient(225deg, rgba(255, 255, 255, 0.122) 3%, transparent 96%);
  font-family: var(--font-button);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.link-buttons .label { flex: 1; overflow: hidden; text-align: left; }
.link-buttons svg { width: 1.5em; min-width: 16px; height: 100%; margin: 0 -0.125em 0 0.5em; fill: #fff; }
.link-buttons a:hover { background-color: rgba(196, 161, 161, 0.231); transform: scale(1.0425); }

/* ---------- Contact ---------- */
.contact-action { text-align: center; }
.contact-email {
  display: inline-block;
  width: 25rem;
  max-width: 100%;
  height: 3.5rem;
  padding: 0 1.75rem;
  overflow: hidden;
  color: #000;
  font-weight: 400;
  line-height: 3.5rem;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2.5rem;
  transition: background-color 0.25s ease;
}
.contact-email:hover { background: #fff; }
.contact-email:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Galerie YouTube ---------- */
.videos {
  padding: 1.25rem;
  color: #1c1c1c;
  background: #fff;
  border-radius: 0.5rem;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
}
.video-card { min-width: 0; }
.video-link { display: block; color: inherit; text-decoration: none; }

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e6e6e6;
  border-radius: 0.25rem;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-link:hover .video-thumb img { transform: scale(1.04); }

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 0.5rem;
  transform: translate(-50%, -50%);
  transition: background-color 0.25s ease;
}
.video-play svg { width: 1.1rem; height: 1.1rem; fill: #000; }
.video-link:hover .video-play { background: rgba(255, 255, 255, 0.75); }

.video-title {
  display: -webkit-box;
  margin-top: 0.85rem;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.video-link:hover .video-title { text-decoration: underline; }
.video-date,
.video-stats { display: block; margin-top: 0.45rem; color: #6b6b6b; font-size: 0.7rem; line-height: 1.4; }
.video-desc {
  display: -webkit-box;
  margin-top: 0.45rem;
  overflow: hidden;
  color: #333;
  font-size: 0.7rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.videos-message { color: #333; line-height: 1.6; text-align: center; }

/* cartes fantômes pendant le chargement */
.is-skeleton .video-thumb,
.sk-line { background: linear-gradient(90deg, #ececec 25%, #f6f6f6 50%, #ececec 75%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-line { display: block; height: 0.7rem; margin-top: 0.85rem; border-radius: 0.2rem; }
.sk-line.short { width: 55%; margin-top: 0.5rem; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* lecteur en surimpression */
.video-dialog {
  width: min(90vw, calc(85vh * 16 / 9));
  max-width: none;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
}
.video-dialog::backdrop { background: rgba(0, 0, 0, 0.85); }
.video-dialog-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 0.5rem; overflow: hidden; }
.video-dialog-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-dialog-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}
.video-dialog-close svg { width: 1.1rem; height: 1.1rem; fill: #fff; }
.video-dialog-close:hover { background: rgba(255, 255, 255, 0.35); }

/* ---------- Apparition au défilement ---------- */
[data-reveal] { --i: 2; --rx: 0px; --ry: 0px; }
[data-reveal="up"]    { --ry: calc(1.5rem * var(--i)); }
[data-reveal="right"] { --rx: calc(-1.5rem * var(--i)); }
[data-reveal="left"]  { --rx: calc(1.5rem * var(--i)); }

.js [data-reveal]:not([data-stagger]),
.js [data-reveal][data-stagger] > * {
  opacity: 0;
  transform: translate(var(--rx), var(--ry));
  transition: opacity 1s ease, transform 1s ease;
  transition-delay: calc(var(--n, 0) * 125ms);
}
.js [data-reveal].is-visible:not([data-stagger]),
.js [data-reveal][data-stagger].is-visible > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal]:not([data-stagger]),
  .js [data-reveal][data-stagger] > * { opacity: 1; transform: none; transition: none; }
  .is-skeleton .video-thumb, .sk-line { animation: none; }
}

/* ---------- Adaptatif (mêmes paliers que l'ancien site) ---------- */
@media (max-width: 1680px) { html { font-size: 13pt; } }
@media (max-width: 980px)  {
  html { font-size: 11pt; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 736px) {
  html { font-size: 12pt; }
  .site-inner { padding: 1.125rem 1rem; }

  .site-inner > section > .hero { margin-top: 1.21875rem; margin-bottom: 2.25rem; }
  .hero-inner { padding: 3.5rem 2rem; }
  .hero-inner > .socials { margin-top: 1.5rem; }
  .site-inner > section > .socials { margin-block: 1.5rem; }

  .site-inner > section > .panel { margin-top: 1.78125rem; }
  .panel { padding: 0.625rem 2rem; }
  .panel > .back:not(:last-child) { margin-bottom: 1.5rem; }

  .panel .bio-name { font-size: 2.75em; letter-spacing: -0.065625rem; }
}

@media (max-width: 480px) {
  :root { --site-spacing: 0.65625rem; --panel-spacing: 1.3125rem; }
  .back { flex-direction: column; }
  .btn-back { width: 100%; max-width: 32rem; }
  .video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  :root { --site-spacing: 0.5625rem; --panel-spacing: 1.125rem; }
  .site-inner { padding: 0.84375rem 0.75rem; }
  .hero-inner { padding: 2.625rem 1.5rem; }
  .panel { padding: 0.46875rem 1.5rem; }
  .tagline, .panel h2 { font-size: 1.5em; }
  .socials { gap: 0.75rem; }
  .site-inner > section > .socials { gap: 1.21875rem; }
  .link-buttons { gap: 0.9375rem; }
  .back { gap: 1.03125rem; }
}
