/* =========================================================
   Bosangani – styles
   Thème clair par défaut ; thème sombre via [data-theme="sombre"]
   ========================================================= */
:root {
  --encre: #1b1f5e;
  --texte: #1d2040;
  --discret: #6b7090;
  --fond: #f7f9fd;
  --surface: #ffffff;
  --surface-2: #f4f5fa;
  --ligne: #dfe3ef;
  --indigo: #1a1fa8;
  --violet: #6a00f4;
  --bleu: #8aa4f0;
  --orange: #f4a46a;
  --erreur: #c62839;
  --erreur-fond: #fdebed;
  --avatar-fond: #e8e9fb;
  --avatar-texte: #1a1fa8;
  --ombre: rgba(30, 40, 100, .09);
  --ecran-bureau: rgba(255, 255, 255, .55);
  --blob1: #d8defb; --blob2: #e7d8fb; --blob3: #fddfc4; --blob4: #fde3d4; --blob5: #d0efdf;
  --police: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

:root[data-theme="sombre"] {
  --encre: #dfe3ff;
  --texte: #e8e9f7;
  --discret: #9a9fc4;
  --fond: #0f1126;
  --surface: #1b1e3b;
  --surface-2: #252950;
  --ligne: #333864;
  --indigo: #4a50e0;
  --violet: #8a3dff;
  --bleu: #5b6fc4;
  --orange: #c9803f;
  --erreur: #ff9aa8;
  --erreur-fond: #3b1d27;
  --avatar-fond: #2d3270;
  --avatar-texte: #c3c7ff;
  --ombre: rgba(0, 0, 0, .35);
  --ecran-bureau: rgba(20, 22, 48, .72);
  --blob1: #1d2250; --blob2: #2a1d55; --blob3: #3a2a1a; --blob4: #3a2320; --blob5: #173a2c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100dvh;
  font-family: var(--police);
  color: var(--texte);
  background:
    radial-gradient(280px 240px at 0% 0%, var(--blob1) 0%, transparent 70%),
    radial-gradient(190px 230px at 100% 28%, var(--blob2) 0%, transparent 70%),
    radial-gradient(210px 270px at 100% 50%, var(--blob3) 0%, transparent 70%),
    radial-gradient(160px 210px at 0% 62%, var(--blob4) 0%, transparent 70%),
    radial-gradient(250px 210px at 100% 100%, var(--blob5) 0%, transparent 70%),
    var(--fond);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
}

.ecran {
  width: 100%;
  max-width: 420px;
  min-height: 100dvh;
  padding: 56px 24px 32px;
  display: flex;
  flex-direction: column;
}

[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Décor : confettis en haut, quartier en bas ---------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("../assets/confettis.svg") center / cover no-repeat;
}
body::after {
  content: "";
  position: fixed; left: 0; right: 0; bottom: 0;
  height: clamp(150px, 26vw, 230px);
  z-index: -1; pointer-events: none;
  background: url("../assets/quartier.svg") center bottom / auto 100% repeat-x;
}
:root[data-theme="sombre"] body::after { filter: brightness(.45) saturate(.8); }
:root[data-theme="sombre"] body::before { opacity: .6; }

/* ---------- En-tête de marque (pages de connexion, inscription…) ---------- */
.marque { text-align: center; margin-bottom: 36px; }

.marque h1 {
  margin: 0;
  font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--encre); line-height: 1.1;
}

.marque .slogan {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px;
  font-size: 0.85rem; line-height: 1.25; text-align: left;
  color: var(--texte);
}
.marque .slogan img { width: 56px; height: auto; flex: none; }

.marque.grand img { display: block; width: 190px; margin: 6px auto 0; }
.marque.haut { margin-bottom: 20px; }
.marque.haut img { display: block; width: 120px; margin: 0 auto 6px; }
.marque.haut h1 { font-size: 2rem; }

h2 { margin: 0 0 6px; text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--texte); }
.intro { margin: 0 0 24px; text-align: center; color: var(--texte); font-size: 0.95rem; line-height: 1.4; }

/* ---------- Formulaires ---------- */
form { display: flex; flex-direction: column; }

label.etiquette { font-weight: 600; font-size: 0.9rem; margin: 0 0 8px 2px; }

.champ {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 54px; margin-bottom: 18px; padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(90deg, var(--bleu), var(--orange)) border-box;
  transition: box-shadow .15s;
}
.champ:focus-within { box-shadow: 0 0 0 3px rgba(138, 61, 255, .22); }
.champ.invalide {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(90deg, var(--erreur), var(--erreur)) border-box;
}

.champ svg { width: 20px; height: 20px; flex: none; stroke: var(--discret); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.champ input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 0.95rem; color: var(--texte);
}
.champ input::placeholder { color: var(--discret); opacity: .8; }

.oeil { border: 0; background: none; padding: 4px; cursor: pointer; display: flex; }
.oeil:focus-visible { outline: 2px solid var(--violet); border-radius: 6px; }

.erreur-champ { margin: -12px 0 14px 4px; font-size: 0.8rem; color: var(--erreur); }

.alerte {
  display: none;
  margin: 0 0 16px; padding: 12px 14px;
  border-radius: 14px;
  background: var(--erreur-fond); color: var(--erreur);
  font-size: 0.88rem; line-height: 1.35;
}
.alerte.visible { display: block; }

/* ---------- Boutons ---------- */
.bouton {
  height: 54px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  box-shadow: 0 10px 22px rgba(60, 20, 200, .28);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.bouton:hover { transform: translateY(-1px); }
.bouton:active { transform: translateY(1px); box-shadow: 0 5px 12px rgba(60, 20, 200, .28); }
.bouton:focus-visible { outline: 3px solid var(--surface); outline-offset: 2px; box-shadow: 0 0 0 6px var(--violet); }
.bouton[disabled] { opacity: .65; cursor: wait; }
.bouton.clair { background: var(--surface); color: var(--encre); box-shadow: none; border: 1px solid var(--ligne); }
.bouton.petit { height: 42px; padding: 0 16px; font-size: .88rem; box-shadow: none; }
a.bouton { display: flex; align-items: center; justify-content: center; text-decoration: none; }

.lien { color: var(--encre); font-weight: 700; text-decoration: none; }
.lien:hover { text-decoration: underline; }
.oublie { display: block; margin: 18px auto 0; font-size: 0.9rem; text-align: center; }

.separateur { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; font-size: 0.85rem; color: var(--texte); }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }

.reseaux { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.reseau {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px;
  border: 1px solid var(--ligne); border-radius: 999px;
  background: var(--surface);
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--texte);
  cursor: pointer;
}
.reseau svg { width: 22px; height: 22px; }
.reseau:focus-visible { outline: 2px solid var(--violet); }

.pied { margin-top: auto; padding-top: 32px; text-align: center; font-size: 0.9rem; }

.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 999px;
  background: var(--encre); color: var(--fond);
  font-size: .88rem; text-align: center;
  opacity: 0; pointer-events: none; z-index: 50;
  transition: opacity .2s, transform .2s;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Centres d'intérêt ---------- */
.interets { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.interet { position: relative; display: block; cursor: pointer; }
.interet input { position: absolute; opacity: 0; inset: 0; }

.interet .carte {
  display: flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 18px;
  border: 1.5px solid transparent; border-radius: 18px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(var(--surface), var(--surface)) border-box;
  box-shadow: 0 6px 16px var(--ombre);
  font-weight: 500;
  transition: box-shadow .15s;
}
.interet .emoji { font-size: 1.5rem; line-height: 1; }
.interet .nom { flex: 1; }

.interet .rond { width: 28px; height: 28px; border-radius: 50%; background: var(--ligne); display: grid; place-items: center; transition: background .15s; }
.interet .rond svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }

.interet input:checked + .carte {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(90deg, var(--indigo), var(--orange)) border-box;
}
.interet input:checked + .carte .rond { background: var(--violet); }
.interet input:checked + .carte .rond svg { opacity: 1; }
.interet input:focus-visible + .carte { box-shadow: 0 0 0 3px rgba(138, 61, 255, .4); }

.interets.compact { gap: 10px; margin-bottom: 18px; }
.interets.compact .carte { height: 50px; }

/* ---------- Page de bienvenue ---------- */
.photo-bienvenue { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 28px; box-shadow: 0 14px 30px var(--ombre); }
.message-bienvenue { margin: 26px 4px 28px; text-align: center; font-size: 1.15rem; font-weight: 700; line-height: 1.5; color: var(--texte); }

/* =========================================================
   Application (accueil.html)
   ========================================================= */
.ecran.flux { padding-top: 18px; padding-bottom: 150px; }

/* ----- En-tête de l'application ----- */
.entete { margin-bottom: 18px; }
.marque-ligne { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.marque-ligne img { width: 38px; height: auto; }
.marque-ligne span { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; color: var(--encre); }

.barre-profil { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chip-profil {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 5px 14px 5px 5px;
  border-radius: 999px; border: 1px solid var(--ligne);
  background: var(--surface);
  color: var(--texte); text-decoration: none;
}
.chip-profil strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-profil:hover { border-color: var(--violet); }

.bouton-icone {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--ligne);
  background: var(--surface); color: var(--encre);
}
.bouton-icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bouton-icone:hover, .bouton-icone[aria-current="page"] { border-color: var(--violet); }

.onglets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 12px; border-bottom: 2px solid var(--ligne); }
.onglet {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px;
  border: 1.5px solid transparent; border-radius: 999px;
  color: var(--discret); text-decoration: none;
  font-weight: 700; font-size: .95rem;
}
.onglet svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.onglet:hover { color: var(--encre); }
.onglet[aria-current="page"] { color: var(--encre); background: var(--surface); border-color: var(--violet); box-shadow: 0 4px 12px var(--ombre); }
.onglet:focus-visible, .chip-profil:focus-visible, .bouton-icone:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.vue { animation: apparition .18s ease-out; }
@keyframes apparition { from { opacity: 0; } to { opacity: 1; } }
.flux h2 { margin-top: 4px; }

.retour { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--encre); font-weight: 700; font-size: .9rem; text-decoration: none; }
.retour:hover { text-decoration: underline; }

/* ----- Avatars ----- */
.avatar {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 50%;
  background: var(--avatar-fond); color: var(--avatar-texte);
  font-size: .8rem; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.petit { width: 32px; height: 32px; font-size: .72rem; }
.avatar.grand { width: 112px; height: 112px; font-size: 2.2rem; box-shadow: 0 8px 22px var(--ombre); }
a.lien-profil { display: inline-flex; text-decoration: none; color: inherit; border-radius: 50%; }
a.lien-profil:focus-visible, a.nom-lien:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
a.nom-lien { color: inherit; text-decoration: none; }
a.nom-lien:hover { text-decoration: underline; }

/* ----- Fil du quartier (Home) ----- */
.nouvelle {
  background: var(--surface);
  border: 1px solid var(--ligne); border-radius: 22px;
  padding: 16px; margin-bottom: 26px;
  box-shadow: 0 8px 22px var(--ombre);
}
.nouvelle h3, .titre-liste {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  font-size: .95rem; font-weight: 700; color: var(--texte);
}
.nouvelle h3 svg, .titre-liste svg { width: 18px; height: 18px; fill: none; stroke: var(--encre); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.titre-liste { padding-bottom: 12px; border-bottom: 1px solid var(--ligne); }

.types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.type { position: relative; cursor: pointer; }
.type input { position: absolute; opacity: 0; inset: 0; }
.type span, .badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--b); background: var(--f); color: var(--c);
  font-size: .85rem; font-weight: 700;
}
.type span { opacity: .6; transition: opacity .12s, box-shadow .12s; }
.type input:checked + span { opacity: 1; box-shadow: 0 0 0 2px var(--b); }
.type input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }

.t-demande  { --c: #b65f00; --f: #fff1dd; --b: #f6c57f; }
.t-probleme { --c: #c2415f; --f: #fde8ee; --b: #f4b9c9; }
.t-annonce  { --c: #1f78a8; --f: #e6f3fb; --b: #b6dcf3; }
:root[data-theme="sombre"] .t-demande  { --c: #ffc47a; --f: #3d2a12; --b: #7a5420; }
:root[data-theme="sombre"] .t-probleme { --c: #ff9db6; --f: #411c29; --b: #7d3550; }
:root[data-theme="sombre"] .t-annonce  { --c: #8fd0f5; --f: #14313f; --b: #2f6a8a; }

.saisie, .nouvelle textarea, .reponse-form input {
  width: 100%;
  border: 1px solid var(--ligne); border-radius: 14px;
  background: var(--surface); color: var(--texte);
  font: inherit; font-size: .92rem;
}
.saisie { height: 46px; padding: 0 14px; margin-bottom: 12px; }
textarea.saisie { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
select.saisie { cursor: pointer; }
.nouvelle textarea { min-height: 96px; padding: 12px 14px; margin-bottom: 14px; resize: vertical; }
.saisie::placeholder, .nouvelle textarea::placeholder, .reponse-form input::placeholder { color: var(--discret); opacity: .85; }
.saisie:focus, .nouvelle textarea:focus, .reponse-form input:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(138, 61, 255, .2); }
.nouvelle .bouton { display: flex; align-items: center; justify-content: center; gap: 10px; }
.nouvelle .bouton svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pub, .evt {
  background: var(--surface);
  border: 1px solid var(--ligne); border-radius: 20px;
  padding: 16px; margin-bottom: 16px;
  box-shadow: 0 6px 16px var(--ombre);
}
.pub-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pub-qui { flex: 1; min-width: 0; line-height: 1.25; }
.pub-qui strong { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-qui small { color: var(--discret); font-size: .78rem; }
.badge { padding: 5px 11px; font-size: .78rem; flex: none; }
.pub-texte { margin: 0 0 14px; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }

.reponses { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: .88rem; line-height: 1.45; }
.reponses p { margin: 0 0 6px; overflow-wrap: anywhere; }
.reponses p:last-child { margin-bottom: 0; }

.reponse-form { display: flex; flex-direction: row; gap: 8px; }
.reponse-form input { height: 42px; padding: 0 14px; border-radius: 12px; }
.reponse-form .bouton { height: 42px; padding: 0 16px; border-radius: 12px; font-size: .85rem; box-shadow: none; flex: none; }

.vide { text-align: center; padding: 28px 12px; color: var(--discret); font-size: .92rem; line-height: 1.5; }
.vide .bouton { margin-top: 16px; padding: 0 22px; }
#fil, #fil-evt { margin-bottom: 8px; }

/* ----- Communauté ----- */
.sous-onglets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin-bottom: 18px; border-radius: 999px; background: var(--surface-2); }
.sous-onglets button {
  height: 40px; border: 0; border-radius: 999px;
  background: transparent; color: var(--discret);
  font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
}
.sous-onglets button[aria-selected="true"] { background: var(--surface); color: var(--encre); box-shadow: 0 2px 8px var(--ombre); }
.sous-onglets button:focus-visible { outline: 2px solid var(--violet); }

.barre-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.barre-actions select { flex: 1; min-width: 0; margin: 0; }
.barre-actions .bouton { flex: none; }

.form-evt { background: var(--surface); border: 1px solid var(--ligne); border-radius: 22px; padding: 16px; margin-bottom: 20px; box-shadow: 0 8px 22px var(--ombre); }
.form-evt h3 { margin: 0 0 14px; font-size: .95rem; }
.form-evt label.etiquette { font-size: .82rem; margin-bottom: 6px; display: block; }

.choix-image { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.choix-image .bouton { flex: none; }
.apercu { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-bottom: 14px; display: block; }

.evt { padding: 0; overflow: hidden; }
.evt-image { display: block; width: 100%; max-height: 260px; object-fit: cover; background: var(--surface-2); }
.evt-corps { padding: 16px; }
.evt-comm { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; font-weight: 700; color: var(--encre); }
.evt-titre { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; line-height: 1.3; color: var(--texte); overflow-wrap: anywhere; }
.evt-infos { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: .88rem; color: var(--texte); }
.evt-infos .passe { color: var(--discret); }
.evt-desc { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.evt-auteur { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: .8rem; color: var(--discret); }
.evt-auteur strong { color: var(--texte); }
.evt-actions { margin-bottom: 14px; }
.btn-participe {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--violet);
  background: transparent; color: var(--violet);
  font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
}
.btn-participe[aria-pressed="true"] { background: var(--violet); color: #fff; }
.btn-participe:focus-visible { outline: 3px solid var(--surface); box-shadow: 0 0 0 5px var(--violet); }
:root[data-theme="sombre"] .btn-participe { color: #c9a8ff; border-color: var(--violet); }
:root[data-theme="sombre"] .btn-participe[aria-pressed="true"] { color: #fff; }

.comm {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 18px;
  box-shadow: 0 6px 16px var(--ombre);
}
.comm.membre { border-color: var(--violet); }
.comm-emoji { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); font-size: 1.5rem; }
.comm-info { flex: 1; min-width: 0; line-height: 1.3; }
.comm-info strong { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-info small { color: var(--discret); font-size: .78rem; }
.comm .bouton { height: 38px; padding: 0 16px; font-size: .82rem; box-shadow: none; flex: none; }
.comm .auto { flex: none; font-size: .75rem; font-weight: 700; color: var(--discret); text-align: right; max-width: 84px; line-height: 1.2; }

/* ----- Profil ----- */
.profil-tete { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; text-align: center; }
.profil-tete h2 { margin: 0; }
.profil-tete .detail { color: var(--discret); font-size: .9rem; }
.photo-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.photo-actions .bouton { height: 40px; padding: 0 16px; font-size: .85rem; box-shadow: none; display: inline-flex; align-items: center; justify-content: center; }
.profil-section { margin-bottom: 22px; }
.profil-section h3 { margin: 0 0 12px; font-size: .95rem; }
.note { margin: 0 0 18px; text-align: center; color: var(--discret); font-size: .82rem; line-height: 1.45; }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pastille { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--ligne); font-size: .88rem; }
.lecture-seule { margin: -6px 0 18px 2px; font-size: .8rem; color: var(--discret); }

/* ----- Paramètres ----- */
.reglages { list-style: none; margin: 0 0 20px; padding: 0; background: var(--surface); border: 1px solid var(--ligne); border-radius: 20px; overflow: hidden; box-shadow: 0 6px 16px var(--ombre); }
.reglages li + li { border-top: 1px solid var(--ligne); }
.ligne-reglage {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 60px; padding: 0 18px;
  border: 0; background: transparent; color: var(--texte);
  font: inherit; font-weight: 600; font-size: .95rem; text-align: left; text-decoration: none; cursor: pointer;
}
.ligne-reglage svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ligne-reglage .libelle { flex: 1; }
.ligne-reglage .fleche { width: 18px; height: 18px; color: var(--discret); }
.ligne-reglage:hover { background: var(--surface-2); }
.ligne-reglage:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.ligne-reglage.danger { color: var(--erreur); }

.interrupteur { position: relative; width: 52px; height: 30px; flex: none; border: 0; border-radius: 999px; background: var(--ligne); cursor: pointer; transition: background .15s; }
.interrupteur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); transition: transform .15s; }
.interrupteur[aria-checked="true"] { background: var(--violet); }
.interrupteur[aria-checked="true"]::after { transform: translateX(22px); }
.interrupteur:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }

@media (min-width: 600px) {
  .ecran { min-height: auto; margin: 6vh 0; padding-top: 48px; background: var(--ecran-bureau); border-radius: 32px; box-shadow: 0 20px 50px var(--ombre); }
  .ecran.flux { padding-top: 24px; }
}

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

/* =========================================================
   Animations
   ========================================================= */

/* ----- Étoiles qui flottent et scintillent en arrière-plan ----- */
.etoiles { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.etoile {
  position: absolute;
  width: var(--t); height: var(--t);
  background: var(--c);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: .5;
  will-change: transform, opacity;
  animation:
    flotter var(--flotte) ease-in-out var(--retard) infinite alternate,
    scintiller var(--brille) ease-in-out var(--retard) infinite alternate;
}
.etoile.disque { clip-path: circle(50%); width: calc(var(--t) * .55); height: calc(var(--t) * .55); }
@keyframes flotter { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(var(--dx), var(--dy)) rotate(160deg); } }
@keyframes scintiller { from { opacity: .15; scale: .75; } to { opacity: .8; scale: 1.15; } }
:root[data-theme="sombre"] .etoile { opacity: .6; }

/* ----- Entrée et sortie des pages (swish) ----- */
@keyframes entreeEcran { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes sortieEcran { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-28px); } }
@keyframes monter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ecran { animation: entreeEcran .4s cubic-bezier(.2, .8, .2, 1) both; }
.ecran.sortie { animation: sortieEcran .22s ease-in both; pointer-events: none; }

.ecran:not(.flux) > * { animation: monter .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 90ms); }
.ecran:not(.flux) > :nth-child(1) { --i: 0; }
.ecran:not(.flux) > :nth-child(2) { --i: 1; }
.ecran:not(.flux) > :nth-child(3) { --i: 2; }
.ecran:not(.flux) > :nth-child(4) { --i: 3; }
.ecran:not(.flux) > :nth-child(5) { --i: 4; }
.ecran:not(.flux) > :nth-child(6) { --i: 5; }
.ecran:not(.flux) > :nth-child(7) { --i: 6; }

/* ----- Changement de vue dans l'application : glissement dans le sens de la navigation ----- */
@keyframes glisserDroite { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes glisserGauche { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.vue.de-droite { animation: glisserDroite .34s cubic-bezier(.2, .8, .2, 1) both; }
.vue.de-gauche { animation: glisserGauche .34s cubic-bezier(.2, .8, .2, 1) both; }
#sous-evenements, #sous-communautes { animation: monter .3s ease-out both; }

/* ----- Cartes qui arrivent ----- */
@keyframes monterCarte { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
.nouveau { animation: monterCarte .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }

/* ----- Appui sur un bouton : ondulation + rebond ----- */
.bouton, .onglet, .btn-participe, .reseau, .ligne-reglage, .sous-onglets button, .bouton-icone, .chip-profil {
  position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .15s, background .2s, border-color .2s, color .2s, opacity .12s;
}
.ondulation {
  position: absolute; border-radius: 50%;
  background: currentColor; opacity: .3;
  transform: scale(0); pointer-events: none;
  animation: onde .65s ease-out forwards;
}
@keyframes onde { to { transform: scale(1); opacity: 0; } }

.bouton:active { transform: scale(.96); box-shadow: 0 5px 12px rgba(60, 20, 200, .28); }
.onglet:active, .sous-onglets button:active, .ligne-reglage:active, .reseau:active, .chip-profil:active { transform: scale(.96); }
.bouton-icone:active { transform: scale(.9) rotate(30deg); }
.btn-participe:active { transform: scale(.92); }
.interet .carte { transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .15s; }
.interet:active .carte { transform: scale(.97); }

@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.2); } 100% { transform: scale(1); } }
.btn-participe.pop { animation: pop .4s ease-out; }

@keyframes cocher { from { transform: scale(0) rotate(-40deg); } 60% { transform: scale(1.3) rotate(8deg); } to { transform: scale(1) rotate(0); } }
.interet input:checked + .carte .rond { animation: pop .32s ease-out; }
.interet input:checked + .carte .rond svg { animation: cocher .34s ease-out; }

@keyframes respirer { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.marque.grand img, .marque.haut img, .marque .slogan img, .marque-ligne img { animation: respirer 3.6s ease-in-out infinite; }

/* ----- Confirmation de suppression ----- */
.modale-fond {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: rgba(10, 12, 40, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: fondEntree .18s ease-out both;
}
.modale-fond.ferme { animation: fondSortie .16s ease-in both; }
.modale {
  width: 100%; max-width: 340px; padding: 22px;
  border-radius: 24px; border: 1px solid var(--ligne);
  background: var(--surface); color: var(--texte);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  animation: modaleEntree .3s cubic-bezier(.2, 1.3, .4, 1) both;
}
.modale-fond.ferme .modale { animation: modaleSortie .16s ease-in both; }
.modale h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--texte); }
.modale p { margin: 0 0 20px; color: var(--discret); font-size: .92rem; line-height: 1.45; }
.modale-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modale-actions .bouton { height: 46px; font-size: .92rem; box-shadow: none; }
.bouton.danger { background: linear-gradient(90deg, #d62839, #ef476f); box-shadow: 0 8px 18px rgba(214, 40, 57, .3); }
@keyframes fondEntree { from { opacity: 0; } to { opacity: 1; } }
@keyframes fondSortie { from { opacity: 1; } to { opacity: 0; } }
@keyframes modaleEntree { from { opacity: 0; transform: translateY(24px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes modaleSortie { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.95); } }

/* ----- Supprimer sa publication ----- */
.btn-suppr {
  position: relative; overflow: hidden;
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--discret);
  cursor: pointer;
  transition: color .15s, background .15s, transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.btn-suppr svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-suppr:hover, .btn-suppr:focus-visible { color: var(--erreur); background: var(--erreur-fond); }
.btn-suppr:focus-visible { outline: 2px solid var(--erreur); outline-offset: 1px; }
.btn-suppr:active { transform: scale(.85); }
.evt-auteur .btn-suppr { margin-left: auto; }

.disparait {
  animation: none !important;
  height: 0 !important; opacity: 0;
  transform: translateX(-60px) scale(.96);
  margin-top: 0 !important; margin-bottom: 0 !important;
  padding-top: 0 !important; padding-bottom: 0 !important;
  border-width: 0; overflow: hidden;
  transition: height .3s ease, opacity .22s ease, transform .3s ease, margin .3s ease, padding .3s ease;
}

/* ----- Avis, mot de passe, « mot de passe oublié » ----- */
.note-etoiles { border: 0; margin: 0 0 18px; padding: 0; text-align: center; }
.note-etoiles legend { width: 100%; margin: 0 0 10px; font-weight: 700; font-size: .95rem; color: var(--texte); }
.etoiles-choix { display: flex; justify-content: center; gap: 6px; }
.etoiles-choix label { position: relative; display: block; cursor: pointer; border-radius: 12px; }
.etoiles-choix input { position: absolute; opacity: 0; inset: 0; }
.etoiles-choix svg { display: block; width: 46px; height: 46px; fill: none; stroke: var(--discret); stroke-width: 1.4; stroke-linejoin: round; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), fill .15s, stroke .15s; }
.etoiles-choix label:hover svg { transform: scale(1.12); }
.etoiles-choix label.plein svg { fill: #ffb703; stroke: #e09600; }
.etoiles-choix label.pop svg { animation: pop .38s ease-out; }
.etoiles-choix label:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }
.note-texte { min-height: 1.4em; margin: 8px 0 0; font-size: .85rem; color: var(--discret); }
#form-avis textarea.saisie { margin-bottom: 14px; }
#form-avis .etiquette { display: block; margin-bottom: 8px; }

.merci { text-align: center; padding: 30px 16px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 22px; box-shadow: 0 8px 22px var(--ombre); animation: monterCarte .5s cubic-bezier(.2, .8, .2, 1) both; }
.merci h3 { margin: 10px 0 6px; font-size: 1.15rem; color: var(--texte); }
.merci p { margin: 0; color: var(--discret); font-size: .92rem; line-height: 1.5; }
.merci-etoile { font-size: 3rem; line-height: 1; animation: pop .6s ease-out; }

button.lien { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.info-oublie { margin: 14px 0 0; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--ligne); font-size: .88rem; line-height: 1.5; text-align: center; color: var(--texte); animation: monter .3s ease-out both; }
.info-oublie p { margin: 0 0 12px; }
.info-oublie a.bouton { height: 46px; font-size: .9rem; box-shadow: none; }
