/* vivant2026.css (v9) - couche interactive commune (voir scripts/vivant2026.js) */

/* Calque des particules et envols */
.vv-calque { position: fixed; inset: 0; pointer-events: none; z-index: 9000; overflow: hidden; }
.vv-part, .vv-envol { position: absolute; display: block; will-change: transform, opacity; }
.vv-part svg, .vv-envol svg, .vv-envol img { width: 100%; height: 100%; display: block; object-fit: contain; }
.vv-envol { filter: drop-shadow(0 6px 10px rgba(80, 40, 60, .25)); }

/* Bulle de gain (+12 doggys) */
.vv-gain { position: absolute; transform: translate(-50%, 0); font: 800 15px/1 Fredoka, Nunito, Arial, sans-serif; padding: 5px 10px; border-radius: 999px;
  white-space: nowrap; box-shadow: 0 6px 16px rgba(60, 20, 50, .18); animation: vv-gain 2.2s cubic-bezier(.2, .7, .3, 1) forwards; }
.vv-plus { background: #E9FBE3; color: #237A2E; border: 2px solid #9ED58F; }
.vv-moins { background: #FFECEC; color: #B4232F; border: 2px solid #F2A3A9; }
@keyframes vv-gain { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -18px) scale(1.08); }
  70% { opacity: 1; transform: translate(-50%, -34px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -54px) scale(.95); } }
.vv-chip-plus { animation: vv-pouls-vert 1.5s ease-out; }
.vv-chip-moins { animation: vv-pouls-rouge 1.5s ease-out; }
@keyframes vv-pouls-vert { 0% { box-shadow: 0 0 0 0 rgba(60, 180, 80, .55); } 100% { box-shadow: 0 0 0 14px rgba(60, 180, 80, 0); } }
@keyframes vv-pouls-rouge { 0% { box-shadow: 0 0 0 0 rgba(220, 60, 70, .5); } 100% { box-shadow: 0 0 0 14px rgba(220, 60, 70, 0); } }

/* Bouton son */
.vv .tc-barre button.vv-son { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #F1D9E6; background: #fff; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; padding: 0; margin-left: 4px; flex: 0 0 auto; transition: transform .15s; box-shadow: none; min-height: 0; }
.vv .tc-barre button.vv-son:hover { transform: scale(1.08); }
.vv .tc-barre button.vv-son svg { width: 20px; height: 20px; fill: #C03284; stroke: #C03284; }
.vv .tc-barre button.vv-son-off svg { fill: #A99AA3; stroke: #A99AA3; }

/* Menu a icones : vie au survol, icone de la page en cours qui flotte */
.vv .tc-mi img { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.vv .tc-mi:hover img, .vv .tc-mi:focus-visible img { transform: translateY(-5px) rotate(-6deg) scale(1.08); }
.vv .tc-mi:active img { transform: translateY(1px) scale(.94); }
.vv .tc-mi.actif img { animation: vv-flotte 3.2s ease-in-out infinite; }
@keyframes vv-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.vv .tc-chip-chien img { transition: transform .2s; }

/* Bulle de dialogue */
.vv-bulle { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 8px) scale(.8); opacity: 0; transition: opacity .25s, transform .3s cubic-bezier(.3, 1.6, .5, 1);
  background: #fff; color: #4A2B44; font: 700 14px/1.3 Nunito, Arial, sans-serif; padding: 8px 12px; border-radius: 16px; border: 2px solid #E6C9DB;
  box-shadow: 0 8px 20px rgba(80, 30, 70, .15); white-space: nowrap; max-width: 260px; pointer-events: none; z-index: 30; }
.vv-bulle::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -8px; border: 8px solid transparent; border-top-color: #fff; }
.vv-bulle-on { opacity: 1; transform: translate(-50%, -6px) scale(1); }

/* Astuces */
.vv-astuce { position: absolute; z-index: 9500; max-width: 280px; background: #3E2A3A; color: #fff; font: 600 13px/1.4 Nunito, Arial, sans-serif;
  padding: 8px 12px; border-radius: 12px; box-shadow: 0 10px 24px rgba(40, 10, 40, .3); opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; pointer-events: none; }
.vv-astuce-on { opacity: 1; transform: none; }
[data-vv-astuce] { cursor: help; }
a[data-vv-astuce], button[data-vv-astuce] { cursor: pointer; }

/* Onde d'appui */
.vv-onde-hote { overflow: hidden; }
.vv-onde-rond { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: vv-onde .6s ease-out forwards; pointer-events: none; }
@keyframes vv-onde { to { transform: scale(1); opacity: 0; } }

/* Apparition au defilement */
.vv-cache { opacity: 0; transform: translateY(24px); }
.vv-vu { opacity: 1; transform: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .3, 1); }

/* Cartes : relief au survol */
.vv .cm-produit, .vv .parc-jeu, .vv .niv-carte { transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s; }
.vv .cm-produit:hover, .vv .parc-jeu:hover, .vv .niv-carte:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(120, 40, 90, .16); }

/* Compte a rebours */
[data-vv-fin] { font-variant-numeric: tabular-nums; }
.vv-fini { color: #237A2E; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .vv .tc-mi.actif img { animation: none; }
  .vv-cache { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .vv .tc-barre button.vv-son { width: 32px; height: 32px; }
}

/* Visionneuse des illustrations */
img.vv-zoomable { cursor: zoom-in; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s, filter .25s; }
img.vv-zoomable:hover, img.vv-zoomable:focus-visible { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 26px rgba(80, 40, 60, .22); filter: saturate(1.08); outline: none; }
.vv-visionneuse { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(30, 14, 30, .78); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; cursor: zoom-out; }
.vv-visionneuse.vv-on { opacity: 1; }
.vv-visionneuse img { max-width: min(92vw, 1100px); max-height: 86vh; width: auto; height: auto; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff; }
.vv-visionneuse button.vv-fermer { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #7A2F6A;
  font: 700 28px/44px Nunito, Arial, sans-serif; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); padding: 0; }

/* Page des niveaux : le chien sur l'etape en cours */
.vv-niv-chien { position: absolute; top: -40px; left: 50%; width: 46px; height: auto; transform: translateX(-50%); animation: vv-niv-saut 1.8s ease-in-out infinite; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); pointer-events: none; }
@keyframes vv-niv-saut { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.vv-eclaire { animation: vv-eclaire 1.2s ease-out; }
@keyframes vv-eclaire { 0% { box-shadow: 0 0 0 0 rgba(192, 50, 132, .55); } 100% { box-shadow: 0 0 0 18px rgba(192, 50, 132, 0); } }

/* Niveau 2 : chiots */
img.vv-chiot { cursor: pointer; border-radius: 14px; transition: transform .2s; }
img.vv-chiot:hover { transform: rotate(-2deg) scale(1.04); }
.vv-saut { animation: vv-saut .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes vv-saut { 40% { translate: 0 -12px; } }

/* Niveau 6 : parcours des etapes */
.vv-parcours { background: linear-gradient(90deg, transparent 8%, rgba(192, 50, 132, .0) 8%), repeating-linear-gradient(90deg, #E0B9D2 0 10px, transparent 10px 18px) center 50% / 84% 3px no-repeat; }
img.vv-etape { border-radius: 12px; transition: transform .25s; }
img.vv-etape-ok { box-shadow: 0 0 0 3px #F5B301, 0 6px 14px rgba(120, 70, 30, .25); }
img.vv-etape:hover { transform: scale(1.06); }
.vv-avion { position: absolute; top: -18px; right: 6px; width: 40px; height: 40px; animation: vv-avion 2.6s ease-in-out infinite; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3)); pointer-events: none; }
.vv-avion svg { width: 100%; height: 100%; }
.vv-avion-sol { animation: none; top: auto; bottom: 0; }
@keyframes vv-avion { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 4px -6px; rotate: -6deg; } }
.niv-chemin { margin-top: 46px !important; }

/* ===== Ambiance propre a chaque niveau (fond de page) ===== */
body.tc[class*="tc-p-n2"] { background-color: #FFEFF4 !important; background-image: radial-gradient(rgba(255, 150, 190, .18) 2px, transparent 3px); background-size: 34px 34px; }
body.tc[class*="tc-p-n3"] { background-color: #F6EEFF !important; background-image: linear-gradient(45deg, rgba(190, 150, 60, .08) 25%, transparent 25%, transparent 75%, rgba(190, 150, 60, .08) 75%), linear-gradient(45deg, rgba(190, 150, 60, .08) 25%, transparent 25%, transparent 75%, rgba(190, 150, 60, .08) 75%); background-size: 40px 40px; background-position: 0 0, 20px 20px; }
body.tc[class*="tc-p-n4"] { background-color: #EEF5FB !important; background-image: linear-gradient(rgba(80, 130, 190, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(80, 130, 190, .09) 1px, transparent 1px); background-size: 26px 26px; }
body.tc[class*="tc-p-n5"] { background-color: #F3F7EC !important; background-image: radial-gradient(rgba(120, 160, 70, .14) 1.5px, transparent 2.5px); background-size: 28px 28px; }
body.tc[class*="tc-p-n6"] { background: linear-gradient(180deg, #CFE9FA 0, #EAF6FD 45%, #FFF6E6 100%) fixed; background-color: #EAF6FD !important; }
body.tc[class*="tc-p-n6"]::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .7;
  background: radial-gradient(60px 22px at 20% 18%, #fff 60%, transparent 62%), radial-gradient(90px 28px at 70% 12%, #fff 60%, transparent 62%), radial-gradient(70px 24px at 45% 30%, #fff 60%, transparent 62%);
  animation: vv-nuages 60s linear infinite alternate; }
@keyframes vv-nuages { to { transform: translateX(6%); } }
body.tc[class*="tc-p-n7"] { background: radial-gradient(ellipse at 70% 20%, #2A2A6E 0, #11143A 45%, #070A1F 100%) fixed; background-color: #0B1030 !important; }
body.tc[class*="tc-p-n7"]::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 35%, #fff, transparent),
    radial-gradient(1px 1px at 80% 60%, #fff, transparent), radial-gradient(2px 2px at 90% 15%, #FFF3B0, transparent), radial-gradient(1px 1px at 65% 85%, #fff, transparent), radial-gradient(1.5px 1.5px at 20% 90%, #CFE3FF, transparent);
  background-size: 420px 420px; animation: vv-etoiles 4s ease-in-out infinite alternate; }
@keyframes vv-etoiles { from { opacity: .55; } to { opacity: 1; } }
/* Niveau 3 : les objets de la Niche Royale brillent au survol */
body.tc[class*="tc-p-n3"] table img[width="76"] { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), filter .3s; }
body.tc[class*="tc-p-n3"] table img[width="76"]:hover { transform: rotate(-6deg) scale(1.12); filter: drop-shadow(0 0 10px rgba(255, 210, 80, .9)); }
@media (prefers-reduced-motion: reduce) { body.tc[class*="tc-p-n6"]::before, body.tc[class*="tc-p-n7"]::before { animation: none; } }

/* ===== Classements : podium, recherche, tri ===== */
.vv-podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 14px auto 10px; max-width: 560px; }
.vv-marche { position: relative; flex: 1; max-width: 180px; display: flex; flex-direction: column; align-items: center; border-radius: 18px 18px 8px 8px; padding: 8px 6px 34px;
  background: linear-gradient(180deg, #FFF6D8, #FFE29A); box-shadow: 0 8px 18px rgba(150, 100, 20, .18); font-family: Nunito, Arial, sans-serif; }
.vv-marche img { width: 92px; height: auto; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .2)); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.vv-marche:hover img { transform: translateY(-6px) rotate(-4deg); }
.vv-marche b { font: 800 14px/1.1 Fredoka, Nunito, Arial, sans-serif; color: #5A3A00; }
.vv-marche small { font-size: 11px; color: #8A6A2A; }
.vv-marche span { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; background: #fff; font: 800 14px/26px Fredoka, Nunito, Arial, sans-serif; color: #8A5B00; text-align: center; }
.vv-marche1 { min-height: 190px; background: linear-gradient(180deg, #FFF1B8, #FFC93C); }
.vv-marche1::before { content: "\1F451"; position: absolute; top: -22px; font-size: 26px; animation: vv-flotte 2.6s ease-in-out infinite; }
.vv-marche2 { min-height: 160px; background: linear-gradient(180deg, #F4F6FA, #D5DBE6); }
.vv-marche3 { min-height: 140px; background: linear-gradient(180deg, #FFE9D8, #E9B184); }
.vv-marche.vv-moi { box-shadow: 0 0 0 3px #C03284, 0 8px 18px rgba(150, 100, 20, .18); }
.vv-outils { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 6px 0 10px; }
.vv-recherche { font: 700 14px/1 Nunito, Arial, sans-serif; padding: 9px 14px; border-radius: 999px; border: 2px solid #F1D9E6; min-width: 220px; outline: none; }
.vv-recherche:focus { border-color: #C03284; }
.vv-outils button.vv-ou { font: 800 13px/1 Nunito, Arial, sans-serif; padding: 9px 14px; border-radius: 999px; border: 0; background: #C03284; color: #fff; cursor: pointer; }
.vv-rang { font-size: 13px; color: #5E4A57; }
table.vv-classement { width: 94%; margin: 0 auto 10px; border-collapse: separate; border-spacing: 0 4px; font: 600 13px/1.2 Nunito, Arial, sans-serif; color: #3E2A3A; }
table.vv-classement th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: #8A4C7C; padding: 6px; cursor: pointer; user-select: none; white-space: nowrap; }
table.vv-classement th:hover { color: #C03284; }
table.vv-classement th.vv-actif::after { content: " \25BC"; font-size: 9px; }
table.vv-classement th.vv-actif.vv-asc::after { content: " \25B2"; }
table.vv-classement td { background: #fff; padding: 6px 8px; text-align: center; }
table.vv-classement td:first-child { border-radius: 12px 0 0 12px; }
table.vv-classement td:last-child { border-radius: 0 12px 12px 0; color: #7A2F6A; }
table.vv-classement td:nth-child(2) { text-align: left; white-space: nowrap; }
table.vv-classement tr { transition: transform .15s; }
table.vv-classement tbody tr:hover { transform: translateX(4px); }
table.vv-classement tbody tr:hover td { background: #FFF6FB; }
table.vv-classement tr.vv-moi td { background: #FCEAF4; }
img.vv-mini { width: 34px; height: auto; vertical-align: middle; margin-right: 6px; }
@media (max-width: 640px) { table.vv-classement td:nth-child(3), table.vv-classement th:nth-child(3), table.vv-classement td:nth-child(6), table.vv-classement th:nth-child(6) { display: none; } .vv-marche img { width: 64px; } }

/* Compte : choix de la race en cartes */
.vv-race { border-radius: 16px; transition: background .2s, box-shadow .2s, transform .2s; padding: 4px; }
.vv-race img { cursor: pointer; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.vv-race:hover img { transform: translateY(-4px); }
.vv-race-choisie { background: #FCEAF4; box-shadow: inset 0 0 0 2px #C03284; }
@media print { .vv-cache { opacity: 1 !important; transform: none !important; } }
@media (max-width: 640px) {
  body.tc-p-classementn1 table[width="750"] { width: 100% !important; }
  table.vv-classement { width: 100%; font-size: 12px; }
  table.vv-classement td, table.vv-classement th { padding: 5px 4px; }
  table.vv-classement td:nth-child(5), table.vv-classement th:nth-child(5) { display: none; }
  table.vv-classement td:nth-child(2) { white-space: normal; }
  img.vv-mini { width: 26px; margin-right: 3px; }
  .vv-podium { gap: 6px; }
  .vv-recherche { min-width: 0; width: 100%; }
}

/* v13 : panneau Sons et musique (ambiance2026.js) */
.am-panneau { position: absolute; z-index: 9500; width: 260px; padding: 14px 14px 10px; border-radius: 20px; background: #fff; color: #3E2A3A; text-align: left;
  font: 400 13.5px/1.4 Nunito, Arial, sans-serif; box-shadow: 0 18px 44px rgba(60, 20, 40, .25); animation: am-pop .25s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes am-pop { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
.am-t { display: block; margin-bottom: 8px; font: 700 16px Fredoka, Nunito, Arial, sans-serif; color: #7A2F6A; }
.am-l { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; cursor: pointer; font-weight: 700; }
.am-l input { position: absolute; opacity: 0; pointer-events: none; }
.am-l i { flex: 0 0 40px; height: 24px; border-radius: 999px; background: #E6DCE2; position: relative; transition: background .2s; }
.am-l i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.am-l input:checked + i { background: #C03284; }
.am-l input:checked + i::after { transform: translateX(16px); }
.am-l input:focus-visible + i { box-shadow: 0 0 0 3px rgba(192, 50, 132, .35); }
.am-morceau { margin: -2px 0 4px; padding: 6px 10px; border-radius: 12px; background: #FFF4FA; color: #9E1F6A; font-size: 12.5px; font-weight: 700; }
.am-note { margin: -2px 0 4px; font-size: 12px; color: #8A7480; }
.am-vol { display: flex; align-items: center; gap: 10px; padding: 4px 0 8px; font-size: 12.5px; color: #8A7480; }
.am-vol input { flex: 1; accent-color: #C03284; }
.am-pied { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid #F3E7EE; font-size: 11px; color: #A99AA3; }
