/* party.flemm.eu — façon « party planner », version réveillon gastro.
   Noir profond, volutes violet/rose, cartes sombres arrondies, accent
   citron-champagne, bouton en dégradé ; la carte du menu en or sur nuit.
   Thème sombre seulement : c'est une soirée. */

[hidden] { display: none !important; }

:root {
  --fond: #07060b;
  --carte: #121019;
  --carte-2: #1a1724;
  --bord: rgba(255, 255, 255, .08);
  --bord-fort: rgba(255, 255, 255, .16);
  --texte: #f5f3fa;
  --doux: #a9a3b8;
  --discret: #6f6981;
  --accent: #e8f56b;          /* citron-champagne */
  --accent-encre: #15140c;
  --rose: #ff4f9a;
  --violet: #8b5cf6;
  --degrade: linear-gradient(90deg, var(--rose), var(--violet));
  --or: #e7c77f;
  --or-doux: #b9a06a;
  --ok: #7ee2a8;
  --manque: #ffb86b;
  --danger: #ff6b81;
  --r: 22px;
  --r-petit: 14px;
  --serif: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
button, input, select { font: inherit; color: inherit; }

/* ------------------------------------------------------------ volutes */
.volutes { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.volutes span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: derive 26s ease-in-out infinite alternate;
}
.volutes span:nth-child(1) { width: 70vmax; height: 34vmax; left: -25vmax; top: -8vmax;
  background: radial-gradient(closest-side, #6d28d9, transparent); transform: rotate(-24deg); }
.volutes span:nth-child(2) { width: 60vmax; height: 26vmax; right: -24vmax; top: 30vh;
  background: radial-gradient(closest-side, #be185d, transparent); transform: rotate(18deg); animation-delay: -9s; }
.volutes span:nth-child(3) { width: 64vmax; height: 30vmax; left: -10vmax; bottom: -16vmax;
  background: radial-gradient(closest-side, #4c1d95, transparent); transform: rotate(12deg); animation-delay: -17s; }
@keyframes derive {
  from { translate: 0 0; }
  to   { translate: 6vmax 4vmax; }
}
@media (prefers-reduced-motion: reduce) { .volutes span { animation: none; } }

/* ------------------------------------------------------------ page */
.page { max-width: 1120px; margin: 0 auto; padding: 0 16px 40px; }

.toast {
  position: fixed; left: 50%; top: 14px; translate: -50% 0; z-index: 10;
  max-width: calc(100% - 32px);
  background: var(--accent); color: var(--accent-encre);
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  animation: toast 4.5s ease forwards;
}
.toast-erreur { background: var(--danger); color: #fff; }
@keyframes toast {
  0% { opacity: 0; translate: -50% -20px; }
  8%, 85% { opacity: 1; translate: -50% 0; }
  100% { opacity: 0; translate: -50% -20px; visibility: hidden; }
}

/* ------------------------------------------------------------ affiche */
.affiche { padding: 44px 0 28px; }
.surtitre {
  margin: 0 0 10px; color: var(--accent); font-weight: 700; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase;
}
.affiche h1 { font-size: clamp(38px, 9vw, 64px); font-weight: 800; letter-spacing: -.02em; }
/* La boule à facettes. Un emoji ne peut que tourner dans le plan de
   l'écran (rotate), ce qui est faux : une boule tourne autour de son axe
   VERTICAL. Elle est donc dessinée en CSS — une grille de facettes
   colorées qui défile horizontalement derrière un ombrage sphérique, ce
   qui donne l'illusion de la rotation. Les tailles des motifs (0,1 / 0,2 /
   0,8 em) se divisent toutes dans 0,8 em : le défilement boucle sans saut. */
.boule-cadre { position: relative; display: inline-block; vertical-align: -.06em; margin-left: .12em; }
.boule {
  position: relative; display: block; width: .8em; height: .8em; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 .18em rgba(255, 79, 154, .55), 0 0 .45em rgba(139, 92, 246, .45), 0 0 .8em rgba(94, 231, 255, .2);
}
.boule-facettes {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 6, 20, .7) .012em, transparent .012em) 0 0 / .1em .1em,
    linear-gradient(0deg, rgba(10, 6, 20, .7) .012em, transparent .012em) 0 0 / .1em .1em,
    conic-gradient(rgba(255, 255, 255, .55) 25%, transparent 0 50%, rgba(255, 255, 255, .55) 0 75%, transparent 0) 0 0 / .2em .2em,
    linear-gradient(90deg, #ff4f9a, #ffb86b, #e8f56b, #5ee7ff, #8b5cf6, #ff4f9a) 0 0 / .8em 100%;
  animation: facettes 3.2s linear infinite;
}
.boule-reflets {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0 5%, rgba(255, 255, 255, .35) 14%, transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(7, 6, 11, .55) 66%, rgba(7, 6, 11, .9) 74%);
}
@keyframes facettes {
  to { background-position: .8em 0, .8em 0, .8em 0, .8em 0; }
}
/* Deux éclats qui scintillent autour. */
.boule-cadre::before, .boule-cadre::after {
  content: "✦"; position: absolute; font-size: .28em; line-height: 1;
  animation: eclat 2.4s ease-in-out infinite;
}
.boule-cadre::before { top: -.25em; right: -.45em; color: var(--accent); }
.boule-cadre::after { bottom: .1em; left: -.55em; color: #5ee7ff; font-size: .2em; animation-delay: -1.2s; }
@keyframes eclat {
  0%, 100% { opacity: .15; transform: scale(.6) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .boule-facettes, .boule-cadre::before, .boule-cadre::after { animation: none; }
}
.accroche { color: var(--doux); font-size: 18px; margin: 10px 0 26px; max-width: 34em; }

.rebours {
  display: inline-grid; grid-template-columns: repeat(4, minmax(64px, 1fr)); gap: 6px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--bord-fort);
  border-radius: var(--r); padding: 6px;
}
.rebours div { background: var(--carte); border-radius: var(--r-petit); padding: 10px 8px 8px; text-align: center; }
.rebours strong { display: block; font-size: 30px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.rebours span { font-size: 12px; color: var(--doux); text-transform: uppercase; letter-spacing: .08em; }
.bonne-annee { margin: 0; padding: 12px 20px; font-weight: 800; font-size: 22px; color: var(--accent); }

.chiffres { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 560px; }
.chiffres li {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r-petit); padding: 12px 14px;
}
.ch-emoji { grid-row: span 2; font-size: 30px; }
.chiffres strong { font-size: 26px; font-weight: 800; line-height: 1; }
.chiffres span:last-child { font-size: 13px; color: var(--doux); }

/* ------------------------------------------------------------ cartes */
.grille { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .grille { grid-template-columns: 1fr 1fr; align-items: start; }
  .tablee { grid-column: 1; }
  .apporter { grid-column: 2; grid-row: span 2; }
  .plan { grid-column: 1; }
}

.carte {
  background: linear-gradient(180deg, var(--carte-2), var(--carte));
  border: 1px solid var(--bord); border-radius: var(--r);
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.carte h2 { font-size: 22px; font-weight: 700; }
.sous { margin: 3px 0 0; color: var(--doux); font-size: 14px; }
.vide { color: var(--doux); margin: 4px 0 0; }
.vide.petit { font-size: 14px; }
.discret { color: var(--discret); }

/* ------------------------------------------------------------ avatars */
.avatars { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 10px; }
.avatars a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; width: 64px; }
.avatar {
  --a: #8b5cf6; --b: #ff4f9a;
  display: inline-grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .02em;
  box-shadow: 0 0 0 3px var(--carte), 0 0 0 4px var(--bord-fort);
}
.avatar.grand { width: 58px; height: 58px; font-size: 19px; }
.avatar.moi { box-shadow: 0 0 0 3px var(--carte), 0 0 0 5px var(--accent); }
.t0 { --a: #8b5cf6; --b: #ff4f9a; }
.t1 { --a: #f59e0b; --b: #ef4444; }
.t2 { --a: #06b6d4; --b: #6366f1; }
.t3 { --a: #22c55e; --b: #0ea5e9; }
.t4 { --a: #ec4899; --b: #f97316; }
.t5 { --a: #a855f7; --b: #06b6d4; }
.t6 { --a: #eab308; --b: #84cc16; color: #1a1a0a; }
.t7 { --a: #f43f5e; --b: #a855f7; }
.avatar-nom { font-size: 12px; color: var(--doux); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-nom small { color: var(--accent); }

/* ------------------------------------------------------------ dépliables */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

.ajout-invite > summary {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 700;
}
.ajout-invite[open] > summary { margin-bottom: 14px; }
/* Le « + » est dessiné par deux barres, pas par le caractère : un glyphe
   « + » repose sur la ligne de base de la police et tombe sous le centre
   du rond, quel que soit le line-height. */
.plus {
  position: relative; display: inline-block; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid currentColor; font-size: 0;
}
.plus::before, .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 2px;
  width: 12px; height: 2px; translate: -50% -50%;
}
.plus::after { width: 2px; height: 12px; }

/* ------------------------------------------------------------ formulaires */
.champ { display: flex; flex-direction: column; gap: 7px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.champ > span, .champ > legend, .etiquette { font-size: 14px; font-weight: 600; color: var(--doux); padding: 0; }
input[type="text"], input[type="number"], select {
  width: 100%; min-height: 50px; padding: 12px 16px;
  background: #0b0a10; border: 1px solid var(--bord-fort); border-radius: var(--r-petit);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus-visible, select:focus-visible {
  border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .3);
}
input::placeholder { color: var(--discret); }
select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--doux) 50%), linear-gradient(135deg, var(--doux) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

.form-ligne { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.form-ligne .champ-large { flex: 1 1 200px; }
.form-ligne .champ-court { flex: 0 0 150px; }
.form-ligne .btn-degrade { margin-bottom: 16px; }

/* Les tuiles de catégorie : radios déguisés, comme les verres de la maquette. */
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .tuiles { grid-template-columns: repeat(6, 1fr); } }
.apporter .tuiles { grid-template-columns: repeat(3, 1fr); }
.tuile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px 10px; border-radius: var(--r-petit); cursor: pointer;
  background: #0b0a10; border: 1.5px solid var(--bord-fort);
  transition: border-color .15s, background .15s, transform .15s;
}
.tuile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tuile-emoji { font-size: 30px; line-height: 1.1; transition: transform .2s; }
.tuile-nom { font-size: 13px; font-weight: 600; }
.tuile:hover { border-color: rgba(232, 245, 107, .5); }
.tuile:has(input:checked) { border-color: var(--accent); background: rgba(232, 245, 107, .08); }
.tuile:has(input:checked) .tuile-emoji { transform: scale(1.15) rotate(-6deg); }
.tuile:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(232, 245, 107, .35); }

/* Quantité : − 12 + , comme le sélecteur de la maquette. */
.qte-ligne { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.stepper {
  display: grid; grid-template-columns: 1fr; align-items: center;
  background: #0b0a10; border: 1px solid var(--bord-fort); border-radius: var(--r-petit); padding: 4px;
}
.stepper input { border: 0; background: transparent; text-align: center; min-height: 40px; padding: 6px; font-weight: 800; font-size: 20px; color: var(--accent); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible { box-shadow: none; }
.stepper .pas { display: none; }
.js .stepper { grid-template-columns: 44px 1fr 44px; }
.js .stepper .pas {
  display: grid; place-items: center; height: 40px; border-radius: 11px;
  background: var(--carte-2); border: 1px solid var(--bord); cursor: pointer; font-size: 20px; line-height: 1;
}
.js .stepper .pas:hover { border-color: var(--bord-fort); }

/* ------------------------------------------------------------ boutons */
.btn-degrade {
  appearance: none; border: 0; cursor: pointer;
  background: var(--degrade); color: #fff; font-weight: 700;
  min-height: 50px; padding: 12px 24px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(255, 79, 154, .25);
  transition: transform .15s, filter .15s;
}
.btn-degrade:hover { filter: brightness(1.08); }
.btn-degrade:active { transform: scale(.98); }
.btn-plein { width: 100%; font-size: 17px; min-height: 56px; }
.btn-pastille {
  appearance: none; display: inline-flex; align-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--bord-fort); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--texte);
}
.btn-pastille:hover { border-color: var(--accent); color: var(--accent); }
.btn-lien { appearance: none; background: none; border: 0; padding: 4px 0; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: var(--danger); }
.btn-danger { appearance: none; border: 0; cursor: pointer; background: var(--danger); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 999px; }

.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------ le plan */
.cave-chiffres {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 10px;
}
.cave-chiffres li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.cave-emoji { grid-row: span 2; font-size: 38px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.cave-chiffres strong { font-size: 26px; font-weight: 800; line-height: 1; }
.cave-chiffres span:last-child { font-size: 13px; color: var(--doux); line-height: 1.2; }

.jauges { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.jauge { display: grid; grid-template-columns: 36px 1fr; gap: 4px 12px; align-items: center; }
.j-emoji { font-size: 26px; text-align: center; grid-row: span 2; }
.j-ligne { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.j-txt { color: var(--doux); font-size: 13px; text-align: right; }
.j-etat { grid-column: 2; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.jauge.ok .j-etat { color: var(--ok); }
.jauge.manque .j-etat { color: var(--manque); }

progress {
  appearance: none; -webkit-appearance: none; display: block;
  width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden;
  background: #24202f;
}
progress::-webkit-progress-bar { background: #24202f; border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #e8f56b, #ff4f9a 60%, #8b5cf6); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #e8f56b, #ff4f9a 60%, #8b5cf6); border-radius: 999px; }
.jauge.ok progress::-webkit-progress-value { background: linear-gradient(90deg, #e8f56b, #7ee2a8); }
.jauge.ok progress::-moz-progress-bar { background: linear-gradient(90deg, #e8f56b, #7ee2a8); }

/* ------------------------------------------------------------ le menu */
.menu { margin: 40px auto; max-width: 640px; }
.menu-papier {
  position: relative; text-align: center;
  padding: 54px 28px 46px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(231, 199, 127, .10), transparent 60%),
    linear-gradient(180deg, #14111b, #0d0b12);
  border-radius: 6px;
  color: var(--or);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
/* Double filet doré, comme une carte de restaurant. */
.menu-papier::before, .menu-papier::after {
  content: ""; position: absolute; pointer-events: none; border: 1px solid rgba(231, 199, 127, .45);
}
.menu-papier::before { inset: 12px; }
.menu-papier::after { inset: 17px; border-color: rgba(231, 199, 127, .2); }

.menu-sur { margin: 0; font: italic 400 20px/1.2 var(--serif); color: var(--or-doux); }
.menu h2 { font: 500 clamp(52px, 13vw, 76px)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 8px; padding-left: .12em; }
.menu-date { margin: 0; font-size: 13px; letter-spacing: .4em; color: var(--or-doux); }

.filet { display: flex; align-items: center; gap: 14px; margin: 28px auto; max-width: 260px; color: var(--or-doux); font-size: 12px; }
.filet::before, .filet::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(231, 199, 127, .6), transparent); }

.menu-section { margin: 0 0 30px; }
.menu-section h3 {
  font: 600 12px/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--or-doux);
  margin-bottom: 14px;
}
.menu-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mets { display: block; font: italic 500 clamp(20px, 5vw, 24px)/1.25 var(--serif); color: #f3e3bb; }
.par { display: block; font-size: 12px; letter-spacing: .06em; color: var(--discret); margin-top: 3px; }
.par a { color: var(--or-doux); text-decoration: none; border-bottom: 1px dotted rgba(231, 199, 127, .4); }
.par a:hover { color: var(--or); }
.menu-edit {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 8px; vertical-align: .1em;
  border-radius: 50%; color: var(--or-doux); border: 1px solid rgba(231, 199, 127, .3); opacity: .7;
  transition: opacity .15s, color .15s, border-color .15s;
}
.menu-edit .ico { width: 13px; height: 13px; }
.menu-edit:hover, .menu-edit:focus-visible { opacity: 1; color: var(--or); border-color: var(--or); }
.a-composer { margin: 0; font: italic 400 17px var(--serif); color: #5d5566; }
.menu-fin { margin: 0; font: italic 400 22px var(--serif); color: var(--or); }

/* ------------------------------------------------------------ qui apporte quoi */
.titre-section { font-size: 26px; font-weight: 800; margin: 0 0 16px; }
.invites-grille { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .invites-grille { grid-template-columns: repeat(2, 1fr); align-items: start; } }
@media (min-width: 1060px) { .invites-grille { grid-template-columns: repeat(3, 1fr); } }

.invite { padding: 18px; scroll-margin-top: 16px; }
.invite.est-moi { border-color: rgba(232, 245, 107, .45); }
.invite:target { border-color: var(--rose); }
.invite-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.invite h3 { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.badge { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-encre); padding: 2px 8px; border-radius: 999px; margin-left: 4px; }

.apports { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.apports > li { background: #0b0a10; border: 1px solid var(--bord); border-radius: var(--r-petit); padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.apport { display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: 0; }
.a-emoji { font-size: 24px; }
.a-quoi { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.a-quoi small { display: block; font-weight: 400; color: var(--doux); font-size: 13px; }

/* Modifier / supprimer : des <details> en display: contents, pour que leurs
   boutons restent sur la ligne de l'apport (ou du pied de carte) et que le
   formulaire ouvert passe dessous, sur toute la largeur (order: 1). */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.replie { display: contents; }
.replie > summary { order: 0; }
.replie > form { order: 1; flex: 1 0 100%; }
/* Les navigateurs récents enveloppent le contenu d'un <details> dans une
   boîte ::details-content : c'est ELLE qui devient l'élément flex, pas le
   formulaire — sans cette règle, le bouton suivant tombait sous le
   formulaire ouvert. */
.replie::details-content { order: 1; flex: 1 0 100%; }
.btn-icone {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--texte); background: var(--carte-2); border: 1px solid var(--bord-fort);
  transition: color .15s, border-color .15s, background .15s;
}
.btn-icone:hover, .replie[open] > .btn-icone { color: var(--accent); border-color: var(--accent); }
.btn-icone.danger { color: var(--danger); }
.btn-icone.danger:hover, .replie[open] > .btn-icone.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn-pastille { gap: 6px; }
.btn-pastille .ico { width: 15px; height: 15px; }
.btn-pastille.danger { color: var(--danger); }
.btn-pastille.danger:hover, .replie[open] > .btn-pastille.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.replie[open] > .btn-pastille:not(.danger) { color: var(--accent); border-color: var(--accent); }

.compact { margin-top: 12px; }
.compact .tuile { padding: 8px 2px 6px; }
.compact .tuile-emoji { font-size: 22px; }
.compact .tuile-nom { font-size: 11px; }
.compact .tuiles { margin-bottom: 12px; }
.compact .qte-ligne { margin-bottom: 12px; }
.compact .champ { margin-bottom: 12px; }
.confirme {
  margin-top: 10px; padding: 12px 14px; border-radius: var(--r-petit);
  background: rgba(255, 107, 129, .08); border: 1px solid rgba(255, 107, 129, .35);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.confirme p { margin: 0; font-size: 14px; color: var(--texte); }

.apports > li:target { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 245, 107, .2); }
.apports > li { scroll-margin-top: 80px; }

.invite-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ------------------------------------------------------------ pied */
.pied { text-align: center; padding: 10px 16px 40px; color: var(--or-doux); font: italic 400 16px var(--serif); }
.pied p { margin: 4px 0; }
.pied .discret { font: 400 13px var(--sans); }

/* ------------------------------------------------------------ mobile */
@media (max-width: 560px) {
  .affiche { padding-top: 28px; }
  .accroche { font-size: 16px; }
  .rebours { display: grid; grid-template-columns: repeat(4, 1fr); }
  .rebours strong { font-size: 24px; }
  .rebours span { font-size: 10px; }
  .chiffres { gap: 8px; }
  .chiffres li { grid-template-columns: 1fr; text-align: center; padding: 12px 6px; justify-items: center; }
  .ch-emoji { grid-row: auto; font-size: 24px; }
  .chiffres strong { font-size: 22px; }
  .chiffres span:last-child { font-size: 11px; }
  .carte { padding: 18px 16px; border-radius: 20px; }
  .form-ligne .champ-court { flex: 1 1 140px; }
  .form-ligne .btn-degrade { width: 100%; }
  .menu { margin: 32px -4px; }
  .menu-papier { padding: 46px 22px 40px; }
}

/* ------------------------------------------------------------ la playlist */
.playlist { margin: 0 0 40px; }
.playlist-grille { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .playlist-grille { grid-template-columns: 1fr 1fr; align-items: start; } }
input[type="search"] {
  width: 100%; min-height: 50px; padding: 12px 16px;
  background: #0b0a10; border: 1px solid var(--bord-fort); border-radius: var(--r-petit); outline: none;
}
input[type="search"]:focus-visible { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .3); }
.form-recherche { margin-bottom: 14px; }

.pistes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.piste {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #0b0a10; border: 1px solid var(--bord); border-radius: var(--r-petit); padding: 8px 10px 8px 8px;
}
.resultats .piste { border-color: rgba(139, 92, 246, .35); }
.pochette { width: 48px; height: 48px; border-radius: 8px; flex: none; object-fit: cover; background: var(--carte-2); }
.pochette-vide { display: grid; place-items: center; font-size: 24px; }
.p-txt { flex: 1 1 0; min-width: 0; }
.p-txt strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-txt small { display: block; color: var(--doux); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-ajout { appearance: none; cursor: pointer; padding: 0; background: var(--degrade); border: 0; color: #fff; }
.btn-ajout:hover { filter: brightness(1.1); color: #fff; }
.deja { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ok); font-weight: 800; }
.lecteur { display: block; width: 100%; height: 352px; border: 0; border-radius: 14px; background: var(--carte-2); }
.alerte { color: var(--danger); font-weight: 600; }

/* ------------------------------------------------------------ organisateur */
.barre-orga {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; padding: 8px 16px;
  background: rgba(232, 245, 107, .1); border-bottom: 1px solid rgba(232, 245, 107, .3);
  font-size: 14px; font-weight: 600; color: var(--accent);
}
.barre-orga a { color: var(--texte); }
.page-etroite { max-width: 720px; }
.affiche-courte { padding-bottom: 18px; }
.affiche-courte h1 { font-size: clamp(32px, 7vw, 46px); }
.surtitre a { color: inherit; text-decoration: none; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.etape h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.etape p { margin: 0 0 12px; }
.pastille-etape {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--bord-fort); font-size: 15px; color: var(--doux);
}
.etape.faite .pastille-etape { background: var(--ok); border-color: var(--ok); color: #0b1a12; }
.consignes { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--doux); }
code { font-size: 13px; background: #0b0a10; border: 1px solid var(--bord); border-radius: 6px; padding: 1px 6px; color: var(--accent); overflow-wrap: anywhere; }
.rangee { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rangee form { margin: 0; }
.btn-spotify { display: inline-flex; align-items: center; text-decoration: none; background: linear-gradient(90deg, #1ed760, #1db954); box-shadow: 0 10px 30px rgba(30, 215, 96, .25); color: #08140c; }
a.btn-degrade { display: inline-flex; align-items: center; text-decoration: none; }
.ou { text-align: center; color: var(--discret); margin: 10px 0; }
.petit-mot { font-size: 13px; margin-top: 10px; }

/* ------------------------------------------------------------ carte « La playlist » de l'accueil */
.carte-lien { display: flex; align-items: center; gap: 16px; text-decoration: none; margin: 16px 0 0; transition: border-color .15s, transform .15s; }
.carte-lien:hover { border-color: rgba(255, 79, 154, .5); transform: translateY(-1px); }
.pt-emoji { font-size: 36px; }
.pt-txt { flex: 1; min-width: 0; }
.pt-txt strong { display: block; font-size: 20px; }
.pt-txt small { display: block; color: var(--doux); font-size: 14px; }
.pt-fleche { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--degrade); color: #fff; font-size: 20px; flex: none; }
.playlist-grille .carte h2 { margin-bottom: 14px; }
.affiche-courte .btn-pastille { text-decoration: none; }
