/* Skyniva : page d'accueil en 3D animée au défilement.
   Sans JavaScript, la page s'affiche en version fixe et lisible. */
@media (prefers-reduced-motion: reduce) { .i3-on .i3-emblem .anneau, .i3-on .i3-hint span { animation: none; } }

/* En-tête sombre et translucide au-dessus du ciel */
.p-accueil .top { background: rgba(5, 7, 20, .55); border-bottom-color: rgba(255,255,255,.08); }
.p-accueil .top .logo, .p-accueil .top .nav a:not(.btn) { color: #e8ebff; }

.intro3d { position: relative; background: #04060f; color: #eef0ff; overflow: clip; }
.i3-stage { position: relative; padding: 56px 16px 64px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 110%, #1b1f5c 0%, #0a0d26 45%, #04060f 75%); }
.i3-stars, .i3-nebula, .i3-planet, .i3-emblem, .i3-hint, .i3-progress { display: none; }

/* Textes */
.i3-text { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.i3-text p { color: #b9bfe0; font-size: 1.05rem; margin: .4rem 0; }
.i3-eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .74rem !important; font-weight: 700; color: #8fd8ff !important; }
.intro3d h1 { font-size: clamp(2.1rem, 6.4vw, 4.6rem); line-height: 1.04; letter-spacing: -.035em; margin: .3rem 0 0; color: #fff; }
.i3-big { font-size: clamp(1.7rem, 5vw, 3.4rem) !important; line-height: 1.08; letter-spacing: -.03em; font-weight: 800; color: #fff !important; margin: 0 0 .5rem !important; }
.i3-grad { background: linear-gradient(92deg, #8fd8ff 0%, #a59bff 45%, #f0a6ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.i3-cta { margin-top: 1.2rem !important; display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }
.i3-btn { background: linear-gradient(135deg, #6d5dfc, #38bdf8); box-shadow: 0 10px 40px rgba(109,93,252,.45); padding: 14px 24px; }
.i3-btn:hover { background: linear-gradient(135deg, #5b4bf0, #22a8e6); }
.i3-link { color: #cfd5ff; font-weight: 600; }

/* Maquette du site */
.i3-world { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin: 8px auto 32px; }
.i3-sitewrap { flex-basis: 100%; display: flex; justify-content: center; margin-bottom: 14px; }
.i3-site { width: min(560px, 88vw); border-radius: 18px; padding: 14px; color: #0f172a;
  background: linear-gradient(180deg, #ffffff, #eef1fb); box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 40px 120px rgba(79,70,229,.45); }
.i3-site .hc-top { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.i3-site .hc-top span { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.i3-site .hc-top i { font-style: normal; font-size: .72rem; color: #64748b; background: #e6e9f4; border-radius: 99px; padding: 3px 12px; margin-left: 8px; }
.i3-site-hero { border-radius: 12px; padding: 18px; margin-bottom: 12px; color: #fff; display: grid; gap: 4px; justify-items: start;
  background: linear-gradient(135deg, #312e81, #4f46e5 55%, #0ea5e9); }
.i3-site-hero b { font-size: 1.15rem; } .i3-site-hero small { opacity: .85; }
.i3-site-hero em { font-style: normal; font-size: .75rem; font-weight: 700; background: #fff; color: #312e81; border-radius: 8px; padding: 5px 10px; margin-top: 6px; }
.i3-site .hc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.i3-site .hc-grid div { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; display: grid; }
.i3-site .hc-grid small { color: #64748b; font-size: .7rem; } .i3-site .hc-grid strong { font-size: .92rem; }

/* Modules (tuiles) */
.i3-tile { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 14px; font-weight: 650; font-size: .92rem; color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; }
.i3-tile svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #8fd8ff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Version animée (classe ajoutée par accueil3d.js) ===== */
.i3-on .intro3d { height: 560vh; }
.i3-on .i3-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; }
.i3-on .i3-stars { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.i3-on .i3-nebula { display: block; position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: screen; opacity: .9;
  background: radial-gradient(40% 30% at 25% 30%, rgba(109,93,252,.35), transparent 70%),
              radial-gradient(35% 28% at 78% 62%, rgba(56,189,248,.25), transparent 70%),
              radial-gradient(30% 25% at 60% 15%, rgba(240,166,255,.18), transparent 70%); }
.i3-on .i3-planet { display: block; position: absolute; left: 50%; width: 260vmax; height: 260vmax; margin-left: -130vmax; top: 100%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, #0b0f2e 96%, rgba(120,140,255,.55) 99%, transparent 100%);
  box-shadow: 0 -30px 120px rgba(109,93,252,.55), 0 -4px 30px rgba(143,216,255,.6); will-change: transform; }

.i3-on .i3-emblem { display: block; position: absolute; left: 50%; top: 60%; width: 150px; height: 150px; margin: -75px 0 0 -75px; pointer-events: none; z-index: 4;
  filter: drop-shadow(0 0 18px rgba(143,216,255,.55)) drop-shadow(0 0 40px rgba(165,155,255,.35)); will-change: transform, opacity; }
.i3-on .i3-emblem svg { width: 100%; height: 100%; }
.i3-on .i3-emblem .anneau { transform-origin: 60px 60px; animation: i3-tourne 24s linear infinite; }
@keyframes i3-tourne { to { transform: rotate(360deg); } }
.i3-on.i3-gl .i3-nebula { opacity: .35; }
@media (min-width: 641px) { .i3-on .i3-emblem { top: 58%; width: 190px; height: 190px; margin: -95px 0 0 -95px; } }
.i3-on .i3-world { position: absolute; inset: 0; margin: 0; max-width: none; display: block; pointer-events: none; }
.i3-on .i3-sitewrap { display: block; margin: 0; position: absolute; left: 50%; top: 56%; width: 0; height: 0; perspective: 1100px; z-index: 5; }
.i3-on .i3-site { position: absolute; width: min(520px, 78vw); left: 0; top: 0; transform-origin: 50% 50%; will-change: transform, opacity; }
.i3-on .i3-tile { position: absolute; left: 50%; top: 56%; margin: 0; will-change: transform, opacity; opacity: 0; }

.i3-on .i3-text { z-index: 20; text-shadow: 0 2px 24px rgba(4,6,15,.85); position: absolute; left: 50%; width: min(760px, calc(100% - 32px)); margin: 0; transform: translateX(-50%); will-change: transform, opacity; pointer-events: none; }
.i3-on .i3-t1 { top: calc(var(--i3-haut, 64px) + 9vh); }
.i3-on .i3-t2, .i3-on .i3-t3 { top: calc(var(--i3-haut, 64px) + 3vh); opacity: 0; }
.i3-on .i3-t4 { top: 52%; opacity: 0; }
.i3-on .i3-t4::before { content: ""; position: absolute; inset: -60px -40px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(4,6,15,.85), rgba(4,6,15,.5) 60%, transparent); }
.i3-on .i3-t4.actif { pointer-events: auto; }

.i3-on .i3-hint { display: block; position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: #9aa3d8; }
.i3-on .i3-hint span { display: block; width: 2px; height: 34px; margin: 10px auto 0; border-radius: 2px; background: linear-gradient(#8fd8ff, transparent); animation: i3-goutte 1.6s ease-in-out infinite; }
@keyframes i3-goutte { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.i3-on .i3-progress { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.06); }
.i3-on .i3-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #6d5dfc, #38bdf8, #f0a6ff); }

@media (max-width: 640px) {
  .i3-on .i3-t1 { top: calc(var(--i3-haut, 64px) + 12vh); }
  .i3-on .i3-sitewrap, .i3-on .i3-tile { top: 60%; }
  .i3-tile { font-size: .8rem; padding: 8px 11px; gap: 7px; border-radius: 12px; }
  .i3-tile svg { width: 18px; height: 18px; }
  .i3-text p { font-size: .98rem; }
  .p-accueil .top .nav { gap: 4px 14px; }
}

/* ===== Le reste de la page d'accueil : fond sombre et scènes 3D ===== */
.p-accueil { background: #04060f; color: #e6e9ff; }
.p-accueil .foot { background: #060818; border-top: 1px solid rgba(255,255,255,.06); margin-top: 0; position: relative; z-index: 1; }
.p-accueil a { color: #a9b4ff; }
.p-accueil .i3-btn, .p-accueil .btn { color: #fff; }
.s3, .s3-final { position: relative; z-index: 1; }
.s3-stage { padding: 64px 16px; }
.s3-head { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.s3-head h2, .s3-final h2 { font-size: clamp(1.8rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -.03em; color: #fff; margin: .2rem 0 .6rem; }
.s3-sub { color: #b9bfe0; margin: 0 auto; max-width: 620px; }

/* Cartes des modules (version fixe : grille) */
.s3-ring { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; max-width: 1100px; margin: 0 auto; }
.s3-card { border-radius: 20px; padding: 20px; color: #e6e9ff; display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(160deg, rgba(40,44,96,.92), rgba(12,15,40,.94)); border: 1px solid rgba(165,155,255,.28);
  box-shadow: 0 20px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12); }
.s3-card h3 { color: #fff; font-size: 1.2rem; margin: 6px 0 0; }
.s3-card p { margin: 0; color: #b9bfe0; font-size: .95rem; }
.s3-card .s3-price { margin-top: auto; padding-top: 10px; font-weight: 800; color: #fff; font-size: 1.1rem; }
.s3-card .s3-price small { color: #8fd8ff; font-weight: 600; font-size: .85rem; }
.s3-card-base { border-color: rgba(143,216,255,.5); }
.s3-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, rgba(109,93,252,.5), rgba(56,189,248,.35)); }
.s3-ico svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.s3-count { display: none; }

/* Étapes (version fixe : liste) */
.s3-path { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; display: grid; gap: 14px; }
.s3-step { border-radius: 20px; padding: 22px; display: grid; gap: 4px; background: linear-gradient(160deg, rgba(40,44,96,.9), rgba(12,15,40,.92)); border: 1px solid rgba(165,155,255,.25); }
.s3-step b { color: #fff; font-size: 1.25rem; } .s3-step span { color: #b9bfe0; }
.s3-step .s3-num { font-size: 2.6rem; font-weight: 900; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(92deg, #8fd8ff, #a59bff, #f0a6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Paliers : blocs en 3D (faces dessus, avant et côté) */
.s3-stairs { display: flex; justify-content: center; align-items: flex-end; gap: 28px; flex-wrap: wrap; --rz: -40deg; }
.s3-tier { --h: 30px; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 220px; text-align: center; }
.s3-slab { position: relative; width: 110px; height: 110px; margin: 40px 0 10px; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(var(--rz)); }
.s3-slab i, .s3-slab::before, .s3-slab::after { position: absolute; content: ""; }
.s3-slab i { inset: 0; border-radius: 6px; transform: translateZ(var(--h)); background: linear-gradient(135deg, #8fd8ff, #6d5dfc 60%, #f0a6ff); box-shadow: 0 0 40px rgba(143,216,255,.45); }
.s3-slab::before { left: 0; top: 100%; width: 100%; height: var(--h); transform-origin: top; transform: rotateX(90deg); background: linear-gradient(#4338ca, #1e1b4b); }
.s3-slab::after { left: 100%; top: 0; width: var(--h); height: 100%; transform-origin: left; transform: rotateY(-90deg); background: linear-gradient(90deg, #312e81, #14123a); }
.s3-tier.haut .s3-slab i { box-shadow: 0 0 60px rgba(240,166,255,.6); }
.s3-tier-txt { display: grid; gap: 4px; text-shadow: 0 2px 16px rgba(4,6,15,.95); }
.s3-tier-txt b { color: #fff; font-size: 1.05rem; } .s3-tier-txt span { color: #b9bfe0; font-size: .9rem; }
.s3-tier-txt em { font-style: normal; font-weight: 700; color: #8fd8ff; font-size: .92rem; }

.s3-final { text-align: center; padding: 18vh 16px 20vh; }
.s3-final p { color: #b9bfe0; max-width: 560px; margin: .4rem auto; }

/* ----- Version animée ----- */
.i3-on .i3-stars { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100svh; z-index: 0; pointer-events: none; }
.i3-on .s3 .s3-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.i3-on .s3-head { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--i3-haut, 64px) + 3vh); width: min(760px, calc(100% - 32px)); margin: 0; z-index: 5; text-shadow: 0 2px 24px rgba(4,6,15,.85); }

.i3-on .s3-modules { height: 520vh; }
.i3-on .s3-ring-scene { position: absolute; left: 0; right: 0; top: 64%; height: 0; perspective: 1200px; }
.i3-on .s3-ring { display: block; position: absolute; left: 50%; top: 0; width: 0; height: 0; max-width: none; transform-style: preserve-3d; }
.i3-on .s3-card { position: absolute; width: 270px; height: 300px; left: -135px; top: -150px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: border-color .3s, box-shadow .3s; }
.i3-on .s3-card.face { border-color: rgba(143,216,255,.75); box-shadow: 0 30px 90px rgba(109,93,252,.45), inset 0 1px 0 rgba(255,255,255,.2); }
.i3-on .s3-count { display: block; position: absolute; bottom: 4vh; left: 0; right: 0; text-align: center; color: #9aa3d8; letter-spacing: .2em; font-size: .85rem; margin: 0; }
.i3-on .s3-count b { color: #fff; font-size: 1.1rem; }

.i3-on .s3-etapes { height: 480vh; }
.i3-on .s3-path { position: absolute; inset: 0; max-width: none; display: block; perspective: 900px; perspective-origin: 50% 55%; }
.i3-on .s3-step { position: absolute; left: 50%; top: 58%; width: min(460px, 84vw); padding: 28px; opacity: 0; will-change: transform, opacity;
  box-shadow: 0 30px 90px rgba(0,0,0,.5), 0 0 0 1px rgba(143,216,255,.15); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.i3-on .s3-step .s3-num { font-size: 4.2rem; }

.i3-on .s3-paliers { height: 360vh; }
.i3-on .s3-stairs-scene { position: absolute; left: 0; right: 0; bottom: 6vh; top: 46%; display: flex; align-items: center; justify-content: center; perspective: 1000px; }
.i3-on .s3-tier-txt { opacity: 0; }

@media (max-width: 640px) {
  .i3-on .s3-sub { font-size: .9rem; }
  .i3-on .s3-card { width: 240px; height: 270px; left: -120px; top: -135px; padding: 16px; }
  .i3-on .s3-ring-scene { top: 66%; }
  .i3-on .s3-paliers .s3-sub { display: none; }
  .i3-on .s3-stairs-scene { top: 34%; }
  .s3-stairs { flex-direction: column; align-items: stretch; gap: 6px; }
  .s3-tier { flex-direction: row; width: auto; text-align: left; gap: 22px; }
  .s3-slab { width: 70px; height: 70px; margin: 14px 18px 14px 14px; flex: none; }
  .i3-on .s3-step .s3-num { font-size: 3.2rem; }
}
