/* Lunira Éveil — Organic Expressive.
   Feuille autonome limitée à body.page1, chargée APRÈS lunira-hero.css.
   Les comportements, routes, traductions et scripts existants sont conservés.
*/
.page1.lunira-hero-page {
  --lunira-eveil-bg: #FAF7F1;
  --lunira-eveil-ink: #343248;
  --lunira-eveil-primary: #7657B4;
  --lunira-eveil-secondary: #246E68;
  --lunira-eveil-coral: #E89A70;
  --lunira-eveil-lavender: #F0E9F5;
  --lunira-eveil-border: #E5DDEA;
  color: var(--lunira-eveil-ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background-color: var(--lunira-eveil-bg);
  background-image:
    radial-gradient(ellipse 45% 40% at 0% 88%, rgba(36,110,104,.075), transparent 82%),
    radial-gradient(ellipse 42% 48% at 100% 12%, rgba(118,87,180,.095), transparent 82%);
  background-repeat: no-repeat;
}

/* Vagues organiques purement décoratives : derrière la page et le pied de page. */
.page1.lunira-hero-page::before,
.page1.lunira-hero-page::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: clamp(120px, 19vw, 250px);
  pointer-events: none;
  z-index: 0;
}
.page1.lunira-hero-page { position: relative; }
.page1.lunira-hero-page::before {
  background: rgba(118, 87, 180, .10);
  clip-path: polygon(0 35%, 12% 29%, 25% 39%, 39% 55%, 53% 59%, 67% 47%, 80% 27%, 92% 18%, 100% 24%, 100% 100%, 0 100%);
}
.page1.lunira-hero-page::after {
  height: clamp(85px, 14vw, 180px);
  background: rgba(232, 154, 112, .12);
  clip-path: polygon(0 55%, 15% 63%, 30% 54%, 45% 33%, 60% 25%, 76% 42%, 89% 60%, 100% 51%, 100% 100%, 0 100%);
}

.page1 *, .page1 *::before, .page1 *::after { box-sizing: border-box; }
.page1 .lunira-header { position: relative; z-index: 5; flex: 0 0 auto; }
.page1 .lunira-header__inner {
  position: relative; width: 100%; max-width: 1250px; min-height: 76px;
  margin-inline: auto; padding-inline: clamp(20px, 4.5vw, 60px);
}
/* Lien À propos : icône lisible, espace de clic confortable, aucun fond permanent. */
.page1 .lunira-about-button {
  position: absolute; inset-block-start: 17px; inset-inline-end: clamp(20px,4.5vw,60px);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: auto; height: auto; min-height: 46px; padding: 7px 11px;
  color: #583785; background: transparent; border: 0; border-radius: 13px;
  box-shadow: none; backdrop-filter: none; text-decoration: none;
  font-size: 1rem; font-weight: 700; line-height: 1.2;
  transition: color 180ms ease, background-color 180ms ease;
}
.page1 .lunira-about-button__icon { display: block; width: 30px; height: 30px; flex: 0 0 30px; }
.page1 .lunira-about-button:hover { color: #48246F; background: rgba(118,87,180,.085); box-shadow: none; }
.page1 .lunira-about-button:focus-visible { outline: 3px solid var(--lunira-eveil-secondary); outline-offset: 3px; }

/* Composition éditoriale : contenu prioritaire et panneau indépendant. */
.page1 .lunira-main.lunira-eveil-layout {
  position: relative; z-index: 1; flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0,1.04fr) minmax(390px,.96fr);
  align-items: center; gap: clamp(32px,4.5vw,76px);
  width: 100%; max-width: 1250px; margin-inline: auto;
  padding: clamp(16px,2.5vw,34px) clamp(20px,4.5vw,60px) clamp(24px,3vw,42px);
}
.page1 .lunira-eveil-layout__intro, .page1 .lunira-eveil-layout__languages { min-width: 0; }
.page1 .lunira-hero__content, .page1 .lunira-hero__content:hover {
  margin: 0; padding: 0; text-align: start; background: transparent;
  border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; transition: none;
}
.page1 .lunira-eveil-brand {
  display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 16px;
  margin: 0 0 clamp(28px,3.5vw,52px);
}
.page1 .lunira-eveil-brand .lunira-brand {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; flex: 0 0 72px; margin: 0;
  color: var(--lunira-eveil-primary);
}
.page1 .lunira-brand__star {
  transform: translateY(-.45rem);
}
.page1 .lunira-eveil-brand__text { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.page1 .lunira-eveil-brand__text .lunira-hero__kicker {
  margin: 0; color: var(--lunira-eveil-ink); font-size: clamp(1.8rem,2.5vw,2.25rem);
  font-weight: 800; letter-spacing: -.045em; line-height: 1.05;
}
.page1 .lunira-eveil-brand__text .lunira-hero__tagline {
  margin: 0; color: var(--lunira-eveil-primary); font-size: 1.02rem;
  font-weight: 700; font-style: italic; letter-spacing: -.01em; line-height: 1.3;
}
.page1 .lunira-hero__title {
  margin: 0 0 18px; color: var(--lunira-eveil-ink);
  font-size: clamp(2.45rem,4.25vw,4.4rem); font-weight: 600;
  line-height: 1.1; letter-spacing: -.047em; text-wrap: balance;
  font-family: 'Manrope', 'Nunito', sans-serif;
}
.page1 .lunira-hero__subtitle {
  max-width: 39ch; margin: 0 0 28px; color: #595668;
  font-size: clamp(1.075rem,1.45vw,1.28rem); font-weight: 500; line-height: 1.6;
}
/* Signature statique : neutralise les mouvements hérités sur mobile et au survol. */
.page1 .lunira-eveil-brand,
.page1 .lunira-eveil-brand:hover,
.page1 .lunira-eveil-brand__text,
.page1 .lunira-eveil-brand__text:hover,
.page1 .lunira-eveil-brand .lunira-hero__kicker,
.page1 .lunira-eveil-brand .lunira-hero__kicker:hover,
.page1 .lunira-eveil-brand .lunira-hero__tagline,
.page1 .lunira-eveil-brand .lunira-hero__tagline:hover {
  transform: none;
  transition: none;
}

/* Marque statique : neutraliser les déplacements hérités sur tout le groupe. */
.page1 .lunira-hero__content:hover,
.page1 .lunira-eveil-brand,
.page1 .lunira-eveil-brand:hover {
  transform: none !important;
  animation: none;
}
.page1 .lunira-eveil-brand,
.page1 .lunira-eveil-brand * {
  transition-property: color, background-color, opacity;
}

/* CTA : contraste de rôle, dimensions cohérentes et iconographie indépendante des traductions. */
.page1 .lunira-hero__actions {
  display: flex; flex-direction: column; align-items: stretch; gap: 14px;
  width: min(100%,430px); margin: 0; text-align: start;
}
.page1 .lunira-hero__actions .lunira-hero__button,
.page1 .lunira-eveil-layout__languages > .lunira-hero__button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 58px; margin: 0; padding: 13px 22px;
  border-radius: 999px; font-size: 1rem; font-weight: 750; line-height: 1.35;
  text-align: center; text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.page1 .lunira-hero__actions .lunira-hero__button:not(.lunira-hero__video-button) {
  color: #fff; background: linear-gradient(115deg,#7657B4,#9068C5);
  border: 1px solid #7657B4; box-shadow: 0 7px 17px rgba(118,87,180,.17);
}
.page1 .lunira-hero__actions .lunira-hero__button:not(.lunira-hero__video-button)::before {
  content: '✦'; font-size: 1.22em; line-height: 1;
}
.page1 .lunira-hero__actions .lunira-hero__video-button {
  color: var(--lunira-eveil-secondary); background: transparent;
  border: 2px solid var(--lunira-eveil-secondary); box-shadow: none;
}
.page1 .lunira-hero__actions .lunira-hero__button:not(:disabled):hover,
.page1 .lunira-eveil-layout__languages > .lunira-hero__button:not(:disabled):hover {
  transform: translateY(-2px); box-shadow: 0 9px 22px rgba(52,50,72,.14);
}
.page1 .lunira-hero__button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* Panneau des langues : surface mate, rythme vertical et grille lisible. */
.page1 .lunira-eveil-layout__languages {
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(22px,2.6vw,34px); background: rgba(255,255,255,.97);
  border: 1px solid var(--lunira-eveil-border); border-radius: 30px;
  box-shadow: 0 20px 55px rgba(52,50,72,.085);
}
.page1 .lunira-eveil-languages__title {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 4px; color: var(--lunira-eveil-ink);
  font-size: clamp(1.35rem,2vw,1.7rem); font-weight: 800; line-height: 1.25;
  font-family: 'Manrope', 'Nunito', sans-serif;
}
.page1 .lunira-eveil-languages__title::before {
  content: ''; display: inline-block;
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background-color: var(--lunira-eveil-lavender);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' fill='none' stroke='%237657B4' stroke-width='1.8'%3E%3Ccircle cx='18' cy='18' r='12'/%3E%3Cpath d='M6 18h24M18 6c-7 7-7 17 0 24M18 6c7 7 7 17 0 24M9 11h18M9 25h18'/%3E%3C/svg%3E");
  background-size: 30px 30px; background-repeat: no-repeat; background-position: center;
}
/* PAGE 1 — Messages de choix de langue */

.page1 .lunira-language-warning,
.page1 .lunira-language-required {
  width: 100%;
  margin: 0;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: start;
  box-shadow: none;
}

/* Langue du navigateur non prise en charge */

.page1 .lunira-language-warning {
  background: #FFF6E9;
  color: #765022;
  border: 1px solid #E7C9A5;
  border-inline-start: 3px solid #B77A36;
}

/* Aucune langue prise en charge — action indispensable */

.page1 .lunira-language-required {
  background: #FFF0EC;
  color: #913E35;
  border: 1px solid #E6AAA0;
  border-inline-start: 4px solid #C64F43;
}

.page1 .lunira-language-selector--required
.lunira-language-selector__trigger {
  outline: 3px solid #C64F43;
  outline-offset: 3px;
}

/* Mode Nuit */

html[data-lunira-theme="dark"]
.page1 .lunira-language-warning {
  background: #3B322D;
  color: #F4DFC2;
  border-color: #80644B;
  border-inline-start-color: #E8B77B;
}

html[data-lunira-theme="dark"]
.page1 .lunira-language-required {
  background: #432C34;
  color: #FFD9D3;
  border-color: #A56566;
  border-inline-start-color: #F28F83;
}

html[data-lunira-theme="dark"]
.page1 .lunira-language-selector--required
.lunira-language-selector__trigger {
  outline-color: #F28F83;
}

.page1 .lunira-language-selector { width: 100%; max-width: none; margin: 0; }
.page1 .lunira-language-selector__trigger,
.page1 #eveilCurrentLanguage {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px;
  padding: 11px 16px; color: var(--lunira-eveil-ink);
  background: var(--lunira-eveil-lavender); border: 1px solid #D8CAE7;
  border-radius: 15px; box-shadow: none;
}
.page1 #eveilCurrentLanguage {
  cursor: pointer;
  pointer-events: auto;
  transition: none;
}
.page1 #eveilCurrentLanguage:hover, .page1 #eveilCurrentLanguage:focus { transform: none; box-shadow: none; }
.page1 #eveilCurrentLanguage::after { content: none; }
.page1 #eveilCurrentLanguage > img { display: block; width: 40px; height: 40px; flex: 0 0 40px; object-fit: cover; border-radius: 50%; }
.page1 .lunira-language-selector__panel {
  display: flex; flex-direction: column; gap: 13px;
  position: static; width: 100%; min-height: 0;
}
.page1 .lunira-language-selector__search { position: relative; margin: 15px 0 2px; }
.page1 .lunira-language-selector__search::before {
  content: ''; position: absolute; pointer-events: none;
  inset-inline-start: 17px; top: 50%; width: 15px; height: 15px;
  border: 2px solid #817B91; border-radius: 50%; transform: translateY(-63%);
}
.page1 .lunira-language-selector__search::after {
  content: ''; position: absolute; pointer-events: none;
  inset-inline-start: 31px; top: calc(50% + 5px); width: 8px; height: 2px;
  background: #817B91; transform: rotate(48deg); transform-origin: left center;
}
.page1 .lunira-language-selector__input {
  width: 100%; min-height: 50px; padding-inline-start: 47px;
  color: var(--lunira-eveil-ink); background: #fff;
  border: 1px solid #DCD4E5; border-radius: 14px;
}
.page1 #langDropdown,
.page1 .lunira-language-selector__list,
.page1 .lunira-language-selector.open .lunira-language-selector__list {
  display: grid; position: static; grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px; width: 100%; max-height: 280px; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin;
  margin: 0; padding: 4px; background: transparent; border: 0;
  border-radius: 0; box-shadow: none;
}
.page1 #langDropdown a[data-lang] {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; min-width: 0; min-height: 88px; padding: 10px 5px;
  color: var(--lunira-eveil-ink); background: #fff;
  border: 1px solid #E9E4EE; border-radius: 16px;
  font-size: .85rem; font-weight: 600; line-height: 1.25; text-align: center;
  text-decoration: none; overflow-wrap: anywhere;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.page1 #langDropdown a[data-lang] > img {
  display: block; width: 34px; height: 34px; flex: 0 0 34px;
  object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px rgba(52,50,72,.10);
}
/* Coréen : deux drapeaux restent côte à côte, sans recadrage trompeur. */
/* Coréen : deux drapeaux côte à côte */
.page1 #langDropdown a[data-lang="ko"] .lunira-korean-flags {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  height: 34px;
  flex: 0 0 34px;
}

.page1 #langDropdown a[data-lang="ko"] .lunira-korean-flags img {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}
.page1 #langDropdown a[data-lang]:hover,
.page1 #langDropdown a[data-lang]:focus-visible { color: #243C39; border-color: #246E68; background: #E6F1ED; }
.page1 #langDropdown a[data-lang].selected {
  color: var(--lunira-eveil-ink); background: var(--lunira-eveil-lavender);
  border: 2px solid var(--lunira-eveil-primary);
  box-shadow: inset 0 0 0 1px var(--lunira-eveil-primary);
}
.page1 .lunira-eveil-languages__more {
  display: block; width: 100%; min-height: 45px; margin: 2px 0 0; padding: 9px 14px;
  color: var(--lunira-eveil-primary); background: transparent;
  border: 1.5px solid #C9B5E2; border-radius: 14px;
  font: inherit; font-weight: 750; cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.page1 .lunira-eveil-languages__more:hover { background: var(--lunira-eveil-lavender); border-color: var(--lunira-eveil-primary); }
.page1 #langDropdown.lunira-languages-expanded { max-height: min(480px,45dvh); overflow-y: auto; }
.page1 .lunira-eveil-layout__languages > #luniraStart {
  flex-shrink: 0; margin-top: 8px; color: #fff;
  background: linear-gradient(115deg,#7657B4,#9068C5);
  border: 1px solid #7657B4; box-shadow: 0 8px 19px rgba(118,87,180,.16);
}

.page1 .lunira-hero__button:focus-visible,
.page1 .lunira-language-selector a:focus-visible,
.page1 .lunira-language-selector button:focus-visible,
.page1 .lunira-language-selector input:focus-visible {
  outline: 3px solid var(--lunira-eveil-secondary); outline-offset: 3px;
}
/* Arbre décoratif de la page Éveil */
.page1 .lunira-eveil-tree {
  width: min(100%, 260px);
  margin: 24px auto 0;
  pointer-events: none;
}

.page1 .lunira-eveil-tree img {
  display: block;
  width: 100%;
  height: auto;
}

.page1 #presentationVideoModal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

/* ==========================================================
   ÉVEIL — RESPONSIVE CONSOLIDÉ
   ========================================================== */

/* Ordinateurs et tablettes larges */
@media (min-width: 961px) {

  /* Indicateur de langue non interactif sur grand écran */
  .page1 #eveilCurrentLanguage,
  .page1 #eveilCurrentLanguage:hover,
  .page1 #eveilCurrentLanguage:focus,
  .page1 #eveilCurrentLanguage img,
  .page1 #eveilCurrentLanguage:hover img {
    cursor: default;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    box-shadow: none;
  }

  .page1 .lunira-header {
    padding-top: 0;
  }

  .page1 .lunira-header__inner {
    min-height: clamp(48px, 6dvh, 76px);
  }

  .page1 .lunira-main.lunira-eveil-layout {
    padding-top: clamp(2px, 1dvh, 18px);
    padding-bottom: clamp(2px, 1.5dvh, 22px);
    gap: clamp(20px, 3vw, 48px);
  }

  .page1 .lunira-eveil-layout__languages {
    padding: clamp(12px, 1.8dvh, 28px);
    gap: clamp(6px, 1.2dvh, 14px);
  }

  .page1 .lunira-eveil-brand {
    margin-bottom: clamp(10px, 2dvh, 32px);
  }

  .page1 .lunira-eveil-tree {
    width: min(100%, clamp(100px, 16dvh, 220px));
    margin-top: clamp(4px, 1.2dvh, 18px);
  }

  .page1 #langDropdown {
    max-height: clamp(150px, 27dvh, 280px);
  }
}

/* Téléphones et tablettes en disposition compacte */
@media (max-width: 960px) {

  .page1 .lunira-main.lunira-eveil-layout {
    z-index: 6;
    grid-template-columns: minmax(0, 1fr);
    max-width: 700px;
    gap: 0;
    padding-top: 24px;
    padding-bottom: 38px;
  }

  .page1 .lunira-eveil-layout__intro {
    order: 1;
    text-align: center;
  }

  .page1 .lunira-hero__content {
    text-align: center;
  }

  .page1 .lunira-eveil-brand {
    justify-content: center;
    margin-inline: auto;
    margin-bottom: clamp(20px, 4dvh, 42px);
  }

  .page1 .lunira-hero__title,
  .page1 .lunira-hero__subtitle {
    margin-inline: auto;
    text-align: center;
  }

  .page1 .lunira-hero__actions {
    margin-inline: auto;
  }

  .page1 .lunira-eveil-tree {
    width: min(100%, clamp(110px, 18dvh, 190px));
    margin-top: clamp(10px, 2dvh, 20px);
  }

  /* Sélecteur compact positionné dans la zone du header */
  .page1 .lunira-eveil-layout__languages {
    position: fixed;
    z-index: 20;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    right: auto;

    width: min(210px, calc(100vw - 140px));
    max-height: none;
    padding: 0;
    gap: 0;

    background: transparent;
    border: 0;
    border-radius: 16px;
    box-shadow: none;
  }

  .page1 .lunira-eveil-layout__languages > :not(.lunira-language-selector),
  .page1 .lunira-language-selector__panel {
    display: none;
  }

  .page1 #eveilCurrentLanguage {
    display: flex;
    min-height: 48px;
    padding: 5px 12px;
    gap: 9px;

    cursor: pointer;
    pointer-events: auto;

    background: #F0E9F5;
    border: 1px solid #D8CAE7;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(52,50,72,.08);
  }

  .page1 #eveilCurrentLanguage,
  .page1 #eveilCurrentLanguage * {
    cursor: pointer;
  }

  .page1 #eveilCurrentLanguage > img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .page1 #eveilCurrentLanguage > span[data-i18n] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page1 #eveilCurrentLanguage::after {
    content: "⌄";
    margin-inline-start: auto;
    font-size: 1.2rem;
    line-height: 1;
  }

  /* Panneau ouvert */
  .page1 .lunira-eveil-layout__languages:has(.lunira-language-selector.open) {
    top: max(70px, calc(env(safe-area-inset-top) + 58px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);

    width: min(440px, calc(100vw - 24px));
    max-height: calc(100dvh - 86px);
    overflow-y: auto;
    overscroll-behavior: contain;

    padding: 18px;
    gap: 14px;

    background: #fff;
    border: 1px solid var(--lunira-eveil-border);
    border-radius: 22px;
    box-shadow: 0 16px 55px rgba(52,50,72,.2);
  }

  .page1 .lunira-eveil-layout__languages:has(.lunira-language-selector.open)
  > :not(.lunira-language-selector) {
    display: block;
  }

  .page1 .lunira-language-selector.open .lunira-language-selector__panel {
    display: flex;
  }

  .page1 .lunira-eveil-layout__languages:has(.lunira-language-selector.open)
  #eveilCurrentLanguage {
    width: 100%;
  }

  .page1 #langDropdown,
  .page1 .lunira-language-selector.open #langDropdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(250px, 35dvh);
  }

  .page1 #luniraMoreLanguages {
    display: none !important;
  }
}

/* Téléphones étroits */
@media (max-width: 600px) {

  .page1 .lunira-main.lunira-eveil-layout {
    padding-inline: 16px;
    padding-bottom: 38px;
  }

  .page1 .lunira-eveil-brand .lunira-brand {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .page1 .lunira-eveil-brand {
    gap: 11px;
    margin-bottom: 32px;
  }

  .page1 .lunira-hero__title {
    font-size: clamp(2.15rem, 9vw, 3rem);
  }

  .page1 .lunira-hero__subtitle {
    margin-bottom: 26px;
  }

  .page1 .lunira-about-button {
    inset-block-start: 12px;
    inset-inline-end: 12px;
  }

  .page1 .lunira-header__inner {
    min-height: 67px;
  }

  .page1 .lunira-eveil-tree {
    width: min(100%, clamp(100px, 15dvh, 140px));
    margin-top: 16px;
  }
}

/* Très petits écrans */
@media (max-width: 360px) {
  .page1 .lunira-about-button {
    font-size: .92rem;
    gap: 6px;
  }

  .page1 .lunira-eveil-languages__title {
    font-size: 1.25rem;
  }

  .page1 #langDropdown a[data-lang] {
    font-size: .8rem;
  }
}

/* Téléphone en paysage */
@media (max-width: 960px) and (orientation: landscape) {
  .page1 .lunira-header {
    padding-top: 0;
  }

  .page1 .lunira-about-button {
    inset-block-start: 4px;
  }

  .page1 .lunira-header__inner {
    min-height: 54px;
  }
}

/* Accessibilité : réduction des animations */
@media (prefers-reduced-motion: reduce) {
  .page1 .lunira-about-button,
  .page1 .lunira-hero__button,
  .page1 #langDropdown a[data-lang],
  .page1 .lunira-eveil-languages__more,
  .page1 .lunira-footer a {
    transition: none;
  }

  .page1 .lunira-hero__actions .lunira-hero__button:not(:disabled):hover,
  .page1 .lunira-eveil-layout__languages > .lunira-hero__button:not(:disabled):hover {
    transform: none;
  }
}

/* Masquer les éléments jusqu'à la fin des traductions */
html.i18n-pending .page1 .lunira-main,
html.i18n-pending .page1 .lunira-header,
html.i18n-pending .page1 .lunira-footer {
  visibility: hidden;
}

/* Éveil — apparition douce de l'arbre */
@keyframes lunira-tree-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.i18n-pending) .page1 .lunira-eveil-tree img {
    animation: lunira-tree-reveal 1200ms ease-out 150ms both;
  }
}

/* Éveil — apparition coordonnée après les traductions */
@keyframes lunira-page-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.i18n-pending) .page1 .lunira-header {
    animation: lunira-page-reveal 450ms ease-out both;
  }

  html:not(.i18n-pending) .page1 .lunira-main {
    animation: lunira-page-reveal 550ms ease-out 80ms both;
  }

  html:not(.i18n-pending) .page1 .lunira-footer {
    animation: lunira-page-reveal 450ms ease-out 160ms both;
  }
}

/* Lunira Nuit — palette et fond */
html[data-lunira-theme="dark"] {
  .page1.lunira-hero-page {
    --lunira-eveil-bg: #171723;
    --lunira-eveil-ink: #F3EFF7;
    --lunira-eveil-primary: #BBA2F0;
    --lunira-eveil-secondary: #82C9BE;
    --lunira-eveil-coral: #F0AD8B;
    --lunira-eveil-lavender: #343047;
    --lunira-eveil-border: #484258;

    background-image:
      radial-gradient(ellipse 45% 40% at 0% 88%, rgba(130,201,190,.07), transparent 82%),
      radial-gradient(ellipse 42% 48% at 100% 12%, rgba(187,162,240,.10), transparent 82%);
  }
    .page1 .lunira-hero__subtitle,
  .page1 .lunira-footer {
    color: #C8C1D3;
  }

  .page1 .lunira-about-button,
  .page1 .lunira-footer a {
    color: #CDB8F5;
  }

  .page1 .lunira-eveil-layout__languages {
    background: #252435;
    box-shadow: 0 20px 55px rgba(0,0,0,.18);
  }

  .page1 #eveilCurrentLanguage,
  .page1 .lunira-language-selector__trigger {
    background: #343047;
    border-color: #59516C;
  }

  .page1 .lunira-language-selector__input,
  .page1 #langDropdown a[data-lang] {
    color: #F3EFF7;
    background: #302E40;
    border-color: #484258;
  }

  .page1 #langDropdown a[data-lang]:hover,
  .page1 #langDropdown a[data-lang]:focus-visible {
    color: #F3EFF7;
    background: #3A504F;
    border-color: #82C9BE;
  }

  .page1 #langDropdown a[data-lang].selected {
    color: #F3EFF7;
    background: #423653;
  }

  .page1 .lunira-hero__actions .lunira-hero__button:not(.lunira-hero__video-button),
  .page1 .lunira-eveil-layout__languages > #luniraStart {
    color: #171723;
    background: linear-gradient(115deg,#BBA2F0,#D0B9F5);
    border-color: #BBA2F0;
  }

  .page1 .lunira-hero__actions .lunira-hero__video-button {
    color: #82C9BE;
  }

  .page1 .lunira-eveil-layout__languages:has(.lunira-language-selector.open) {
    background: #252435;
  }
}

/* ==========================================================
   LUNIRA — COMMANDE D'APPARENCE
   ========================================================== */

.page1 .lunira-theme-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;

  border: 1px solid var(--lunira-eveil-border);
  border-radius: 50%;

  background: var(--lunira-eveil-lavender);
  color: var(--lunira-eveil-primary);

  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;

  transition: background-color 180ms ease,
              transform 180ms ease;
}
.page1 #luniraThemeIcon {
  display: block;
  font-size: inherit;
  line-height: 1;
}

.page1 .lunira-theme-button:hover {
  transform: translateY(-2px);
}

.page1 .lunira-theme-menu {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;

  width: 165px;
  padding: 6px;

  border: 1px solid var(--lunira-eveil-border);
  border-radius: 18px;

  background: #FAF7F1;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  opacity: 1;
  isolation: isolate;
  z-index: 32;
}

.page1 .lunira-theme-menu[hidden] {
  display: none;
}

.page1 .lunira-theme-menu button {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  min-height: 44px;
  padding: 9px 12px;

  border: 0;
  border-radius: 12px;

  background: transparent;
  color: var(--lunira-eveil-ink);

  font: inherit;
  text-align: start;
  cursor: pointer;
}

.page1 .lunira-theme-menu button:hover,
.page1 .lunira-theme-menu button[aria-pressed="true"] {
  background: var(--lunira-eveil-lavender);
}

.page1 .lunira-theme-button:focus-visible,
.page1 .lunira-theme-menu button:focus-visible {
  outline: 3px solid var(--lunira-eveil-secondary);
  outline-offset: 2px;
}

/* Commandes de l'en-tête : disposition sans chevauchement */
.page1 .lunira-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.page1 .lunira-theme-control,
.page1 .lunira-about-button {
  position: relative;
  inset: auto;
  flex-shrink: 0;
}

.page1 .lunira-theme-control {
  z-index: 3;
}

/* Éveil — cartes de langues stables au survol */

.page1.lunira-hero-page #langDropdown a[data-lang],
.page1.lunira-hero-page #langDropdown a[data-lang]:hover,
.page1.lunira-hero-page #langDropdown a[data-lang]:focus-visible {
  transform: none;
}

/* Recherche de langues — aucun résultat */
.page1 #langDropdown[hidden],
.page1 .lunira-language-no-results[hidden],
.page1 .lunira-eveil-languages__more[hidden] {
  display: none !important;
}

.page1 .lunira-language-no-results {
  width: 100%;
  margin: 0;
  padding: 28px 12px;
  color: #62566F;
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
}

html[data-lunira-theme="dark"]
.page1 .lunira-language-no-results {
  color: #D5CEE2;
}

/********* MEDIA ********/

@media (max-width: 600px) {
  .page1 .lunira-header__inner {
    gap: 8px;
  }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  .page1 .lunira-theme-button {
    transition: none;
  }

  .page1 .lunira-theme-button:hover {
    transform: none;
  }
}

/* Sélecteur de langue compact — téléphone en portrait */
@media (max-width: 600px) and (orientation: portrait) {

  .page1 .lunira-eveil-layout__languages:not(:has(.lunira-language-selector.open)) {
    width: 82px;
  }

  .page1 #eveilCurrentLanguage {
    gap: 8px;
    padding: 5px 8px;
    justify-content: space-between;
  }

  .page1 #eveilCurrentLanguage > span[data-i18n] {
    display: none;
  }

  .page1 #eveilCurrentLanguage::after {
    margin-inline-start: 0;
  }

  /* Menu ouvert : retrouver le nom de la langue */
  .page1 .lunira-eveil-layout__languages:has(.lunira-language-selector.open)
  #eveilCurrentLanguage {
    justify-content: flex-start;
  }

  .page1 .lunira-eveil-layout__languages:has(.lunira-language-selector.open)
  #eveilCurrentLanguage > span[data-i18n] {
    display: inline;
  }

.page1 #eveilCurrentLanguage > img {
  flex-shrink: 0;
}

.page1 #eveilCurrentLanguage::after {
  flex-shrink: 0;
  margin-inline-start: 0;
}
}

/* Le sélecteur de langue reste cliquable au-dessus du header */
@media (max-width: 960px) {
  .page1:has(.lunira-language-selector.open) .lunira-header {
    z-index: 2;
  }
}

/* Menu d'apparence : surface opaque et premier plan */
/* Surface Nuit */
html[data-lunira-theme="dark"] .page1 .lunira-theme-menu {
  background-color: #252435;
}

/* En portrait : préserver l'accès au sélecteur de langue */
@media (max-width: 600px) and (orientation: portrait) {
  .page1 .lunira-header {
    pointer-events: none;
  }

  .page1 .lunira-theme-control,
  .page1 .lunira-about-button {
    pointer-events: auto;
  }
}

/* Le menu d'apparence passe devant uniquement lorsqu'il est ouvert */
.page1 .lunira-header:has(.lunira-theme-menu:not([hidden])) {
  z-index: 30;
}

/* Le sélecteur de langue passe devant lorsqu'il est ouvert */
@media (max-width: 960px) {
  .page1:has(.lunira-language-selector.open) .lunira-header {
    z-index: 2;
  }

  .page1:has(.lunira-language-selector.open)
  .lunira-main.lunira-eveil-layout {
    z-index: 6;
  }
}

/* RTL — sélecteur de langue mobile */
@media (max-width: 960px) {
  html[dir="rtl"] .page1 .lunira-eveil-layout__languages:not(:has(.lunira-language-selector.open)) {
    left: auto;
    right: max(12px, env(safe-area-inset-right));
  }
}

/* Éveil — Commencer dans la présentation en mode compact */
@media (max-width: 960px) {

  .page1 .lunira-hero__content > #luniraStart {
    display: flex;
    position: static;

    width: min(280px, 100%);
    min-height: 54px;
    margin: 24px auto 0;

    align-items: center;
    justify-content: center;

    transform: none;
  }

  .page1 .lunira-hero__content > #luniraStart:hover {
    transform: none;
  }

  .page1 .lunira-hero__content > #luniraStart:focus-visible {
    outline: 3px solid var(--lunira-eveil-secondary);
    outline-offset: 4px;
  }
}

/* Éveil — hiérarchie des actions, ordinateur */

@media (min-width: 961px) {
  .page1 .lunira-eveil-layout__languages > #luniraStart:not(:disabled) {
    box-shadow: 0 10px 24px rgba(118, 87, 180, .25);
    font-weight: 800;
  }

  .page1 .lunira-eveil-layout__languages > #luniraStart:not(:disabled):hover {
    box-shadow: 0 13px 28px rgba(118, 87, 180, .30);
  }

  .page1 .lunira-eveil-layout__languages > #luniraStart:disabled {
    opacity: .55;
    box-shadow: none;
    cursor: not-allowed;
  }
}