/* =========================================================================
   inc/splash.css — vitrine plein écran de l'accueil, PC (moteur 1.261105, 2e bouton 1.261105.2, langues 1.261105.3)
   -------------------------------------------------------------------------
   Fichier MOTEUR : identique sur tous les sites, envoyé par sync-moteur.ps1
   avec inc/*.css. Chargé seulement quand la vitrine est affichée.

   Réglages par site : HOME_SPLASH dans inc/config.php (image, alignement,
   voile, couleur du bouton). Polices et couleurs reprises des variables
   communes du site (--font-display, --font-body, --font-mono, --fern).

   Bascule : 1100 px, comme le menu latéral (inc/menu.css et le script
   de inc/splash.php). Sous 1100 px : rien n'est affiché ni téléchargé.
   ========================================================================= */

.home-splash { display: none; }

@media (min-width: 1100px) {
  .home-splash {
    --splash-accent-c: var(--splash-accent, var(--site-nav-accent, var(--fern, #2F6B4F)));
    display: flex;
    position: relative;
    z-index: 5;                 /* au-dessus du menu fixe et du fond animé */
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    align-items: center;
    color: #fff;
    background: #111;
    isolation: isolate;
  }

  .home-splash__bg {
    position: absolute; inset: -2%;
    z-index: -2;
    background-image: var(--splash-img);
    background-size: cover;
    background-position: var(--splash-pos, center);
    animation: splash-zoom 22s ease-out both;
    will-change: transform;
  }

  /* Voile : dégradé côté texte + assombrissement léger en bas */
  .home-splash::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(90deg,
        rgba(0, 0, 0, var(--splash-overlay, 0.55)) 0%,
        rgba(0, 0, 0, calc(var(--splash-overlay, 0.55) * 0.6)) 38%,
        rgba(0, 0, 0, 0) 68%),
      linear-gradient(0deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 30%);
  }
  .home-splash--center::before {
    background:
      radial-gradient(ellipse at center,
        rgba(0, 0, 0, var(--splash-overlay, 0.55)) 0%,
        rgba(0, 0, 0, calc(var(--splash-overlay, 0.55) * 0.5)) 55%,
        rgba(0, 0, 0, 0.15) 100%);
  }

  .home-splash__inner {
    width: min(680px, 48vw);
    margin-left: 8vw;
  }
  .home-splash--center .home-splash__inner {
    width: min(820px, 80vw);
    margin: 0 auto;
    text-align: center;
  }

  .home-splash__eyebrow,
  .home-splash__title,
  .home-splash__text,
  .home-splash__cta {
    opacity: 0;
    animation: splash-rise 0.9s cubic-bezier(.2, .7, .2, 1) forwards;
  }

  .home-splash__eyebrow {
    margin: 0 0 18px;
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0;
    animation-delay: 0.15s;
  }
  .home-splash__eyebrow::before {
    content: ""; display: inline-block; vertical-align: middle;
    width: 36px; height: 2px; margin-right: 14px;
    background: var(--splash-accent-c);
  }
  .home-splash--center .home-splash__eyebrow::before { display: none; }

  .home-splash__title {
    margin: 0 0 22px;
    font-family: var(--font-display, serif);
    font-size: clamp(2.8rem, 4.4vw, 4.8rem);
    line-height: 1.02;
    font-weight: 650;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
    animation-delay: 0.3s;
  }
  .home-splash__text {
    margin: 0 0 38px;
    font-family: var(--font-body, sans-serif);
    font-size: clamp(1.1rem, 1.35vw, 1.4rem);
    line-height: 1.55;
    max-width: 34em;
    color: rgba(255, 255, 255, 0.9);
    animation-delay: 0.5s;
  }
  .home-splash--center .home-splash__text { margin-left: auto; margin-right: auto; }

  .home-splash__cta {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 15px 28px;
    border-radius: 999px;
    background: var(--splash-accent-c);
    color: #fff;
    font-family: var(--font-body, sans-serif);
    font-weight: 600;
    font-size: 1.02rem;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    animation-delay: 0.7s;
  }
  .home-splash__cta::after { content: "→"; transition: transform 0.2s ease; }
  .home-splash__cta:hover,
  .home-splash__cta:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
    color: #fff;
  }
  .home-splash__cta:hover::after { transform: translateX(4px); }
  .home-splash__cta:focus-visible,
  .home-splash__down:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

  /* Deux boutons (option 'link', moteur 1.261105.2) */
  .home-splash__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
  .home-splash--center .home-splash__actions { justify-content: center; }
  .home-splash__actions .home-splash__cta--ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    padding: 13.5px 26.5px;
    box-shadow: none;
    backdrop-filter: blur(4px);
    animation-delay: 0.85s;
  }
  .home-splash__actions .home-splash__cta--ghost::after { content: "↓"; }
  .home-splash__actions .home-splash__cta--ghost:hover,
  .home-splash__actions .home-splash__cta--ghost:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
  }
  .home-splash__cta--ghost:hover::after { transform: translateY(3px); }

  /* Boutons de langue, en haut à droite (moteur 1.261105.3) */
  .home-splash__langs {
    position: absolute; top: 28px; right: 36px; z-index: 1;
    display: flex; gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    opacity: 0;
    animation: splash-fade 0.8s ease 0.9s forwards;
  }
  .home-splash__langs a {
    display: inline-block; min-width: 38px; padding: 7px 10px;
    border-radius: 999px;
    font-family: var(--font-mono, monospace); font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.08em; text-align: center; text-decoration: none;
    color: rgba(255, 255, 255, 0.82);
    transition: background 0.2s ease, color 0.2s ease;
  }
  .home-splash__langs a:hover,
  .home-splash__langs a:focus-visible { background: rgba(255, 255, 255, 0.16); color: #fff; }
  .home-splash__langs a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .home-splash__langs a[aria-current="true"] { background: #fff; color: #111; }

  /* Flèche « descendre » */
  .home-splash__down {
    position: absolute; left: 50%; bottom: 34px;
    width: 30px; height: 50px; margin-left: -15px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 16px;
    opacity: 0;
    animation: splash-fade 1s ease 1.2s forwards;
  }
  .home-splash__down span {
    position: absolute; left: 50%; top: 9px;
    width: 4px; height: 9px; margin-left: -2px;
    border-radius: 2px; background: #fff;
    animation: splash-wheel 1.8s ease-in-out 1.6s infinite;
  }

  @keyframes splash-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
  @keyframes splash-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes splash-fade { to { opacity: 1; } }
  @keyframes splash-wheel {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
  }

  /* Le header du site reprend sous la vitrine : un peu d'air au-dessus */
  .has-splash .wrap { scroll-margin-top: 0; }
}

@media (min-width: 1100px) and (prefers-reduced-motion: reduce) {
  .home-splash__bg,
  .home-splash__eyebrow, .home-splash__title, .home-splash__text, .home-splash__cta,
  .home-splash__down, .home-splash__down span, .home-splash__langs {
    animation: none; opacity: 1; transform: none;
  }
}

@media print { .home-splash { display: none !important; } }
