/* styles.css - Cristonida / Refuge of Light */
/* Mobile-first layout, max content width 950px */

:root {
  --max-width: 950px;
  --header-bg: #A1B2A1;
  --main-bg: #3B3A31;
  --footer-bg: #A1B2A1;

  /* tailles adaptées au SMARTPHONE en base */
  /* On réduit encore légèrement l’offset pour remonter le contenu */
  --header-offset: 230px; /* avant 250px, pour réduire encore l'espace au-dessus du contenu */
  --footer-offset: 120px; /* espace en bas pour le footer */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--main-bg);
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ================= HEADER ================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.header-inner {
  padding: 16px 0 8px 0;
}

.header-layout {
  position: relative;           /* pour positionner l'icône Home */
  display: flex;
  align-items: center;
  justify-content: center;      /* le bloc de texte est centré */
  gap: 16px;
}

/* bloc titres commun */
.header-titles {
  text-align: center;
  flex: 0 1 auto;
}

/* tailles BASE = smartphone */

.header-title-main {
  /* Franklin Gothic Demi ~70pt, réduit pour mobile */
  font-family: "Franklin Gothic Medium", "Franklin Gothic Demi", Arial, sans-serif;
  font-weight: 600;
  font-size: 3.2rem;
  line-height: 1.05;
  color: #000000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-title-sub {
  /* Franklin Gothic Book ~48pt, réduit pour mobile */
  font-family: "Franklin Gothic Book", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.3;
  color: #000000;
  margin-top: 4px;
}

.header-title-sub span.jp {
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

.header-page-name {
  /* Nom de la page (PAINTING, ...) */
  font-family: "Franklin Gothic Medium", "Franklin Gothic Demi", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.2;
  color: #ffffff;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* icônes header Home (index) : taille adaptée mobile */
.header-icons-home {
  padding: 8px 0 12px 0;
}

/* on réduit un peu les marges gauche/droite autour des icônes */
.header-icons-home .container {
  padding: 0 8px;
}

/* on force les 5 icônes sur une seule ligne, avec moins d’espace entre elles */
.header-icons-home .icons-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;          /* espace réduit entre les icônes */
  flex-wrap: nowrap; /* une seule ligne */
}

/* icônes taille mobile */
.header-icons-home img {
  width: 56px;
  height: 56px;
}

/* bouton Home sur les pages secondaires */
/* plus petit et collé à droite, au niveau du titre de page */
.header-home-link {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-20%);
}

.header-home-link img {
  width: 60px;
  height: 60px;
}

/* utilisé seulement sur la Home pour équilibrer la ligne du haut */
.header-spacer {
  flex: 0 0 40px;
}

/* ================= MAIN ================= */

.site-main {
  flex: 1 0 auto;
  padding-top: var(--header-offset);
  padding-bottom: var(--footer-offset);
}

.main-inner {
  /* très peu d’espace supplémentaire en haut pour remonter le contenu */
  padding: 0 0 24px 0; /* avant 32px */
}

.home-intro {
  text-align: center;
  margin-bottom: 28px;
}

/* SIMPLY ART, base mobile */
.home-intro-title {
  font-family: "Franklin Gothic Heavy", "Franklin Gothic Demi", Arial, sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.1;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

/* texte anglais sous SIMPLY ART */
.home-intro-text {
  font-family: "Franklin Gothic Medium", "Franklin Gothic Demi", Arial, sans-serif;
  font-size: 1.2rem;
  line-height: 1.4;
  color: #ffffff;
}

/* texte japonais sous SIMPLY ART */
/* légèrement plus petit pour éviter le retour à la ligne sur smartphone */
.home-intro-text.jp {
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 1.0rem;    /* avant 1.15rem */
  line-height: 1.4;
  margin-top: 8px;
}

.media-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.media-item {
  width: 100%;
}

.media-item video {
  width: 100%;
  display: block;
  pointer-events: none;               /* on limite le long appui direct sur la vidéo */
}

.media-item img {
  width: 100%;
  display: block;
}

/* ================= FOOTER ================= */

.site-footer {
  background-color: var(--footer-bg);
  color: #000000;
  flex: 0 0 auto;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.25);
}

.footer-inner {
  padding: 12px 0 16px 0;
}

.footer-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 8px;
  flex-wrap: wrap; /* au cas où, sur petit écran */
}

/* icônes footer taille mobile */
.footer-icons img {
  width: 64px;
  height: 64px;
}

.footer-text {
  text-align: center;
  font-family: "Franklin Gothic Book", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}

/* ============= CONTROLES VIDEO SIMPLIFIES (dans la page) ============= */

.video-frame {
  position: relative;
  display: inline-block;
}

/* Met en évidence la vidéo en lecture */
.video-frame.is-playing {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.video-frame video {
  width: 100%;
  display: block;
  pointer-events: none;               /* on limite le long appui direct sur la vidéo */
}

/* Icône "play" indiquant qu'il s'agit d'une vidéo (miniature) */
.video-frame::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 42px;
  pointer-events: none;  /* le clic passe à travers sur le frame */
}

/* Ancien gros bouton central (gardé mais inutilisé visuellement) */
.video-play-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
}

/* Quand on veut afficher les contrôles (en pause, ou si on les réactive) */
.video-frame.show-controls .video-play-toggle {
  opacity: 1;
  pointer-events: auto;
}

.video-play-toggle::before {
  content: "▶";
  font-size: 70px;
  color: #ffffff;
  margin-left: 6px; /* pour centrer visuellement le triangle */
}

/* en lecture : icône pause */
.video-frame.is-playing .video-play-toggle::before {
  content: "❚❚";
  font-size: 60px;
  margin-left: 0;
}

/* pas de contour moche au focus */
.video-play-toggle:focus {
  outline: none;
}

/* =================== LIGHTBOX (zoom images) =================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;               /* caché par défaut */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: var(--max-width);   /* 950px max → < 1080px de ton smartphone */
  max-height: 100%;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  display: block;
  margin: 0 auto;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:focus {
  outline: none;
}

body.lightbox-open {
  overflow: hidden; /* évite le scroll de fond quand la lightbox est ouverte */
}

/* =================== VERSION ECRAN LARGE =================== */
/* À partir d’environ 900px de large (tablette/PC), on agrandit */

@media (min-width: 900px) {
  :root {
    --header-offset: 360px;  /* avant 400px, pour remonter aussi sur grand écran */
    --footer-offset: 140px;
  }

  .header-title-main {
    font-size: 5.6rem;
  }

  .header-title-sub {
    font-size: 2.8rem;
  }

  .header-page-name {
    font-size: 2.4rem;
  }

  .home-intro-title {
    font-size: 3.6rem;
  }

  .home-intro-text {
    font-size: 1.6rem;
  }

  .home-intro-text.jp {
    font-size: 1.4rem;
  }

  .footer-text {
    font-size: 1.4rem;
  }

  .header-icons-home img {
    width: 96px;
    height: 96px;
  }

  .header-home-link img {
    width: 80px;
    height: 80px;
  }

  .footer-icons img {
    width: 96px;
    height: 96px;
  }

  .video-play-toggle {
    width: 140px;
    height: 140px;
  }

  .video-play-toggle::before {
    font-size: 80px;
  }

  .video-frame.is-playing .video-play-toggle::before {
    font-size: 70px;
  }

  /* Icône "play" un peu plus grande sur grand écran */
  .video-frame::after {
    width: 90px;
    height: 90px;
    font-size: 52px;
  }

  .lightbox-close {
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
}
