/* ================= Mirage : tokens ================= */
:root {
  --rouge: #FF3B30;
  --rouge-fonce: #D92B22;
  --jaune: #FFC21A;
  --orange: #FF7A1A;
  --violet: #7B5CFF;
  --menthe: #2ED9A3;
  --rose: #FF8AC4;
  --encre: #1B1020;
  --encre-2: #6B6170;
  --gris: #F4F2F5;
  --gris-2: #E8E4EA;
  --blanc: #FFFFFF;

  --display: 'Unbounded', 'Arial Black', sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-xl: 36px;
  --r-l: 28px;
  --r-m: 20px;
  --r-s: 12px;
  --page: 1240px;
  --ombre: 0 18px 40px -18px rgba(27, 16, 32, .28);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--blanc); color: var(--encre);
  font-family: var(--body); font-size: 16px; line-height: 1.55; font-weight: 500;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--encre); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 10px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.loading { padding: 120px 20px; text-align: center; color: var(--encre-2); font-weight: 700; }

/* ================= Barre du haut (pilule comme la référence) ================= */
.topbar { position: sticky; top: 0; z-index: 30; padding: 14px clamp(12px, 3vw, 28px) 0; }
.topbar-inner {
  max-width: var(--page); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(244, 242, 245, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 999px; padding: 8px 8px 8px 10px;
}
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.logo-face { width: 44px; height: 32px; border-radius: 999px; background: var(--rouge); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.logo-face i { width: 7px; height: 9px; background: #fff; border-radius: 50%; display: block; }
.logo-word { font-family: var(--display); font-weight: 900; font-size: 15px; background: var(--jaune); border-radius: 999px; padding: 6px 13px; line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a:not(.btn), .nav .linkish { text-decoration: none; padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; background: none; border: 0; }
/* Survol seulement avec une souris : sur téléphone, le « survol » restait collé après un toucher
   et rendait l'onglet actif blanc sur blanc */
.nav a[aria-current="page"] { background: var(--encre); color: #fff; }
@media (hover: hover) {
  .nav a:not(.btn):hover, .nav a[aria-current="page"]:hover, .nav .linkish:hover { background: var(--blanc); color: var(--encre); }
}
.nav .who { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; padding: 0 6px; }

/* ================= Boutons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; border: 0;
  font-weight: 800; font-size: 15px; line-height: 1.1; text-decoration: none;
  background: var(--gris); color: var(--encre);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-rouge { background: var(--rouge); color: #fff; }
.btn-rouge:hover { background: var(--rouge-fonce); }
.btn-jaune { background: var(--jaune); }
.btn-encre { background: var(--encre); color: #fff; }
.btn-blanc { background: #fff; }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn-danger { background: #FFE4E2; color: var(--rouge-fonce); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
/* Bouton « pilule + rond flèche » de la référence */
.btn-arrow { padding: 6px 6px 6px 24px; gap: 18px; }
.btn-arrow .arrow { width: 40px; height: 40px; border-radius: 50%; background: var(--rouge); color: #fff; display: grid; place-items: center; flex: none; transition: transform .2s ease; }
.btn-arrow:hover .arrow { transform: rotate(45deg); }
.btn-arrow .arrow svg { width: 16px; height: 16px; }
.btn-rouge.btn-arrow .arrow { background: #fff; color: var(--rouge); }

/* ================= Hero ================= */
.hero { --hero-pb: clamp(40px, 6vw, 80px); padding-top: clamp(36px, 6vw, 72px); padding-bottom: var(--hero-pb); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(36px, 5.2vw, 66px); max-width: 13ch; }
.hero h1 .hl { display: inline-block; background: var(--jaune); border-radius: 18px; padding: 0 .22em; transform: rotate(-2deg); margin: .06em 0; }
.hero-text p { margin-top: 18px; font-size: 18px; color: var(--encre-2); max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-art { position: relative; min-height: 480px; align-self: stretch; }
.hero-swoosh { position: absolute; left: -22%; top: -6%; width: 132%; height: 112%; pointer-events: none; }
/* Photo détourée : posée sur le bas du hero, son fondu rejoint la section suivante */
.hero-sujet { position: absolute; left: 6%; right: 0; top: 0; bottom: calc(-1 * var(--hero-pb)); z-index: 1; pointer-events: none; }
.hero-sujet img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
/* Billet électronique : un vrai talon, encoches et pointillés, ombre pleine rouge */
.hero-ticket { position: absolute; left: 0; bottom: 16%; z-index: 3; display: flex; color: #fff; transform: rotate(-5deg); filter: drop-shadow(6px 6px 0 var(--rouge)); }
.ht-main, .ht-stub { background: var(--encre); }
.ht-main {
  padding: 14px 20px 14px 16px; border-radius: 16px 0 0 16px;
  -webkit-mask: radial-gradient(circle 9px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 9px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ht-main b { display: block; font-family: var(--display); font-weight: 700; font-size: 16px; margin-top: 10px; line-height: 1.15; }
.ht-main small { display: block; font-size: 12.5px; font-weight: 700; color: var(--jaune); margin-top: 3px; }
.ht-stub {
  display: grid; place-items: center; padding: 12px 14px; border-left: 2px dashed rgba(255, 255, 255, .4); border-radius: 0 16px 16px 0;
  -webkit-mask: radial-gradient(circle 9px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 9px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ht-stub svg { width: 62px; height: 62px; display: block; }
.hero-mascot { position: absolute; right: -2%; bottom: -4%; width: 150px; z-index: 4; filter: drop-shadow(0 14px 16px rgba(27, 16, 32, .25)); }
@keyframes bob { 50% { transform: translateY(-10px) rotate(4deg); } }

/* ================= Panneau des catégories (trombones) ================= */
.cats {
  background: var(--rouge); color: #fff; border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 48px) clamp(40px, 5vw, 64px);
  position: relative; overflow: hidden;
}
/* Anneau jaune : reste dans la marge du bas, sous la dernière rangée de cartes */
.cats::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 194, 26, .9); right: -110px; bottom: -200px; }
.cats-head { position: relative; display: flex; justify-content: space-between; gap: 20px; align-items: end; flex-wrap: wrap; }
.cats h2 { font-size: clamp(28px, 3.6vw, 44px); max-width: 14ch; }
.cats-head p { max-width: 34ch; font-weight: 600; opacity: .92; }
.cats-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 46px 16px; margin-top: 60px; }
.cat-card {
  position: relative; border: 0; text-align: left; background: #fff; color: var(--encre);
  border-radius: var(--r-l); padding: 20px 18px 16px; min-height: 178px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .2s ease;
}
.cat-card:nth-child(5n+2) { transform: translateY(26px) rotate(1.5deg); }
.cat-card:nth-child(5n+3) { transform: translateY(-14px) rotate(-1.5deg); }
.cat-card:nth-child(5n+4) { transform: translateY(12px) rotate(1deg); }
.cat-card:nth-child(5n+5) { transform: translateY(-6px) rotate(-1deg); }
.cat-card:hover { transform: translateY(-6px) rotate(0); }
.cat-card[aria-pressed="true"] { background: var(--jaune); }
/* Titre dans le coin, sans fond : même style pour toutes les catégories */
.cat-card b { position: relative; z-index: 2; align-self: flex-start; background: none; padding: 2px 0 3px; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.15; white-space: nowrap; }
.cat-card .count { position: relative; z-index: 2; max-width: 62%; line-height: 1.2; }
/* Photo détourée dans le coin droit : elle dépasse au-dessus de la carte */
.cat-photo {
  position: absolute; right: 6px; bottom: 0; z-index: 1; height: calc(100% + 44px); width: auto; max-width: 66%;
  object-fit: contain; object-position: right bottom; pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(27, 16, 32, .18)); transition: transform .25s ease; transform-origin: bottom right;
}
.cat-card:hover .cat-photo { transform: scale(1.04); }
.clip { position: absolute; top: -20px; left: -6px; width: 22px; height: 56px; transform: rotate(-12deg); z-index: 3; }
.count { display: inline-flex; align-self: flex-start; background: var(--encre); color: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 800; }

/* ================= Section sorties ================= */
.section { padding: clamp(48px, 7vw, 90px) 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); }
.plus-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; background: none; border: 0; padding: 0; text-decoration: none; }
.plus-link span { width: 36px; height: 36px; border-radius: 50%; background: var(--gris); display: grid; place-items: center; font-size: 20px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-top: 22px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--gris); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: none; padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--encre); color: #fff; }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search input { width: 100%; padding: 12px 18px 12px 44px; border-radius: 999px; border: 2px solid transparent; background: var(--gris); font-weight: 600; }
.search input:focus { border-color: var(--encre); outline: none; background: #fff; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; }

.days { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.day { flex: none; border: 2px solid var(--gris-2); background: #fff; border-radius: var(--r-m); padding: 9px 14px; text-align: left; display: grid; line-height: 1.15; min-width: 84px; }
.day .d { font-size: 12px; font-weight: 700; color: var(--encre-2); }
.day .n { font-family: var(--display); font-weight: 800; font-size: 22px; }
.day .c { font-size: 11px; font-weight: 700; color: var(--encre-2); }
.day.is-weekend { background: #FFF6DA; border-color: var(--jaune); }
.day[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.day[aria-pressed="true"] .d, .day[aria-pressed="true"] .c { color: #fff; opacity: .8; }

.result-line { margin: 26px 0 16px; font-weight: 700; color: var(--encre-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; padding-bottom: 20px; }

/* ================= Carte événement (style « carte de cours ») ================= */
.card { background: var(--gris); border-radius: var(--r-l); padding: 8px; display: flex; flex-direction: column; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--ombre); }
.card-media { position: relative; aspect-ratio: 16 / 11; border-radius: var(--r-m); overflow: hidden; background: var(--gris-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.tags { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.tag { background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 800; }
.tag-encre { background: var(--encre); color: #fff; }
.tag-jaune { background: var(--jaune); }
.card-body { padding: 16px 12px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-family: var(--body); font-weight: 800; font-size: 20px; line-height: 1.2; letter-spacing: -.01em; }
.card-body h3 button { all: unset; cursor: pointer; }
.card-body h3 button:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.social { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--encre-2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.stats span { display: block; font-size: 12px; color: var(--encre-2); font-weight: 600; }
.stats b { font-size: 14px; font-weight: 800; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: var(--r-m); padding: 8px 8px 8px 12px; }
.org { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; min-width: 0; }
.org span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot .btn { white-space: nowrap; flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; display: block; padding: 9px 14px; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--jaune); color: var(--encre); }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }

.like-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; border-radius: 999px; padding: 6px 12px 6px 10px; font-weight: 800; font-size: 13px; }
.like-btn svg { width: 17px; height: 17px; }
.like-btn[aria-pressed="true"] { background: #FFE4E2; color: var(--rouge-fonce); }
.like-btn[aria-pressed="true"] svg path { fill: var(--rouge); stroke: var(--rouge); }
@media (prefers-reduced-motion: no-preference) { .like-btn.pop svg { animation: pop .35s ease; } }
@keyframes pop { 50% { transform: scale(1.5) rotate(-10deg); } }
.icon-stat { display: inline-flex; align-items: center; gap: 5px; }
.icon-stat svg { width: 17px; height: 17px; }

/* Affiche générée quand l'organisateur n'a pas mis de photo */
.gen { position: absolute; inset: 0; background: var(--c1); color: var(--c2); overflow: hidden; display: flex; align-items: flex-end; padding: 7%; container-type: inline-size; }
.gen-title { position: relative; z-index: 1; font-family: var(--display); font-weight: 900; font-size: min(15cqw, calc(86cqw / (var(--n, 8) * .8))); line-height: .95; text-transform: uppercase; letter-spacing: -.03em; }
.gen-shape { position: absolute; background: var(--c3); }
.gen-s0 { width: 70%; aspect-ratio: 1; border-radius: 50%; right: -16%; top: -26%; }
.gen-s1 { width: 150%; height: 30%; right: -25%; top: 12%; transform: rotate(-12deg); border-radius: 999px; }
.gen-s2 { width: 56%; aspect-ratio: 1; right: -6%; top: -8%; border-radius: 0 0 50% 50%; }
.gen-s3 { inset: 0 0 auto 0; height: 50%; background: repeating-linear-gradient(-45deg, var(--c3) 0 16px, transparent 16px 32px); }
.gen-s4 { width: 46%; aspect-ratio: 1; right: 6%; top: 6%; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

/* ================= Formes des types de billets (choisies par l'organisateur) ================= */
.tt-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tt { display: inline-flex; align-items: center; white-space: nowrap; background: var(--tt, var(--jaune)); color: var(--tt-ink, var(--encre)); font-weight: 800; font-size: 12px; line-height: 1; padding: 6px 12px; }
.tt-lg { font-size: 15px; padding: 9px 16px; }
.tt-pale { box-shadow: inset 0 0 0 2px rgba(27, 16, 32, .2); }
.shape-pilule { border-radius: 999px; }
.shape-etiquette { padding-left: 18px; clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%); border-radius: 0 6px 6px 0; }
.shape-etoile { padding: 9px 18px; clip-path: polygon(0 50%, 6% 22%, 3% 0, 22% 8%, 36% 0, 50% 8%, 64% 0, 78% 8%, 97% 0, 94% 22%, 100% 50%, 94% 78%, 97% 100%, 78% 92%, 64% 100%, 50% 92%, 36% 100%, 22% 92%, 3% 100%, 6% 78%); }
.shape-biseau { padding: 6px 18px; clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); }
.shape-bulle { border-radius: 12px 12px 12px 2px; }
.shape-ticket { padding: 6px 16px; border-radius: 4px; -webkit-mask: radial-gradient(circle 5px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle 5px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }

/* ================= Bandeau organisateurs ================= */
.orga-band {
  margin: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); background: var(--jaune); border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; align-items: center; position: relative; overflow: hidden;
}
.orga-band h2 { font-size: clamp(26px, 3.2vw, 40px); max-width: 16ch; }
.orga-band p { margin-top: 14px; font-weight: 600; max-width: 44ch; }
.orga-band .btn { margin-top: 22px; }
.steps { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { background: #fff; border-radius: var(--r-m); padding: 14px 16px 14px 60px; position: relative; font-weight: 700; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--rouge); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 14px; }
.steps li small { display: block; font-weight: 600; color: var(--encre-2); }

/* ================= Modale ================= */
dialog {
  width: min(1060px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0;
  border-radius: var(--r-xl); background: #fff; color: var(--encre); overflow: auto; box-shadow: 0 40px 80px -20px rgba(27, 16, 32, .5);
}
dialog.is-narrow { width: min(540px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(27, 16, 32, .55); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) { dialog[open] { animation: rise .25s ease-out; } }
@keyframes rise { from { transform: translateY(20px) scale(.98); opacity: 0; } }
.modal-close { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gris); display: grid; place-items: center; }
.modal-close svg { width: 20px; height: 20px; }

.detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0; padding: 12px; }
.detail-media { position: relative; min-height: 440px; border-radius: var(--r-l); overflow: hidden; background: var(--gris); }
.detail-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding: 22px 26px 18px 30px; display: flex; flex-direction: column; gap: 16px; }
.detail-info h2 { font-size: clamp(28px, 3.4vw, 42px); padding-right: 40px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { background: var(--gris); border-radius: var(--r-m); padding: 12px 14px; }
.fact span { display: block; font-size: 12px; font-weight: 700; color: var(--encre-2); }
.fact b { font-weight: 800; font-size: 15px; }
.desc { white-space: pre-line; max-width: 62ch; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.block { margin: 0 12px 12px; padding: 26px; background: var(--gris); border-radius: var(--r-l); }
.block h3 { font-size: 24px; margin-bottom: 16px; }

.tickets-list { display: grid; gap: 10px; }
.ticket-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-m); background: #fff; border: 2px solid transparent; cursor: pointer; }
.ticket-opt:has(input:checked) { border-color: var(--encre); }
.ticket-opt.is-soldout { opacity: .5; cursor: not-allowed; }
.ticket-opt input { width: 20px; height: 20px; accent-color: var(--rouge); }
.ticket-opt .left { color: var(--encre-2); font-size: 13px; font-weight: 700; display: block; margin-top: 6px; }
.ticket-opt .p { font-family: var(--display); font-weight: 800; font-size: 20px; }
.buy-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-top: 16px; }
.note { font-size: 13px; color: var(--encre-2); font-weight: 600; margin-top: 10px; }

.comments { display: grid; gap: 14px; margin-bottom: 16px; }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: #fff; border-radius: var(--r-m); padding: 12px 14px; }
.comment-head { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.comment-head time { color: var(--encre-2); font-weight: 600; }
.comment p { overflow-wrap: anywhere; }
.badge-orga { font-size: 11px; background: var(--rouge); color: #fff; padding: 3px 8px; border-radius: 999px; font-weight: 800; }
.text-btn { border: 0; background: none; padding: 0; color: var(--encre-2); font-size: 12px; font-weight: 700; text-decoration: underline; }

/* ================= Formulaires ================= */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-weight: 800; font-size: 14px; }
.field small { color: var(--encre-2); font-size: 13px; font-weight: 600; }
.field input:not([type="color"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]), .field select, .field textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--r-s); border: 2px solid var(--gris-2); background: #fff; font-weight: 600;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--encre); outline: none; }
.field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.error { color: var(--rouge-fonce); font-weight: 800; font-size: 14px; }
.error:empty { display: none; }

.auth { padding: 34px; display: grid; gap: 18px; }
.auth h2 { font-size: 32px; padding-right: 40px; }
.auth-mascot { width: 92px; margin-bottom: -6px; }
.tabs { display: flex; gap: 4px; background: var(--gris); border-radius: 999px; padding: 4px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px 14px; font-weight: 800; border-radius: 999px; font-size: 14px; }
.tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 2px 8px rgba(27, 16, 32, .08); }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role { position: relative; border-radius: var(--r-m); padding: 16px; cursor: pointer; display: grid; gap: 4px; background: var(--gris); border: 2px solid transparent; }
.role input { position: absolute; opacity: 0; }
.role b { font-family: var(--display); font-size: 16px; }
.role span { font-size: 13px; color: var(--encre-2); font-weight: 600; }
.role:has(input:checked) { background: #FFF6DA; border-color: var(--jaune); }
.role:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 3px; }

.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; min-height: 200px; padding: 18px; border: 2px dashed #CFC8D3; border-radius: var(--r-m); background: var(--gris); cursor: pointer; overflow: hidden; }
.drop:hover, .drop.is-over { background: #FFF6DA; border-color: var(--jaune); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop .drop-actions { position: absolute; right: 10px; bottom: 10px; z-index: 2; }
.drop:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 3px; }
.drop-icon { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin: 0 auto 8px; font-size: 24px; }

.switch { display: flex; gap: 12px; align-items: center; font-weight: 800; cursor: pointer; }
.switch input { appearance: none; width: 54px; height: 32px; border-radius: 999px; background: var(--gris-2); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .15s ease; }
.switch input:checked { background: var(--rouge); }
.switch input:checked::after { transform: translateX(22px); }

.tt-editor { display: grid; gap: 14px; }
.tt-card { border-radius: var(--r-m); padding: 18px; background: var(--gris); display: grid; gap: 14px; }
.tt-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tt-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(27, 16, 32, .12); padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--encre); }
.color-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.color-custom input { width: 40px; height: 34px; border: 2px solid var(--gris-2); border-radius: 10px; padding: 2px; background: #fff; cursor: pointer; }
.shapes { display: flex; flex-wrap: wrap; gap: 6px; }
.shape-btn { border: 2px solid transparent; background: #fff; padding: 6px; border-radius: 12px; }
.shape-btn[aria-pressed="true"] { border-color: var(--encre); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.presets > span { font-size: 13px; color: var(--encre-2); font-weight: 700; }
.chip { border: 0; background: var(--gris); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 800; }
.chip:hover { background: var(--jaune); }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; padding-bottom: 60px; }
.form-side { position: sticky; top: 96px; display: grid; gap: 14px; max-height: calc(100vh - 110px); overflow: auto; padding: 4px; margin: -4px; }
.panel { background: #fff; border: 2px solid var(--gris); border-radius: var(--r-l); padding: 26px; display: grid; gap: 18px; }
.panel h2 { font-size: 22px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin: clamp(28px, 5vw, 56px) 0 28px; }
.page-head h1 { font-size: clamp(32px, 5vw, 56px); }
.page-head p { color: var(--encre-2); font-weight: 600; margin-top: 8px; }

/* ================= Billet électronique ================= */
.billet { display: grid; grid-template-columns: minmax(0, 1fr) 220px; border-radius: var(--r-l); overflow: hidden; background: #fff; position: relative; min-height: 250px; box-shadow: var(--ombre); }
.billet-main { position: relative; padding: 22px 24px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 250px; background: var(--encre); }
.billet-main > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.billet-main::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 16, 32, 0) 15%, rgba(27, 16, 32, .9) 100%); z-index: 1; }
.billet-main > *:not(img) { position: relative; z-index: 2; }
.billet-main > .gen { position: absolute; inset: 0; z-index: 0; }
.billet-main > .gen .gen-title { display: none; }
.billet-main h3 { font-size: 28px; }
.billet-main .tt { align-self: flex-start; }
.billet-main p { font-weight: 600; font-size: 15px; }
.billet-stub { padding: 18px; display: grid; gap: 6px; justify-items: center; align-content: center; text-align: center; background: #fff; border-left: 3px dashed var(--gris-2); }
.billet::before, .billet::after { content: ""; position: absolute; right: 207px; width: 26px; height: 26px; border-radius: 50%; background: var(--page-bg, #fff); z-index: 3; }
.billet::before { top: -13px; }
.billet::after { bottom: -13px; }
.billet-qr { width: 150px; height: 150px; image-rendering: pixelated; border-radius: 8px; }
.billet-code { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.billet-stub small { font-weight: 700; color: var(--encre-2); }
.billet.is-used .billet-qr { opacity: .25; }
.used-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); border: 3px solid var(--rouge); color: var(--rouge); font-family: var(--display); font-weight: 900; padding: 4px 10px; border-radius: 10px; background: rgba(255, 255, 255, .9); z-index: 4; }
.billet-stub { position: relative; }
.wallet { display: grid; gap: 28px; padding-bottom: 60px; max-width: 900px; }
.wallet-item { display: grid; gap: 12px; }
.qr-placeholder { width: 150px; height: 150px; border-radius: 8px; background: repeating-linear-gradient(45deg, var(--gris) 0 8px, #fff 8px 16px); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--encre-2); }

/* ================= Espace organisateur ================= */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.figure { border-radius: var(--r-l); padding: 20px 22px; background: var(--gris); }
.figure:nth-child(1) { background: var(--rouge); color: #fff; }
.figure:nth-child(2) { background: var(--jaune); }
.figure b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }
.figure span { font-size: 13px; font-weight: 700; opacity: .85; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; padding-bottom: 60px; }
.ev-rows { display: grid; gap: 14px; }
.ev-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; background: var(--gris); border-radius: var(--r-l); padding: 10px; }
.ev-thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-row h3 { font-family: var(--body); font-weight: 800; font-size: 19px; margin-top: 6px; }
.ev-row .meta { font-size: 13px; color: var(--encre-2); font-weight: 600; margin: 4px 0 10px; }
.ev-row.is-past { opacity: .7; }
.bars { display: grid; gap: 8px; margin: 6px 0 12px; }
.bar { display: grid; grid-template-columns: minmax(120px, auto) 1fr auto; gap: 10px; align-items: center; font-size: 13px; font-weight: 700; }
.bar-track { height: 10px; border-radius: 999px; overflow: hidden; background: #fff; }
.bar-fill { height: 100%; background: var(--tt); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(27, 16, 32, .12); }
.check-panel { background: var(--encre); color: #fff; border-color: var(--encre); position: sticky; top: 96px; }
.check-panel p { color: rgba(255, 255, 255, .75); font-size: 14px; font-weight: 600; }
.check-panel .field input { background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .2) !important; color: #fff; text-transform: uppercase; }
.check-result { padding: 14px 16px; border-radius: var(--r-m); font-weight: 800; color: var(--encre); display: grid; gap: 10px; }
.check-result.ok { background: var(--menthe); }
.check-result.ko { background: #FFD0CC; }
.check-result.used { background: var(--jaune); }

.scanner { padding: 30px; display: grid; gap: 16px; }
.scanner h2 { font-size: 28px; padding-right: 50px; }
.scan-view { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--encre); aspect-ratio: 4 / 3; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 4px solid var(--jaune); border-radius: 24px; box-shadow: 0 0 0 999px rgba(27, 16, 32, .35); }

/* ================= États vides, toast, pied de page ================= */
.empty { padding: 40px 28px; text-align: center; border-radius: var(--r-xl); display: grid; gap: 14px; justify-items: center; background: var(--gris); }
.empty h2 { font-size: 26px; }
.empty p { max-width: 46ch; color: var(--encre-2); font-weight: 600; }
.empty .mascot { width: 110px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); visibility: hidden; background: var(--encre); color: #fff; padding: 13px 22px; border-radius: 999px; font-weight: 800; z-index: 200; transition: transform .25s ease, visibility .25s; max-width: calc(100vw - 32px); text-align: center; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

.footer { margin-top: 40px; padding: 0 clamp(12px, 3vw, 28px) 20px; }
.footer-inner { max-width: var(--page); margin: 0 auto; background: var(--encre); color: #fff; border-radius: var(--r-xl); padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; font-size: 14px; font-weight: 600; }
.footer-inner .logo-word { color: var(--encre); display: inline-block; }
.footer-inner p { opacity: .8; }

/* ================= Photos du hero ================= */
.hero-facts { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.hero-facts li { font-size: 14px; font-weight: 700; color: var(--encre-2); display: grid; }
.hero-facts b { font-family: var(--display); font-size: 26px; color: var(--encre); line-height: 1.1; }

/* ================= Comment ça marche ================= */
.how { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how li { background: var(--gris); border-radius: var(--r-l); padding: 26px; display: grid; gap: 8px; align-content: start; }
.how li:nth-child(2) { background: #FFF6DA; }
.how li:nth-child(3) { background: #FFE4E2; }
.how-n { width: 44px; height: 44px; border-radius: 50%; background: var(--encre); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; margin-bottom: 6px; }
.how b { font-family: var(--display); font-size: 19px; font-weight: 700; }
.how p { color: var(--encre-2); font-weight: 600; }

/* ================= Cartes « photo + info » ================= */
.section-sub { margin-top: 10px; color: var(--encre-2); font-weight: 600; max-width: 52ch; }
.swipe-hint { display: none; }
.moments {
  max-width: var(--page); margin: 28px auto 0; padding: 0 clamp(16px, 4vw, 32px) 40px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px;
}
.moment { border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; background: var(--tone); color: var(--tone-ink, var(--encre)); box-shadow: 0 0 0 1px rgba(27, 16, 32, .04); transition: transform .25s ease; }
/* Décalage en escalier, comme des affiches posées */
.moment:nth-child(3n+2) { transform: translateY(36px); }
.moment:hover { transform: translateY(-6px) rotate(-.6deg); }
.moment:nth-child(3n+2):hover { transform: translateY(30px) rotate(.6deg); }
.moment-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--r-xl) - 8px) calc(var(--r-xl) - 8px) 0 0; }
.moment-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .6s ease; }
.moment:hover .moment-photo img { transform: scale(1.05); }
.moment-info { position: relative; padding: 26px 24px 26px; display: grid; gap: 8px; align-content: start; flex: 1; }
.moment-tag {
  position: absolute; top: -17px; left: 22px; background: #fff; color: var(--encre);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 800; box-shadow: 0 6px 14px -6px rgba(27, 16, 32, .35);
}
.moment-info h3 { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.15; }
.moment-info p { font-weight: 600; font-size: 15px; opacity: .88; }
.moment-rouge { --tone: var(--rouge); --tone-ink: #fff; }
.moment-jaune { --tone: var(--jaune); }
.moment-violet { --tone: var(--violet); --tone-ink: #fff; }
.moment-menthe { --tone: var(--menthe); }
.moment-orange { --tone: var(--orange); }
.moment-encre { --tone: var(--encre); --tone-ink: #fff; }

/* ================= Confiance ================= */
.trust { background: var(--encre); color: #fff; border-radius: var(--r-xl); padding: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 34px; align-items: start; }
.trust h2 { font-size: clamp(28px, 3.4vw, 42px); margin: 14px 0; }
.trust-head p { color: rgba(255, 255, 255, .78); font-weight: 600; margin-bottom: 22px; }
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trust-list li { background: rgba(255, 255, 255, .07); border-radius: var(--r-m); padding: 18px; display: grid; gap: 4px; }
.trust-list b { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--jaune); }
.trust-list span { color: rgba(255, 255, 255, .8); font-size: 14px; font-weight: 600; }
.big-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--rouge); color: #fff; display: grid; place-items: center; }
.big-icon svg { width: 28px; height: 28px; }

/* ================= FAQ ================= */
.faq { display: grid; gap: 10px; margin-top: 22px; max-width: 860px; }
.faq details { background: var(--gris); border-radius: var(--r-m); padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 22px; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--encre-2); font-weight: 600; max-width: 70ch; }
.faq-wrap { padding-bottom: 20px; }

/* ================= Badges de confiance, statuts, bandeaux ================= */
.verified { display: inline-flex; align-items: center; gap: 4px; background: #DDF8EE; color: #0B7A56; border-radius: 999px; padding: 3px 10px 3px 6px; font-size: 12px; font-weight: 800; vertical-align: middle; }
.verified svg { width: 14px; height: 14px; }
.verified-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--menthe); color: #fff; display: inline-grid; place-items: center; flex: none; }
.verified-dot svg { width: 12px; height: 12px; }
.status { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.st-ok { background: #DDF8EE; color: #0B7A56; }
.st-wait { background: #FFF1C7; color: #7A5200; }
.st-ko { background: #FFE4E2; color: var(--rouge-fonce); }
.tag-rouge { background: var(--rouge); color: #fff; }
.banner { border-radius: var(--r-m); padding: 14px 18px; font-weight: 600; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.banner a { font-weight: 800; }
.banner-ko { background: #FFE4E2; color: #7D1912; }
.banner-wait { background: #FFF1C7; color: #5C3E00; }
.banner-info { background: #EDE8FF; color: #2E1F7A; }
dialog > #modalBody > .banner { margin: 70px 12px 0; }

.org-box { background: var(--gris); border-radius: var(--r-m); padding: 16px; display: grid; gap: 12px; }
.org-box-head { display: flex; gap: 12px; align-items: center; }
.org-box-head small { display: block; color: var(--encre-2); font-weight: 600; font-size: 13px; margin-top: 2px; }
.org-link { font-weight: 800; text-decoration: none; }
.org-link:hover { text-decoration: underline; }
.org-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.org-stats li { background: #fff; border-radius: 12px; padding: 10px; display: grid; }
.org-stats b { font-family: var(--display); font-size: 20px; }
.org-stats span { font-size: 12px; color: var(--encre-2); font-weight: 700; line-height: 1.3; }
.org-box .btn svg, .row .btn svg { width: 16px; height: 16px; }
.safe-note { display: flex; gap: 10px; align-items: flex-start; background: #DDF8EE; color: #0B5C42; border-radius: var(--r-m); padding: 12px 14px; font-size: 14px; font-weight: 700; margin-top: 14px; }
.safe-note svg { width: 22px; height: 22px; flex: none; }
.report-line { padding: 4px 26px 26px; display: flex; justify-content: flex-end; }
.report-line .text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.report-line svg { width: 16px; height: 16px; }
.radios { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.field-legend { font-weight: 800; font-size: 14px; margin-bottom: 8px; padding: 0; }
.radio-row { display: flex; gap: 12px; align-items: flex-start; background: var(--gris); border-radius: var(--r-s); padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14px; border: 2px solid transparent; }
.radio-row:has(input:checked) { border-color: var(--encre); background: #fff; }
.radio-row input { margin-top: 3px; accent-color: var(--rouge); }
.test-hint { background: #FFF1C7; border-radius: var(--r-s); padding: 12px 14px; font-size: 14px; color: #5C3E00; }
.code-input { font-family: var(--display) !important; font-size: 24px !important; letter-spacing: .3em; text-align: center; }

/* ================= Pages Confiance, profil, modération ================= */
.guide { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 60px; }
.guide-card { background: var(--gris); border-radius: var(--r-l); padding: 28px; }
.guide-card h2 { font-size: 22px; margin-bottom: 14px; }
.guide-card ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-weight: 600; }
.guide-rouge { background: var(--rouge); color: #fff; }
.guide-jaune { background: var(--jaune); }
.profile-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 60px; }
.profile-side { position: sticky; top: 96px; }
.sub-title { font-size: 22px; margin: 34px 0 16px; }
.table-wrap { overflow-x: auto; background: var(--gris); border-radius: var(--r-l); padding: 8px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--encre-2); padding: 10px 12px; }
.table td { background: #fff; padding: 12px; vertical-align: top; border-bottom: 6px solid var(--gris); }
.table td:first-child { border-radius: 12px 0 0 12px; }
.table td:last-child { border-radius: 0 12px 12px 0; }
.table small { color: var(--encre-2); font-weight: 600; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: #fff; font-weight: 700; }

/* ================= Formes décoratives (couleurs vives) ================= */
.deco { position: absolute; display: block; pointer-events: none; z-index: 0; }
.h-deco { display: inline-block; width: .78em; height: .78em; margin-left: .28em; vertical-align: -.04em; }

/* Panneau rouge des catégories */
.d-cats-fleur { width: 130px; height: 130px; left: -50px; bottom: -72px; }
.d-cats-spark { width: 44px; height: 44px; left: 46%; top: 26px; }
.d-cats-vague { width: 90px; height: 90px; right: 30%; bottom: -46px; transform: rotate(-8deg); }

/* Comment ça marche */
.how li { position: relative; overflow: hidden; }
.how li > :not(.deco) { position: relative; z-index: 1; }
.d-how { width: 96px; height: 96px; right: -18px; top: -18px; transform: rotate(-14deg); }

/* Confiance (fond encre) */
.trust { position: relative; overflow: hidden; }
.trust > :not(.deco) { position: relative; z-index: 1; }
.d-trust-burst { width: 150px; height: 150px; left: -50px; bottom: -56px; }
.d-trust-anneau { width: 120px; height: 120px; right: -36px; top: -40px; }

/* Bandeau jaune organisateurs */
.orga-band > :not(.deco) { position: relative; z-index: 1; }
.d-orga-spark { width: 62px; height: 62px; right: 34px; top: 22px; }
.d-orga-arche { width: 180px; height: 180px; left: 34%; bottom: -96px; }
.d-orga-zig { width: 86px; height: 86px; left: -14px; top: -26px; transform: rotate(20deg); }

/* Questions fréquentes */
.faq-wrap { position: relative; overflow-x: clip; }
.faq-wrap > :not(.deco) { position: relative; z-index: 1; }
.d-faq-fleur { width: 230px; height: 230px; right: 3%; top: 150px; }
.d-faq-etoile { width: 80px; height: 80px; right: 19%; top: 330px; transform: rotate(-12deg); }

/* Pied de page */
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand svg { width: 22px; height: 22px; display: block; }

/* ================= Choix de la catégorie (photos détourées) ================= */
.cat-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.cat-pick legend { font-weight: 800; font-size: 14px; margin-bottom: 8px; padding: 0; }
.cat-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cat-opt {
  position: relative; height: 96px; border-radius: 18px; background: var(--gris); overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s ease, border-color .15s ease;
}
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt span { position: absolute; left: 12px; top: 10px; z-index: 2; font-family: var(--display); font-weight: 700; font-size: 14px; }
.cat-opt img { position: absolute; right: 0; bottom: 0; height: 88px; width: auto; max-width: 70%; object-fit: contain; object-position: right bottom; transition: transform .2s ease; transform-origin: bottom right; }
.cat-opt:hover img { transform: scale(1.06); }
.cat-opt:has(input:checked) { background: var(--jaune); border-color: var(--encre); }
.cat-opt:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }

/* ================= WhatsApp ================= */
.btn-wa { background: #1FAF5A; color: #fff; }
.btn-wa:hover { background: #178F49; }
.btn-wa svg, .wa-ok svg { width: 18px; height: 18px; flex: none; }
.wa-ok { display: inline-flex; align-items: center; gap: 5px; color: #12804A; font-weight: 800; }
.wa-step { display: flex; gap: 12px; align-items: flex-start; background: #E3F8EC; border-radius: var(--r-m); padding: 14px; }
.wa-step p { font-size: 13px; font-weight: 600; color: #155C36; }
.wa-step b { display: block; font-size: 14px; color: #0E4628; margin-bottom: 2px; }
.wa-icon { width: 38px; height: 38px; border-radius: 12px; background: #1FAF5A; color: #fff; display: grid; place-items: center; flex: none; }
.wa-icon svg { width: 22px; height: 22px; }
.wa-badge { width: 64px; height: 64px; border-radius: 20px; background: #1FAF5A; color: #fff; display: grid; place-items: center; }
.wa-badge svg { width: 36px; height: 36px; }

/* ================= Codes de vérification ================= */
.code-field input { font-family: var(--display); font-size: 28px; letter-spacing: .4em; text-align: center; padding: 14px; }
.dev-note { background: #FFF1C7; color: #5C3D00; border-radius: var(--r-s); padding: 10px 14px; font-size: 13px; font-weight: 600; }
.notice { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--jaune); border-radius: var(--r-m); padding: 10px 10px 10px 18px; font-weight: 800; font-size: 14px; }

/* ================= Lien vers la publication ================= */
.social-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; align-self: flex-start; width: fit-content;
  background: var(--encre); color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; border-radius: 999px; padding: 10px 16px;
}
.social-link svg { width: 16px; height: 16px; }
.social-link:hover { background: var(--violet); }
.hint-ok { color: #12804A; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.hint-ok svg { width: 14px; height: 14px; }
.hint-ko { color: var(--rouge-fonce); font-weight: 800; }

/* ================= Tiko guide l'acheteur ================= */
.guide-buy { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 18px; }
.guide-mascot { width: 96px; margin-top: 8px; }
@media (prefers-reduced-motion: no-preference) { .guide-mascot { animation: bob 3.2s ease-in-out infinite; } }
.guide-bubble { position: relative; background: #FFF6DA; border-radius: 22px; padding: 16px 18px; }
.guide-bubble::before { content: ""; position: absolute; left: -9px; top: 30px; width: 20px; height: 20px; background: #FFF6DA; transform: rotate(45deg); border-radius: 4px; }
.guide-say { position: relative; font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.3; margin-bottom: 10px; }
.guide-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.guide-checks li { display: flex; gap: 10px; align-items: flex-start; }
.guide-checks p { font-size: 14px; line-height: 1.4; }
.guide-checks b { display: block; font-weight: 800; }
.guide-checks small { display: block; color: var(--encre-2); font-weight: 600; font-size: 13px; }
.guide-checks a { color: var(--encre); font-weight: 800; }
.gc-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 900; font-size: 13px; color: #fff; margin-top: 1px; }
.gc-dot svg { width: 13px; height: 13px; }
.gc-ok .gc-dot { background: #1FAF5A; }
.gc-warn .gc-dot { background: var(--orange); }
.gc-info .gc-dot { background: var(--violet); }

@media (max-width: 640px) {
  .cat-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-buy { grid-template-columns: 64px minmax(0, 1fr); }
  .guide-mascot { width: 64px; }
}

/* ================= Responsive ================= */
@media (max-width: 980px) {
  .hero-grid, .form-layout, .dash-grid, .orga-band { grid-template-columns: 1fr; }
  .hero-art { min-height: 400px; max-width: 560px; width: 100%; justify-self: center; }
  .form-side, .check-panel { position: static; max-height: none; }
  .detail { grid-template-columns: 1fr; }
  .detail-media { min-height: 0; aspect-ratio: 4 / 3; }
  .detail-info { padding: 22px 12px 12px; }
  .cats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats::before, .d-cats-fleur, .d-cats-vague { display: none; }
  .cat-card:nth-child(n) { transform: rotate(0); }
  .cat-card:nth-child(even) { transform: translateY(16px) rotate(1.5deg); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust, .profile-grid { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .how { grid-template-columns: 1fr; }
  /* Mobile et tablette : les cartes défilent en carrousel, la suivante dépasse pour inviter au geste */
  .moments {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding: 6px clamp(16px, 4vw, 32px) 28px; scroll-padding: 0 clamp(16px, 4vw, 32px); scrollbar-width: none;
  }
  .moments::-webkit-scrollbar { display: none; }
  .moment { flex: 0 0 min(76vw, 340px); scroll-snap-align: start; }
  .moment:nth-child(3n+2), .moment:nth-child(3n+2):hover, .moment:hover { transform: none; }
  .moment:nth-child(even) { margin-top: 18px; }
  .moment-photo { aspect-ratio: 1 / 1; }
  .swipe-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--encre-2); }
  .swipe-hint::after { content: "→"; font-size: 16px; }
}
@media (max-width: 640px) {
  .nav .who, .nav .hide-sm { display: none; }
  .nav a:not(.btn), .nav .linkish { padding: 7px 9px; font-size: 13px; }
  .topbar .logo-face { display: none; }
  .hero-ticket { left: 0; bottom: 9%; }
  .trust-list, .guide, .org-stats { grid-template-columns: 1fr; }
  .hero-facts b { font-size: 22px; }
  .report-line { padding: 4px 16px 20px; }
  .topbar-inner { border-radius: 26px; }
  .hero-art { min-height: 420px; }
  .hero-mascot { width: 110px; }
  .ht-main { padding: 11px 14px 11px 12px; }
  .ht-main b { font-size: 14px; margin-top: 8px; }
  .ht-main small { font-size: 11.5px; }
  .ht-stub { padding: 10px; }
  .ht-stub svg { width: 46px; height: 46px; }
  .form-grid, .tt-fields, .roles, .facts { grid-template-columns: 1fr; }
  .auth, .scanner { padding: 24px 20px; }
  .block { padding: 20px 16px; margin: 0 8px 8px; }
  .detail { padding: 8px; }
  .billet { grid-template-columns: 1fr; }
  .billet-stub { border-left: 0; border-top: 3px dashed var(--gris-2); }
  .billet::before, .billet::after { display: none; }
  .ev-row { grid-template-columns: 84px minmax(0, 1fr); }
  .bar { grid-template-columns: 1fr auto; }
  .bar .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .cat-card b { font-size: 12px; }
  .cat-photo { height: calc(100% + 30px); max-width: 64%; right: 2px; }
  .cats-grid { gap: 40px 14px; margin-top: 50px; }
  .cat-card { min-height: 150px; }
}
/* Formes : plus discrètes sur petit écran, jamais par-dessus le texte */
@media (max-width: 980px) {
  .d-faq-fleur { width: 120px; height: 120px; right: -40px; top: 10px; opacity: .9; }
  .d-faq-etoile { display: none; }
  .d-orga-arche { left: auto; right: -30px; bottom: -110px; }
}
@media (max-width: 640px) {
  .d-cats-fleur { display: none; }
  .d-cats-spark { left: auto; right: 22px; top: 22px; width: 32px; height: 32px; }
  .d-cats-vague { display: none; }
  .d-how { width: 74px; height: 74px; }
  .d-trust-burst { width: 110px; height: 110px; }
  .d-trust-anneau { width: 90px; height: 90px; }
  .d-orga-spark { width: 44px; height: 44px; right: 18px; top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Numéro WhatsApp à l'inscription (obligatoire, sans code) */
.wa-fields { display: grid; gap: 8px; flex: 1; min-width: 0; }
.wa-fields b { font-size: 14px; color: #0E4628; }
.wa-fields small { font-size: 12.5px; font-weight: 600; color: #155C36; }
.wa-fields .check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: #155C36; cursor: pointer; }
.wa-fields .check input { width: 18px; height: 18px; accent-color: #1FAF5A; }

/* ================= Billetterie : règles de vente ================= */
.ticket-opt .tt-desc { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--encre); }
.ticket-opt .tt-rules { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--violet); }
.capacity-line { background: var(--gris); border-radius: var(--r-s); padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* ================= Profil public de l'organisateur ================= */
a.org { color: inherit; text-decoration: none; border-radius: 999px; }
a.org:hover span:not(.avatar):not(.verified-dot) { text-decoration: underline; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.org-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; padding: clamp(28px, 4vw, 44px) 0 8px; }
.org-logo { width: 72px; height: 72px; border-radius: 22px; background: var(--jaune); display: grid; place-items: center; overflow: hidden; flex: none; font-family: var(--display); font-weight: 800; font-size: 22px; }
.org-logo img { width: 100%; height: 100%; object-fit: cover; }
.org-logo-lg { width: clamp(96px, 12vw, 132px); height: clamp(96px, 12vw, 132px); border-radius: 32px; font-size: 36px; transform: rotate(-3deg); }
.org-hero h1 { font-size: clamp(30px, 4.4vw, 52px); }
.org-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; color: var(--encre-2); font-weight: 700; font-size: 14px; }
.org-bio { margin-top: 14px; max-width: 62ch; font-size: 16px; font-weight: 500; white-space: pre-line; }
.org-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; background: var(--gris); color: var(--encre); text-decoration: none; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 8px 14px; }
.chip-link svg { width: 14px; height: 14px; }
.chip-link:hover { background: var(--jaune); }
.org-hero-text .btn { margin-top: 12px; }
.grid-past .card { opacity: .85; }
.logo-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.links-set { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.links-set legend { font-weight: 800; font-size: 14px; margin-bottom: 8px; padding: 0; }
@media (max-width: 640px) {
  .org-hero { grid-template-columns: 1fr; }
  .links-set { grid-template-columns: 1fr; }
}


/* Billets : dates de vente sur 2 colonnes, case « compte dans la jauge » */
.tt-fields.tt-fields-2 { grid-template-columns: 1fr 1fr; }
.check.tt-cap { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; font-weight: 700; font-size: 14px; cursor: pointer; }
.check.tt-cap input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--rouge); }
.check.tt-cap small { grid-column: 2; color: var(--encre-2); font-weight: 600; font-size: 12.5px; }
@media (max-width: 640px) { .tt-fields.tt-fields-2 { grid-template-columns: 1fr; } }

/* ================= Pages légales ================= */
.legal { max-width: 760px; padding: clamp(28px, 5vw, 56px) 0 60px; }
.legal h1 { font-size: clamp(30px, 4.4vw, 48px); }
.legal h2 { font-size: 20px; margin: 30px 0 10px; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: var(--encre); }
.legal ul { padding-left: 20px; display: grid; gap: 6px; margin: 0; }
.legal a { color: var(--rouge-fonce); font-weight: 700; }
.legal code { background: var(--gris); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.legal-meta { color: var(--encre-2) !important; font-weight: 700; margin: 10px 0 18px; }
.todo { background: #FFF1C7; color: #7A5200; border-radius: 6px; padding: 0 6px; font-weight: 700; }
.account-zone { margin: 40px 0 60px; color: var(--encre-2); font-weight: 600; font-size: 14px; }
.auth .note a { color: inherit; font-weight: 800; }

.order-view .wallet { margin: 18px auto; max-width: 720px; }

.currency-field { margin-top: 8px; max-width: 360px; }

/* Prix payé par le participant (frais inclus) */
.ticket-opt .p small { display: block; font-family: var(--body); font-size: 11px; font-weight: 700; color: var(--encre-2); text-align: right; margin-top: 2px; }
.fee-hint { color: #12804A !important; font-weight: 700; }
/* Champ WhatsApp simple à l'inscription */
.wa-plain .check { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.wa-plain .check input { width: 18px; height: 18px; accent-color: var(--rouge); }

/* Achat sans compte : invitation discrète à créer un compte */
.account-nudge { margin-top: 14px; padding: 14px 16px; border: 2px dashed rgba(27,16,32,.18); border-radius: 16px; }
.account-nudge p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.account-nudge .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.order-view .account-nudge { text-align: left; max-width: 520px; margin: 18px auto 0; }

/* Argent des ventes : ligne dans Mon espace, sections de la page Modération */
.money-line { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: #F2EFF4; font-size: 14px; line-height: 1.45; }
.money-line.is-due { background: #FFF4D6; }
.money-line.is-paid { background: #E3F5EA; color: #0E5E36; }
.sub-title-sm { font-size: 17px; margin: 22px 0 10px; }
.history { margin: 14px 0 6px; font-size: 14px; }
.history summary { cursor: pointer; font-weight: 700; }
.history ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.6; }
.money-figures .figure b { font-size: clamp(20px, 1.9vw, 26px); line-height: 1.15; }

.wrap > .account-nudge { margin: 0 0 20px; }

/* Inscription organisateur : Instagram et Facebook côte à côte */
.social-pair { display: grid; grid-template-columns: 1fr; gap: 10px; }
.social-pair input { width: 100%; }
.optional { font-weight: 600; color: var(--encre-2); font-size: 12px; margin-left: 6px; }

/* ================= Mobile : finitions ================= */
/* Rien ne doit faire glisser la page sur le côté (Safari iPhone compris) */
html, body { overflow-x: clip; }
@media (max-width: 640px) {
  /* Contenu un peu plus étroit sur téléphone : marges de 20 px de chaque côté */
  .wrap { padding: 0 20px; }
  .topbar { padding: 12px 14px 0; }
  .moments { padding-left: 20px; padding-right: 20px; scroll-padding: 0 20px; }
}
/* Bouton œil pour afficher le mot de passe (ajouté à tous les champs mot de passe) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 50px; box-sizing: border-box; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; border-radius: 12px; display: grid; place-items: center; color: var(--encre-2); padding: 0; }
.pw-eye svg { width: 21px; height: 21px; }
@media (hover: hover) { .pw-eye:hover { background: var(--gris); color: var(--encre); } }
input::-ms-reveal, input::-ms-clear { display: none; }

/* ================= Paramètres ================= */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 8px 0 60px; align-items: start; }
.set-card { background: var(--gris); border-radius: var(--r-l); padding: 26px; display: grid; gap: 14px; margin: 0; }
.set-card h2 { font-size: 22px; }
.set-card input:disabled { opacity: .7; cursor: not-allowed; }
.set-card .check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.set-card .check input { width: 20px; height: 20px; accent-color: var(--rouge); flex: none; }
.set-links { display: flex; flex-wrap: wrap; gap: 10px; }
.set-danger { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--gris-2); }
.set-danger .text-btn { color: var(--rouge); }
.forgot-link { justify-self: end; margin-top: -6px; font-size: 14px; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } .set-card { padding: 22px 18px; } }
/* Icône Paramètres dans le menu */
.nav .nav-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0 !important; border-radius: 50%; }
.nav .nav-icon svg { width: 20px; height: 20px; }
/* Préférence « Réduire les animations » choisie dans les paramètres */
html.reduce-motion { scroll-behavior: auto; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { transition: none !important; animation: none !important; }

/* ================= Menu mobile : une barre fine + bouton « Menu » ================= */
.nav-toggle { display: none; }
.nav-icon .nav-label { display: none; }
@media (max-width: 640px) {
  .topbar-inner { position: relative; border-radius: 999px; padding: 6px 6px 6px 8px; }
  .topbar .logo-face { display: inline-flex; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 9px; border: 0; cursor: pointer;
    background: var(--encre); color: #fff; font-weight: 800; font-size: 14px; padding: 10px 16px 10px 14px; border-radius: 999px;
  }
  .nav-toggle .bars { display: grid; gap: 3px; width: 16px; }
  .nav-toggle .bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .nav-open .nav-toggle .bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav-open .nav-toggle .bars i:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle .bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
  .nav { display: none; }
  .nav-open .nav {
    display: flex; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: #fff; border-radius: 22px; box-shadow: 0 18px 40px rgba(27, 16, 32, .18), 0 0 0 1px rgba(27, 16, 32, .06);
  }
  .nav-open .nav a:not(.btn), .nav-open .nav .linkish { padding: 12px 14px; font-size: 16px; text-align: left; border-radius: 14px; }
  .nav-open .nav .hide-sm { display: block; }
  .nav-open .nav .nav-icon { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: auto; height: auto; padding: 12px 14px !important; border-radius: 14px; }
  .nav-open .nav .nav-label { display: inline; font-weight: 700; font-size: 16px; }
  .nav-open .nav .btn { margin-top: 6px; justify-content: center; padding: 13px; font-size: 15px; }
  .nav-open .nav [data-action="logout"] { color: var(--rouge); }
}
@media (max-width: 640px) { .hero { margin-top: 18px; } }
