/* ============ Liste de Noël — design « jouet design » ============ */
:root {
  --creme: #fff6e9;
  --creme-2: #ffeed6;
  --encre: #1c1530;
  --encre-doux: #5a5170;
  --pale: #9a90ad;
  --blanc: #ffffff;
  --trait: 2.5px solid var(--encre);
  --ombre-dure: 5px 5px 0 var(--encre);
  --ombre-dure-haute: 9px 9px 0 var(--encre);

  --tomate: #ff5b3a; --jaune: #ffc531; --violet: #8b5cf6; --ciel: #4fb3ff; --rose: #ff7eb6;
  --menthe: #3ddc97; --bleu: #3d6bff; --lilas: #b79cff; --corail: #ff8a65; --peche: #ffb38a;
  --turquoise: #2ec4b6; --citron: #d7f25a; --ardoise: #7d8db0; --orange: #ff8c1a; --fraise: #ff4d6d;

  --accent: var(--jaune);
  /* alias utilisés par la vue parents */
  --surface: var(--blanc); --ligne: var(--encre); --doux: var(--encre-doux); --lime: var(--menthe); --danger: var(--fraise); --texte: var(--encre);
  --rayon: 28px;
  --ressort: cubic-bezier(0.34, 1.56, 0.64, 1);
  --doux-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --f-titre: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-texte: 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--f-texte); font-weight: 600;
  background: var(--creme); color: var(--encre);
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
::selection { background: var(--jaune); color: var(--encre); }

/* ---------- Fond : formes qui flottent ---------- */
.formes { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.formes svg { position: absolute; animation: flotter var(--d, 14s) ease-in-out infinite alternate; animation-delay: var(--delai, 0s); opacity: 0.9; }
@keyframes flotter {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(var(--dx, 20px), var(--dy, -30px)) rotate(var(--rot, 25deg)); }
}

/* ---------- Typo ---------- */
.titre-geant {
  font-family: var(--f-titre); font-weight: 800; letter-spacing: -0.045em;
  font-size: clamp(2.6rem, 8vw, 6.4rem); line-height: 0.95;
}
.surtitre { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--encre-doux); font-weight: 900; }
/* Mot surligné comme un autocollant */
.serif, .degrade {
  font-family: inherit; font-style: normal;
}
.degrade {
  display: inline-block; position: relative; padding: 0 0.12em; z-index: 0; white-space: nowrap;
}
.degrade::before {
  content: ''; position: absolute; inset: 0.08em -0.04em 0.02em; z-index: -1; border-radius: 0.22em;
  background: var(--accent); border: var(--trait); box-shadow: 4px 4px 0 var(--encre); transform: rotate(-2deg);
}

/* Lettres qui rebondissent une à une */
.mot { display: inline-block; white-space: nowrap; }
.lettre { display: inline-block; opacity: 0; transform: translateY(0.6em) scale(0.6) rotate(-12deg);
  animation: lettre 0.7s var(--ressort) forwards; }
@keyframes lettre { to { opacity: 1; transform: none; } }

/* ---------- Mise en page ---------- */
.conteneur { width: min(1240px, 100% - 32px); margin-inline: auto; }
.entete { position: sticky; top: 0; z-index: 30; padding: 12px 0; transition: background 0.3s, border-color 0.3s; border-bottom: 2.5px solid transparent; }
.entete.colle { background: rgba(255, 246, 233, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--encre); }
.entete .conteneur { display: flex; align-items: center; gap: 10px; }
.logo { font-family: var(--f-titre); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.04em; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo img { width: 34px; height: 34px; animation: dandine 3s ease-in-out infinite; }
@keyframes dandine { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-3px); } }
.espace { flex: 1; }

/* ---------- Boutons, pastilles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 900; font-size: 0.98rem;
  background: var(--blanc); border: var(--trait); box-shadow: 3px 3px 0 var(--encre);
  transition: transform 0.2s var(--ressort), box-shadow 0.2s var(--ressort), background 0.2s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--encre); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--encre); }
.btn-primaire { background: var(--accent); }
.btn-petit { padding: 8px 14px; font-size: 0.88rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn img { width: 22px; height: 22px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.pastille {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--blanc); border: var(--trait); font-weight: 900; font-size: 0.92rem; box-shadow: 3px 3px 0 var(--encre);
  transition: transform 0.2s var(--ressort);
}
button.pastille:hover { transform: translate(-1px, -2px) rotate(-1deg); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--f-titre); font-weight: 800; font-size: 1rem; color: var(--encre);
  background: var(--couleur, var(--lilas)); border: 2px solid var(--encre);
}
.compteur {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--encre); color: var(--blanc);
  font-size: 0.85rem; font-weight: 900; display: inline-grid; place-items: center;
}
.compteur.saute { animation: saute 0.6s var(--ressort); }
@keyframes saute { 0% { transform: scale(1); } 40% { transform: scale(1.7) rotate(-10deg); } 100% { transform: scale(1); } }

/* ---------- Puces de catégories ---------- */
.puces { display: flex; gap: 10px; overflow-x: auto; padding: 6px 16px 14px; margin: 0 -16px; scrollbar-width: none; scroll-padding-inline: 16px; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  flex: none; padding: 9px 16px; border-radius: 999px; font-weight: 900; font-size: 0.92rem;
  border: var(--trait); background: var(--blanc); transition: transform 0.2s var(--ressort), box-shadow 0.2s, background 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.puce img { width: 22px; height: 22px; }
.puce:hover { transform: translateY(-2px) rotate(-1.5deg); }
.puce.active { background: var(--c, var(--jaune)); box-shadow: 3px 3px 0 var(--encre); transform: translate(-1px, -2px); }
.puce small { opacity: 0.55; font-weight: 800; }

/* ---------- Recherche ---------- */
.recherche { position: relative; max-width: 640px; }
.recherche input {
  width: 100%; padding: 19px 24px 19px 58px; border-radius: 999px; font-size: 1.12rem; font-weight: 800;
  background: var(--blanc); border: var(--trait); outline: none; box-shadow: var(--ombre-dure);
  transition: box-shadow 0.25s var(--ressort), transform 0.25s var(--ressort);
}
.recherche input::placeholder { color: var(--pale); }
.recherche input:focus { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--accent), 8px 8px 0 2.5px var(--encre); }
.recherche > svg { position: absolute; left: 22px; top: 50%; translate: 0 -50%; width: 24px; height: 24px; }
.recherche .effacer { position: absolute; right: 12px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border-radius: 50%; display: none; place-items: center; }
.recherche .effacer:hover { background: var(--creme-2); }
.recherche .effacer svg { width: 18px; }
.recherche.rempli .effacer { display: grid; }

/* ---------- Grille de cartes ---------- */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 22px; }
@media (max-width: 560px) { .grille { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.carte {
  position: relative; border-radius: var(--rayon); background: var(--blanc); border: var(--trait);
  box-shadow: var(--ombre-dure); overflow: hidden;
  transition: transform 0.3s var(--ressort), box-shadow 0.3s var(--ressort);
  opacity: 0; translate: 0 40px; rotate: 2deg;
}
.carte.vue { opacity: 1; translate: 0 0; rotate: 0deg; transition: transform 0.3s var(--ressort), box-shadow 0.3s var(--ressort), opacity 0.5s, translate 0.7s var(--ressort), rotate 0.7s var(--ressort); }
.carte:hover { transform: translate(-3px, -4px) rotate(-0.8deg); box-shadow: var(--ombre-dure-haute); }
.carte .visuel {
  position: relative; aspect-ratio: 1 / 0.92; background: var(--c, var(--jaune)); border-bottom: var(--trait);
  display: grid; place-items: center; overflow: hidden;
}
/* Petits motifs dans la tuile */
.carte .visuel::before {
  content: ''; position: absolute; inset: 0; opacity: 0.22;
  background-image: radial-gradient(circle, var(--encre) 1.6px, transparent 2px); background-size: 18px 18px;
  mask-image: radial-gradient(circle at 70% 20%, #000, transparent 70%);
}
.carte .visuel::after {
  content: ''; position: absolute; width: 46%; height: 9%; bottom: 13%; left: 27%; border-radius: 50%;
  background: rgba(28, 21, 48, 0.22); filter: blur(3px); transition: transform 0.5s var(--ressort), opacity 0.5s;
}
.carte .visuel .objet {
  position: relative; z-index: 1; width: 62%; height: auto; filter: drop-shadow(0 8px 0 rgba(28, 21, 48, 0.12));
  transition: transform 0.55s var(--ressort); transform: translateY(-4%);
}
.carte:hover .visuel .objet { transform: translateY(-14%) rotate(-8deg) scale(1.1); }
.carte:hover .visuel::after { transform: scale(0.75); opacity: 0.6; }
.carte .visuel .sticker {
  position: absolute; z-index: 2; right: 10px; top: 10px; width: 46px; height: 46px; padding: 7px;
  border-radius: 50%; background: var(--blanc); border: 2px solid var(--encre); transform: rotate(12deg);
  transition: transform 0.5s var(--ressort);
}
.carte:hover .visuel .sticker { transform: rotate(-12deg) scale(1.15); }
.carte .infos { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.carte .cat { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--encre-doux); font-weight: 900; }
.carte h3 { font-family: var(--f-titre); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; line-height: 1.12; }
.bouton-rond {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--blanc); border: var(--trait); box-shadow: 3px 3px 0 var(--encre); color: var(--encre);
  transition: transform 0.3s var(--ressort), background 0.2s, box-shadow 0.2s;
}
.bouton-rond:hover { transform: scale(1.12) rotate(-10deg); }
.bouton-rond svg { width: 24px; height: 24px; transition: transform 0.45s var(--ressort); }
.bouton-rond img { width: 30px; height: 30px; }
.carte .visuel .bouton-rond { position: absolute; z-index: 3; right: 12px; bottom: 12px; }
.carte.choisie { box-shadow: 5px 5px 0 var(--encre), 0 0 0 4px var(--blanc), 0 0 0 6.5px var(--encre); }
.carte.choisie .bouton-rond { background: var(--encre); color: var(--blanc); }
.carte.choisie .bouton-rond svg { transform: rotate(360deg); }
.carte .badge {
  position: absolute; z-index: 2; left: 10px; top: 10px; padding: 6px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 900;
  background: var(--blanc); border: 2px solid var(--encre); display: flex; gap: 6px; align-items: center; transform: rotate(-4deg);
}
.carte .badge svg { width: 13px; height: 13px; color: var(--fraise); }

.eclat { position: fixed; pointer-events: none; z-index: 100; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--encre); }

/* ---------- Tiroir ---------- */
.voile { position: fixed; inset: 0; background: rgba(28, 21, 48, 0.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.voile.ouvert { opacity: 1; pointer-events: auto; }
.tiroir {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 100%); z-index: 61; background: var(--creme);
  border-left: var(--trait); transform: translateX(105%); transition: transform 0.55s var(--ressort);
  display: flex; flex-direction: column;
}
.tiroir.ouvert { transform: none; }
.tiroir header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: var(--trait); background: var(--blanc); }
.tiroir header h2 { font-family: var(--f-titre); font-size: 1.6rem; letter-spacing: -0.04em; flex: 1; font-weight: 800; }
.tiroir .corps { flex: 1; overflow-y: auto; padding: 20px 22px 30px; display: flex; flex-direction: column; gap: 14px; }
.tiroir footer { padding: 16px 22px 22px; border-top: var(--trait); background: var(--blanc); }
.fermer { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: var(--trait); background: var(--blanc); transition: transform 0.3s var(--ressort); }
.fermer:hover { transform: rotate(90deg); }
.fermer svg { width: 18px; height: 18px; }

.ligne-voeu {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 20px; background: var(--blanc); border: var(--trait);
  box-shadow: 3px 3px 0 var(--encre); animation: entre 0.5s var(--ressort) both;
}
@keyframes entre { from { opacity: 0; transform: translateX(40px) rotate(3deg); } }
.ligne-voeu.sort { animation: sort 0.4s var(--doux-ease) forwards; }
@keyframes sort { to { opacity: 0; transform: translateX(60px) rotate(6deg) scale(0.9); } }
.vignette {
  width: 62px; height: 62px; border-radius: 16px; flex: none; display: grid; place-items: center;
  background: var(--c, var(--jaune)); border: 2px solid var(--encre);
}
.vignette img { width: 72%; height: 72%; object-fit: contain; }
.vignette.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.ligne-voeu .t { flex: 1; min-width: 0; }
.ligne-voeu .t b { display: block; font-family: var(--f-titre); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.ligne-voeu .t small { color: var(--encre-doux); font-size: 0.82rem; }
.icone-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: transform 0.25s var(--ressort), background 0.2s; flex: none; }
.icone-btn:hover { background: var(--creme-2); transform: scale(1.12) rotate(-8deg); }
.icone-btn svg { width: 21px; height: 21px; }
.icone-btn.coeur.actif { color: var(--fraise); }
.icone-btn.coeur.actif svg { fill: currentColor; animation: battement 0.5s var(--ressort); }
@keyframes battement { 40% { transform: scale(1.5) rotate(-10deg); } }

/* ---------- Message du Père Noël ---------- */
.lettre-pn {
  position: relative; border-radius: var(--rayon); padding: 22px; background: var(--blanc); border: var(--trait);
  box-shadow: var(--ombre-dure); overflow: hidden;
}
.lettre-pn::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: repeating-linear-gradient(135deg, var(--tomate) 0 14px, var(--blanc) 14px 28px, var(--ciel) 28px 42px, var(--blanc) 42px 56px);
  border-bottom: 2px solid var(--encre);
}
.atelier { position: relative; height: 130px; margin: 6px 0 8px; }
.atelier img { position: absolute; }
.atelier .pn { width: 110px; left: 0; bottom: 0; animation: dandine 2.6s ease-in-out infinite; transform-origin: bottom center; }
.atelier .paquet { width: 74px; left: 46%; bottom: 8px; animation: rebond 1.4s var(--ressort) infinite; }
.atelier .engrenage { width: 54px; right: 6%; top: 6px; animation: tourne 5s linear infinite; }
.atelier .engrenage.petit { width: 36px; right: 22%; top: 52px; animation-direction: reverse; animation-duration: 3s; }
.atelier .eclats { width: 34px; left: 38%; top: 0; animation: scint 1.8s ease-in-out infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes rebond { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.15, 0.85); } 45% { transform: translateY(-34px) scale(0.95, 1.05) rotate(-8deg); } 75% { transform: translateY(0) scale(1.08, 0.92); } }
@keyframes scint { 0%, 100% { transform: scale(0.6) rotate(0); opacity: 0.4; } 50% { transform: scale(1.1) rotate(30deg); opacity: 1; } }
.lettre-pn .de { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 900; color: var(--encre-doux); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.lettre-pn .de::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--menthe); border: 2px solid var(--encre); animation: pouls 1.6s infinite; }
@keyframes pouls { 50% { transform: scale(1.4); } }
.lettre-pn p { font-family: var(--f-titre); font-weight: 600; font-size: 1.28rem; line-height: 1.3; letter-spacing: -0.02em; }
.lettre-pn .signe { margin-top: 12px; color: var(--encre-doux); font-weight: 800; }
.barre-atelier { height: 16px; border-radius: 99px; background: var(--creme-2); border: 2px solid var(--encre); overflow: hidden; margin-top: 16px; }
.barre-atelier i { display: block; height: 100%; width: 100%;
  background: repeating-linear-gradient(-45deg, var(--jaune) 0 12px, var(--tomate) 12px 24px); animation: rayures 1s linear infinite; background-size: 34px 100%; }
@keyframes rayures { to { background-position: 34px 0; } }

/* ---------- Modale ---------- */
.modale {
  position: fixed; left: 50%; top: 50%; z-index: 70; width: min(620px, 100% - 24px); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--creme); border: var(--trait); border-radius: 30px; padding: 26px; box-shadow: var(--ombre-dure-haute);
  transform: translate(-50%, -40%) scale(0.9) rotate(2deg); opacity: 0; pointer-events: none; transition: all 0.45s var(--ressort);
}
.modale.ouvert { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.modale h2 { font-family: var(--f-titre); font-size: 1.8rem; letter-spacing: -0.04em; margin-bottom: 6px; font-weight: 800; }
.modale .sous { color: var(--encre-doux); margin-bottom: 18px; }
.champ {
  width: 100%; padding: 15px 18px; border-radius: 18px; background: var(--blanc); border: var(--trait);
  outline: none; font-size: 1.05rem; font-weight: 800; box-shadow: 3px 3px 0 var(--encre); transition: box-shadow 0.2s, transform 0.2s;
}
.champ:focus { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--encre); }
textarea.champ { resize: vertical; min-height: 120px; line-height: 1.45; font-weight: 700; }
.choix-images { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.choix-images button { aspect-ratio: 1; border-radius: 16px; border: var(--trait); background: var(--blanc); display: grid; place-items: center; transition: transform 0.25s var(--ressort), background 0.2s; }
.choix-images button img { width: 70%; }
.choix-images button:hover { transform: scale(1.06) rotate(-3deg); }
.choix-images button.choisi { background: var(--jaune); box-shadow: 3px 3px 0 var(--encre); transform: rotate(-4deg); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; translate: -50% 0; padding: 12px 20px; border-radius: 999px;
  background: var(--encre); color: var(--blanc); font-weight: 900; box-shadow: 4px 4px 0 var(--jaune);
  animation: toast 3s var(--ressort) forwards; display: flex; gap: 10px; align-items: center; max-width: calc(100% - 24px);
}
.toast img { width: 26px; height: 26px; }
@keyframes toast { 0% { opacity: 0; transform: translateY(40px) scale(0.7) rotate(-6deg); } 12%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(20px) scale(0.9); } }

/* ---------- Divers ---------- */
.vide { text-align: center; padding: 50px 20px; color: var(--encre-doux); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vide img { width: 90px; animation: dandine 3s ease-in-out infinite; }
.vide .serif { font-family: var(--f-titre); font-weight: 800; font-size: 1.8rem; color: var(--encre); letter-spacing: -0.03em; }
.pied { padding: 60px 0 40px; color: var(--pale); font-size: 0.85rem; text-align: center; }
.pied a { color: var(--encre-doux); }
.cache { display: none !important; }
.bandeau-defile { border-block: var(--trait); background: var(--encre); color: var(--blanc); overflow: hidden; white-space: nowrap; transform: rotate(-1.2deg); margin: 18px -20px 30px; }
.bandeau-defile > div { display: inline-flex; gap: 28px; padding: 12px 28px 12px 0; animation: defile 45s linear infinite; align-items: center; }
.bandeau-defile span { margin-right: 18px; font-family: var(--f-titre); font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; display: inline-flex; gap: 12px; align-items: center; }
.bandeau-defile img { width: 34px; height: 34px; }
@keyframes defile { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.tiroir .corps > * { flex-shrink: 0; }
.lettre-pn p .degrade { margin-right: 0.15em; }

.lien-amazon { margin-top: 6px; align-self: flex-start; display: inline-flex; gap: 4px; align-items: center; font-size: 0.8rem; font-weight: 900;
  color: var(--encre-doux); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--creme-2); transition: all 0.2s var(--ressort); }
.lien-amazon:hover { color: var(--encre); border-color: var(--encre); background: var(--jaune); transform: rotate(-2deg); }
.lien-amazon svg { width: 12px; height: 12px; }
.ligne-voeu .t small a { color: var(--encre); font-weight: 900; }
#voeuLien { margin-bottom: 16px; font-size: 0.95rem; }
