@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --fond: #fff3df;
  --encre: #1f1236;
  --encre-douce: #5b4d73;
  --blanc: #ffffff;
  --rose: #d9226f;
  --jaune: #ffc933;
  --violet: #7a4dff;
  --menthe: #12c2a0;
  --orange: #ff7a3d;
  --ciel: #2db5ff;
  --pour: #0b7a5e;
  --contre: #cc2f27;
  --e1: 8px;
  --e2: 16px;
  --e3: 24px;
  --e4: 32px;
  --e5: 48px;
  --rayon: 20px;
  --trait: 2.5px solid var(--encre);
  --ombre: 4px 4px 0 var(--encre);
  --titres: "Bricolage", system-ui, sans-serif;
  --texte: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 500 1rem/1.5 var(--texte);
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.conteneur { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 var(--e2); position: relative; }
@media (min-width: 640px) { .conteneur { padding: 0 var(--e3); } }

#confettis { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.hero { position: relative; overflow: hidden; padding: var(--e5) 0 var(--e4); }
.formes { position: absolute; inset: 0; pointer-events: none; }
.forme { position: absolute; display: block; border: var(--trait); animation: flotte 7s ease-in-out infinite; }
.f1 { width: 64px; height: 64px; background: var(--jaune); border-radius: 50%; top: 16%; left: 6%; }
.f2 { width: 48px; height: 48px; background: var(--rose); border-radius: 12px; top: 10%; right: 9%; transform: rotate(14deg); animation-delay: -2s; }
.f3 { width: 40px; height: 40px; background: var(--menthe); border-radius: 50%; bottom: 14%; right: 14%; animation-delay: -4s; }
.f4 { width: 0; height: 0; border: 0; background: none; border-left: 26px solid transparent; border-right: 26px solid transparent; border-bottom: 46px solid var(--violet); bottom: 18%; left: 12%; animation-delay: -1s; filter: drop-shadow(2.5px 0 0 var(--encre)) drop-shadow(-2.5px 0 0 var(--encre)) drop-shadow(0 2.5px 0 var(--encre)); }
.f5 { width: 34px; height: 34px; background: var(--ciel); border-radius: 10px; top: 52%; right: 4%; transform: rotate(-12deg); animation-delay: -3s; }
@keyframes flotte {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -14px; rotate: 6deg; }
}
@media (max-width: 999px) { .f1, .f3, .f4, .f5 { display: none; } .f2 { top: 22px; right: 16px; } }
.hero .conteneur { z-index: 1; }

.badge-mdl {
  display: inline-block;
  background: var(--encre); color: var(--jaune);
  font: 800 .85rem/1 var(--titres); letter-spacing: .08em;
  padding: var(--e1) 14px; border-radius: 999px;
  margin-bottom: var(--e2);
  animation: arrive .6s cubic-bezier(.2, 1.4, .4, 1) both;
}
h1 {
  font: 800 clamp(2.4rem, 9vw, 4.2rem)/.98 var(--titres);
  letter-spacing: -.025em;
  animation: arrive .7s .08s cubic-bezier(.2, 1.4, .4, 1) both;
}
h1 .de { display: inline-block; background: var(--rose); color: var(--blanc); padding: 0 .22em .06em; border: var(--trait); border-radius: 14px; box-shadow: var(--ombre); transform: rotate(-1.5deg); margin-top: 6px; }
.accroche { margin-top: var(--e2); max-width: 34ch; font-size: 1.15rem; color: var(--encre-douce); font-weight: 600; animation: arrive .7s .18s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.carte { background: var(--blanc); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); padding: var(--e2); }
@media (min-width: 640px) { .carte { padding: var(--e3); } }
.composer { animation: arrive .7s .28s cubic-bezier(.2, 1.4, .4, 1) both; }

.champ-titre { position: relative; }
#titre {
  width: 100%; border: var(--trait); border-radius: 14px; background: var(--fond);
  padding: 16px 64px 16px var(--e2); font-size: 1.1rem; font-weight: 600;
  transition: box-shadow .15s, transform .15s, background .15s;
}
#titre:focus { outline: none; background: var(--blanc); box-shadow: 3px 3px 0 var(--violet); transform: translate(-1px, -1px); }
#titre::placeholder, textarea::placeholder, #pseudo::placeholder { color: #6f6286; font-weight: 500; }
.compteur { position: absolute; right: 14px; top: 50%; translate: 0 -50%; font-size: .78rem; font-weight: 700; color: #6f6286; pointer-events: none; }
.compteur.proche { color: var(--contre); }

.categories { border: 0; padding: 0; margin: var(--e2) 0 0; display: flex; flex-wrap: wrap; gap: var(--e1); min-width: 0; }
.puce input { position: absolute; opacity: 0; pointer-events: none; }
.puce span, .filtre {
  display: inline-block; padding: 10px 15px; min-height: 44px; border: var(--trait); border-radius: 999px;
  background: var(--blanc); font-weight: 700; font-size: .92rem; line-height: 1.2; cursor: pointer;
  transition: transform .15s cubic-bezier(.2, 1.6, .4, 1), background .15s, box-shadow .15s;
}
.puce span:hover, .filtre:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 2px 2px 0 var(--encre); }
.puce input:focus-visible + span, .filtre:focus-visible, .bouton:focus-visible, .lien:focus-visible, .segment button:focus-visible, .vote:focus-visible, .signaler:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.puce input:checked + span { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--encre); }
.c-animation input:checked + span, .filtre.c-animation.actif { background: var(--violet); color: var(--blanc); }
.c-concours input:checked + span, .filtre.c-concours.actif { background: var(--jaune); }
.c-sortie input:checked + span, .filtre.c-sortie.actif { background: var(--menthe); }
.c-soiree input:checked + span, .filtre.c-soiree.actif { background: var(--rose); color: var(--blanc); }
.c-sport input:checked + span, .filtre.c-sport.actif { background: var(--orange); }
.c-autre input:checked + span, .filtre.c-autre.actif { background: var(--ciel); }

.details { display: grid; gap: var(--e1); margin-top: var(--e2); animation: arrive .35s both; }
.details textarea, .details input { width: 100%; border: var(--trait); border-radius: 14px; background: var(--fond); padding: 14px var(--e2); font-weight: 500; resize: vertical; transition: box-shadow .15s, background .15s; }
.details textarea:focus, .details input:focus { outline: none; background: var(--blanc); box-shadow: 3px 3px 0 var(--violet); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.erreur { margin-top: var(--e2); padding: 12px var(--e2); border: var(--trait); border-radius: 14px; background: #ffe3e0; font-weight: 700; }
.erreur.secoue { animation: secoue .45s; }
@keyframes secoue { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.actions { display: flex; align-items: center; justify-content: space-between; gap: var(--e2); margin-top: var(--e2); }
.lien { background: none; border: 0; padding: var(--e1) 0; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; color: var(--violet); }
.lien:hover { color: var(--rose); }
.bouton {
  position: relative; border: var(--trait); border-radius: 14px; background: var(--rose); color: var(--blanc);
  font: 800 1.05rem/1 var(--titres); padding: 16px 28px; box-shadow: var(--ombre);
  transition: transform .15s cubic-bezier(.2, 1.6, .4, 1), box-shadow .15s, background .15s;
}
.bouton:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 var(--encre); background: #c41a62; }
.bouton:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--encre); }
.bouton[disabled] { opacity: .65; pointer-events: none; }
.bouton.ok { background: var(--menthe); color: var(--encre); }
@media (max-width: 460px) { .actions { flex-direction: column-reverse; align-items: stretch; } .bouton { width: 100%; } .lien { text-align: center; } }
.regle { margin-top: var(--e2); font-size: .85rem; color: var(--encre-douce); font-weight: 600; }

.liste { margin-top: var(--e5); }
.entete-liste { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--e2); }
.liste h2 { font: 800 1.7rem/1.1 var(--titres); letter-spacing: -.015em; }
.total { display: inline-block; vertical-align: middle; margin-left: 6px; min-width: 30px; text-align: center; font: 800 .9rem/1 var(--titres); background: var(--jaune); border: var(--trait); border-radius: 999px; padding: 6px 10px; }
.total:empty { display: none; }
.segment { display: inline-flex; border: var(--trait); border-radius: 999px; background: var(--blanc); padding: 3px; gap: 2px; }
.segment button { border: 0; background: none; border-radius: 999px; padding: 10px 14px; min-height: 44px; font-weight: 700; font-size: .9rem; transition: background .15s, color .15s; }
.segment button:hover { background: var(--fond); }
.segment button.actif { background: var(--encre); color: var(--blanc); }

.filtres { display: flex; flex-wrap: nowrap; gap: var(--e1); margin: var(--e2) calc(var(--e2) * -1) 0; padding: 4px var(--e2) 8px; overflow-x: auto; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .filtres { margin: var(--e2) 0 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; } }
.filtre { flex: 0 0 auto; padding: 10px 14px; min-height: 44px; font-size: .88rem; }
.filtre.actif { background: var(--encre); color: var(--blanc); }

.idees { list-style: none; margin: var(--e2) 0 0; padding: 0; display: grid; gap: var(--e2); }
.idee {
  position: relative; background: var(--blanc); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: var(--e2); display: grid; gap: 12px;
  animation: entre .5s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .18s cubic-bezier(.2, 1.5, .4, 1), box-shadow .18s;
}
@media (min-width: 640px) { .idee { padding: var(--e3); } }
.idee:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--encre); }
.idee.nouvelle { animation: nouvelle .8s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes entre { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nouvelle { 0% { opacity: 0; transform: translateY(-24px) scale(.94); background: var(--jaune); } 60% { background: var(--jaune); } 100% { opacity: 1; transform: none; background: var(--blanc); } }

.haut { display: flex; align-items: center; flex-wrap: wrap; gap: var(--e1); }
.etiquette { font-weight: 800; font-size: .8rem; padding: 5px 11px; border: var(--trait); border-radius: 999px; line-height: 1.2; }
.etiquette.animation { background: var(--violet); color: var(--blanc); }
.etiquette.concours { background: var(--jaune); }
.etiquette.sortie { background: var(--menthe); }
.etiquette.soiree { background: var(--rose); color: var(--blanc); }
.etiquette.sport { background: var(--orange); }
.etiquette.autre { background: var(--ciel); }
.statut { font-weight: 800; font-size: .8rem; padding: 5px 11px; border-radius: 999px; background: var(--encre); color: var(--jaune); line-height: 1.2; }
.statut.realisee { color: #8cf5dc; }
.statut.refusee { color: #ffb4ae; }
.meta { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--encre-douce); }
.idee h3 { font: 700 1.25rem/1.25 var(--titres); letter-spacing: -.01em; overflow-wrap: anywhere; }
.desc { color: var(--encre-douce); font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }

.bas { display: flex; align-items: center; gap: var(--e1); flex-wrap: wrap; }
.vote {
  min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: var(--trait); border-radius: 14px; background: var(--blanc);
  font-weight: 800; transition: transform .15s cubic-bezier(.2, 1.7, .4, 1), background .15s, box-shadow .15s;
}
.vote svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 460px) { .vote { padding: 9px 12px; gap: 6px; font-size: .95rem; } .bas { gap: 6px; } .signaler { padding: 8px 4px; } }
.vote:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 3px 3px 0 var(--encre); }
.vote:active { transform: scale(.94); }
.vote.pour.actif { background: var(--pour); color: var(--blanc); }
.vote.contre.actif { background: var(--contre); color: var(--blanc); }
.vote.pop { animation: pop .45s cubic-bezier(.2, 2, .4, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22) rotate(-4deg); } 100% { transform: scale(1); } }
.nombre { display: inline-block; min-width: 1ch; font-variant-numeric: tabular-nums; }
.nombre.saute { animation: saute .35s; }
@keyframes saute { 0% { transform: translateY(0); } 40% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
.signaler { margin-left: auto; border: 0; background: none; padding: 12px 8px; min-height: 44px; font-size: .8rem; font-weight: 700; color: var(--encre-douce); border-radius: 8px; }
.signaler:hover { color: var(--contre); background: #ffe3e0; }
.signaler.fait { color: var(--pour); pointer-events: none; }

.vide { margin-top: var(--e3); padding: var(--e4) var(--e2); text-align: center; border: 2.5px dashed var(--encre); border-radius: var(--rayon); font-weight: 700; }
.chargement { text-align: center; font-weight: 700; color: var(--encre-douce); padding: var(--e3); }

.pied { margin-top: var(--e5); padding: var(--e4) 0 calc(var(--e4) + env(safe-area-inset-bottom)); border-top: var(--trait); background: var(--blanc); font-size: .85rem; font-weight: 600; color: var(--encre-douce); }
.pied .conteneur { display: grid; gap: var(--e1); }
.pied a { font-weight: 800; color: var(--encre); }

.admin-ligne { display: grid; gap: var(--e1); }
.admin-actions { display: flex; flex-wrap: wrap; gap: var(--e1); }
.mini { border: var(--trait); border-radius: 12px; background: var(--blanc); padding: 8px 12px; font-weight: 800; font-size: .85rem; transition: transform .15s cubic-bezier(.2, 1.6, .4, 1), box-shadow .15s; }
.mini:hover { transform: translateY(-2px); box-shadow: 2px 2px 0 var(--encre); }
.mini.danger { background: #ffe3e0; }
.mini.bon { background: #d7f7ee; }
.mini select { font: inherit; border: 0; background: none; }
.pastille-signal { font-weight: 800; font-size: .8rem; padding: 5px 11px; border-radius: 999px; background: var(--contre); color: var(--blanc); }
.pastille-masque { font-weight: 800; font-size: .8rem; padding: 5px 11px; border-radius: 999px; background: var(--encre); color: var(--blanc); }
.idee.est-masquee { background: #f3edf7; }
.connexion { max-width: 420px; margin: var(--e5) auto 0; display: grid; gap: var(--e2); }
.connexion h1 { font-size: 2rem; }
.connexion label { font-weight: 800; display: grid; gap: 6px; }
.connexion input { border: var(--trait); border-radius: 14px; background: var(--fond); padding: 14px var(--e2); }
.connexion input:focus { outline: none; background: var(--blanc); box-shadow: 3px 3px 0 var(--violet); }
.barre-admin { display: flex; align-items: center; justify-content: space-between; gap: var(--e2); flex-wrap: wrap; padding-top: var(--e4); }
.barre-admin h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
