/* Nuvi en ligne : ce que le prototype ajoute aux maquettes (états, tiroir animé, toast, mini-jeu, tablette).
   Le visuel des maquettes est dans nuvi.css, généré par outils/generer.py. */

[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html.panier-ouvert { overflow: hidden; }
:is(summary, [tabindex], textarea):focus-visible { outline: 3px solid var(--garrigue); outline-offset: 3px; }
.tiroir:focus { outline: none; }

/* Le logo imbriqué dans chaque canette garde sa taille, même quand une règle vise « .bloc svg ». */
svg svg { width: 72px !important; height: 168px !important; max-height: none !important; transform: none !important; animation: none !important; }

/* Lien d'évitement */
.evitement { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 20px; border-radius: 99px; background: var(--soleil); color: var(--garrigue); font-weight: 800; border: 2px solid var(--garrigue); }
.evitement:focus { top: 10px; }

/* ───────── En-tête ───────── */
.entete .logo img { width: auto; }
.pastille { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.pastille:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--garrigue); }
.pastille[aria-current="page"] { background: var(--garrigue); color: var(--creme); }
.pastille .compte.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.5); } }
.sans-bandeau .entete.sur-couleur { top: 0; }
.menu-panneau { position: absolute; right: 2.5vw; top: calc(100% - 4px); z-index: 25; display: grid; gap: 6px; min-width: 230px; padding: 10px; border-radius: 26px; background: var(--creme); border: 2px solid var(--garrigue); box-shadow: 0 6px 0 var(--garrigue); }
.entete nav.menu-panneau { display: grid; margin-left: 0; align-items: stretch; }
.menu-panneau a, .menu-panneau button { display: flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 99px; background: #fff; border: 2px solid var(--garrigue); font-weight: 800; font-size: 17px; text-align: left; cursor: pointer; }
.menu-panneau [aria-current="page"] { background: var(--soleil); }
@media (max-width: 860px) {
  .entete .cache-mobile { display: none; }
  .menu-mobile { display: inline-flex; }
}
@media (max-width: 600px) { .menu-panneau { right: 14px; left: 14px; } }

/* ───────── Pied ───────── */
.reseaux button { width: 48px; height: 48px; border-radius: 50%; background: var(--soleil); border: 2px solid var(--garrigue); display: grid; place-items: center; cursor: pointer; }
.mentions nav button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font-size: 13.5px; cursor: pointer; }
.mentions nav button:hover, .credit { text-decoration: underline; text-underline-offset: 3px; }
.credit { font-weight: 700; text-decoration-thickness: 2px; }
.credit:hover { text-decoration-color: var(--soleil); }

/* ───────── Boutons posés en absolu : le survol garde leur placement ───────── */
.heros-bas .btn.btn:not([disabled]):not(.inactif):hover { transform: translate(-50%, -152px) rotate(-3deg); }
.heros-bas .btn.btn:not([disabled]):not(.inactif):active { transform: translate(-50%, -146px) rotate(-3deg); }
.bouton-jeu.btn:not([disabled]):not(.inactif):hover { transform: translate(-50%, -2px); }
.bouton-jeu.btn:not([disabled]):not(.inactif):active { transform: translate(-50%, 4px); }
@media (max-width: 600px) {
  .heros-bas .btn.btn:not([disabled]):not(.inactif):hover { transform: translate(-50%, -112px) rotate(-3deg); }
  .heros-bas .btn.btn:not([disabled]):not(.inactif):active { transform: translate(-50%, -106px) rotate(-3deg); }
}
.fleche { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.fleche:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--garrigue); }
.fleche:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--garrigue); }
.btn[aria-disabled="true"] { background: #E4DCCB; color: #4E5F52; border-color: #B9AF9A; box-shadow: none; cursor: not-allowed; }

/* ───────── Home ───────── */
.titre-heros span { display: inline-block; }
.heros-can { animation: flotte 4.5s ease-in-out infinite; }
.heros-can > svg.entre-d { animation: entre-d .55s cubic-bezier(.2, .9, .3, 1.3); }
.heros-can > svg.entre-g { animation: entre-g .55s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes flotte { 50% { transform: translateY(-14px); } }
@keyframes entre-d { from { transform: translateX(120px) rotate(18deg); opacity: 0; } }
@keyframes entre-g { from { transform: translateX(-120px) rotate(-18deg); opacity: 0; } }
.etoiles path, .collage > path[transform], .etoiles-h path[transform] { animation: scintille 2.6s ease-in-out infinite; }
.etoiles path:nth-child(2n), .collage > path[transform]:nth-of-type(2n) { animation-delay: -1.3s; }
.etoiles path:nth-child(3n) { animation-delay: -.6s; }
@keyframes scintille { 50% { opacity: .25; } }
.defile-piste { gap: 0; animation: defile 32s linear infinite; }
.defile-piste > * { margin-right: 34px; }
.defile:hover .defile-piste { animation-play-state: paused; }
@keyframes defile { to { transform: translateX(-25%); } }
@media (max-width: 600px) { .defile-piste > * { margin-right: 22px; } }
.arc-tour { position: absolute; inset: 0; display: grid; place-items: center; }
.bulle-vol > svg { animation: flotte 3.4s ease-in-out infinite; }
.fleur > svg { animation: tourne 28s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.abo-geant .multicolore span { display: inline-block; white-space: pre; }
.reco-piste { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.reco-piste::-webkit-scrollbar { display: none; }
.reco-piste .tuile { scroll-snap-align: start; }

/* ───────── Tuiles produit ───────── */
a.tuile .visuel > svg, .tuile .visuel > svg { transition: transform .3s cubic-bezier(.2, .9, .3, 1.4); }
.tuile:hover .visuel > svg { transform: translateY(-10px) rotate(-4deg) !important; }
.tuile:hover .visuel > svg:nth-child(2n) { transform: translateY(-14px) rotate(5deg) !important; }
.lien-tuile { position: static; }
.lien-tuile::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lien-tuile:focus-visible { outline: none; }
.tuile:has(.lien-tuile:focus-visible) { outline: 3px solid var(--garrigue); outline-offset: -6px; }
.tuile .btn { position: relative; z-index: 2; }
.tuile.apparait { animation: apparait .45s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes apparait { from { opacity: 0; transform: translateY(24px); } }
.filtre { transition: transform .12s ease; }
.filtre:hover { transform: translateY(-2px); }

/* ───────── Fiche produit ───────── */
.galerie-grande { isolation: isolate; }
.vues, .vue { position: absolute; inset: 0; }
.vue { display: grid; place-items: center; }
.vue.entre { animation: fondu .35s ease; }
@keyframes fondu { from { opacity: 0; transform: scale(.97); } }
.vue-bulle { width: 44%; height: auto; position: relative; transform: rotate(-6deg); filter: drop-shadow(0 20px 20px rgba(31,61,43,.25)); }
.vue-pack { position: relative; width: 22%; height: auto; margin: 0 -2%; filter: drop-shadow(0 20px 18px rgba(31,61,43,.3)); }
.vue:has(.vue-pack) { display: flex; justify-content: center; align-items: center; }
.vue-rang { position: relative; display: flex; gap: 2%; justify-content: center; width: 86%; }
.vue-rang img { width: 22%; height: auto; filter: drop-shadow(0 16px 14px rgba(31,61,43,.3)); }
.vue-grille { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 18px; width: 62%; }
.vue-grille img { width: 100%; height: auto; }
.macaron, .g-g, .g-d { z-index: 2; }
.vignettes button { aspect-ratio: 1; padding: 0; border-radius: 18px; border: 2px solid transparent; display: grid; place-items: center; overflow: hidden; grid-auto-flow: column; cursor: pointer; }
.vignettes button.actif { border-color: var(--garrigue); }
.vignettes img, .vignettes button > svg { max-height: 80%; width: auto; }
.nuance { cursor: pointer; }
.nuance:hover { border-color: var(--garrigue); }
.contenu-coffret { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contenu-coffret li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 18px; border: 2px solid #E9DDC3; background: #fff; font-weight: 700; font-size: 14px; }
@media (max-width: 600px) { .contenu-coffret { grid-template-columns: 1fr; } }
.contenu-coffret i { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--garrigue); }
.rythme-fiche { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-weight: 700; font-size: 14px; }
.rythmes-mini { display: flex; gap: 6px; }
.rythme { height: 44px; padding: 0 14px; border-radius: 99px; border: 2px solid #D9CDB2; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.rythme.actif { background: var(--garrigue); border-color: var(--garrigue); color: var(--creme); }
.date { transition: transform .12s ease; }
.date:hover { transform: translateY(-2px); border-color: var(--garrigue); }
.estimation { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; }
.estimation svg { color: #3E7A1E; }
.quantite button[disabled] { opacity: .35; cursor: not-allowed; }
.alerte-msg { margin-top: 6px; }
.alerte-msg.ok { padding: 12px 14px; border-radius: 16px; background: #EAF6D3; border: 2px solid var(--garrigue); font-weight: 600; }
.alerte-msg.err { color: #A12B4F; font-weight: 700; font-size: 14px; }
.previens input[aria-invalid="true"] { border-color: #B8325A; background: #FFF1F4; }
.suggestion { transition: transform .12s ease; }
.suggestion:hover { transform: translateY(-2px); }
.sugg-can img { width: 22px; height: auto; }
.bouton-ajout { color: var(--t, var(--garrigue)); }
.fiche .bouton-ajout.ajoute { animation: bump .45s ease; }
@media (min-width: 601px) and (max-width: 1100px) {
  .fiche { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }
  .nom-produit { font-size: 64px; }
}

/* ───────── Tiroir panier ───────── */
.voile { opacity: 0; transition: opacity .3s ease; }
.voile.ouvert { opacity: 1; }
.tiroir { transform: translateX(calc(100% + 40px)); transition: transform .45s cubic-bezier(.2, .9, .25, 1.08); }
.tiroir.ouvert { transform: none; }
.tiroir-corps { overscroll-behavior: contain; }
.tiroir-pied:empty { display: none; }
.ligne.nouvelle { animation: apparait .5s cubic-bezier(.2, .9, .3, 1.3); }
.ligne .vig img { width: 34px; height: auto; }
.ligne .vig.multi img, .upsell .vig img { width: 15px; height: auto; }
.ligne .vig.multi { gap: 1px; }
.jauge i { transition: width .5s cubic-bezier(.2, .9, .3, 1.1); }
.jauge .bout { transition: left .5s cubic-bezier(.2, .9, .3, 1.1); }
.progression.offerte { background: #EAF6D3; }
.recap .offert { color: #2F6B12; }
.code summary { display: flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 14px; cursor: pointer; }
.code .msg-err.ok { color: #2F6B12; }
.tiroir .vide img { width: 150px; height: auto; }
.fin-demo { display: grid; justify-items: center; gap: 12px; padding: 24px 6px 10px; text-align: center; }
.fin-demo img { width: 140px; height: auto; }
.fin-demo h3 { font-size: 44px; }
.fin-demo p { max-width: 340px; }
.fin-demo .btn { width: 100%; }
@media (max-width: 600px) {
  .tiroir { transform: translateY(105%); }
  .tiroir.ouvert { transform: none; }
  .fin-demo h3 { font-size: 36px; }
}

/* ───────── Toast ───────── */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; max-width: calc(100% - 28px); width: max-content; padding: 14px 22px; border-radius: 22px; background: var(--garrigue); color: var(--creme); border: 2px solid var(--garrigue); box-shadow: 0 5px 0 var(--soleil); font-weight: 700; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), opacity .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { padding: 0; border: 0; }

/* ───────── Mini-jeu ───────── */
.jeu { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.jeu.en-jeu { touch-action: none; cursor: pointer; }
.jeu .heros-jeu, .jeu .obstacle { bottom: 17.33%; }
.jeu .heros-jeu { will-change: transform; z-index: 1; }
.heros-jeu img { display: block; width: 92px; height: auto; }
.bulle-corps { transform-origin: 50% 100%; }
.jeu[data-etat="attente"] .bulle-corps { animation: flotte 2.4s ease-in-out infinite; }
.bulle-corps.atterrit { animation: ecrase .22s ease-out; }
@keyframes ecrase { 40% { transform: scale(1.12, .86); } }
.obstacle img { display: block; width: 36px; height: auto; }
.obstacle.mobile { left: 0; will-change: transform; }
.obstacle.double { display: flex; gap: 4px; }
.jeu .score { margin: 0; }
.jeu-message { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); width: max-content; max-width: 92%; text-align: center; font: 800 22px/1.15 var(--police-titre); text-transform: uppercase; }
.jeu.en-jeu .bouton-jeu { visibility: hidden; }
@media (max-width: 600px) {
  .heros-jeu img { width: 64px; }
  .obstacle img { width: 30px; }
  .jeu-message { font-size: 17px; top: 14%; }
  .bouton-jeu { bottom: 56px; }
}

/* ───────── Abonnement ───────── */
.lien-alerte { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.compo-manque { margin-top: 10px; font-weight: 700; color: #A12B4F; }
.rythmes .date { cursor: pointer; }

/* ───────── 404 ───────── */
.page-404 { display: grid; justify-items: center; gap: 18px; padding: 30px 2.5vw 90px; text-align: center; }
.p404-bulle svg { animation: flotte 3s ease-in-out infinite; }
.p404-titre { font-size: clamp(52px, 9vw, 130px); }
.p404-texte { max-width: 460px; font-size: 19px; }
.p404-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tiroir, .toast { transition: none; }
}
