/* =====================================================================
   La Taverne : feuille de style unique.
   Pour changer une couleur ou une police, ne toucher QUE le bloc :root.
   ===================================================================== */

:root {
  /* Couleurs officielles */
  --rose-fonce: #ba0054;
  --bleu-petant: #1931e6;
  --jaune-fonce: #f09700;
  --bleu: #102191;
  --rose-clair: #fa87bb;
  --jaune-moyen: #ffbd4a;
  --rose-petard: #f5167a;
  --jaune-pale: #ffd284;

  /* Dégradés : on évite les aplats */
  --degrade-rose: linear-gradient(135deg, var(--rose-petard), var(--rose-fonce));
  --degrade-taverne: linear-gradient(120deg, var(--rose-fonce) 0%, var(--rose-petard) 55%, var(--jaune-fonce) 100%);
  --degrade-anneau: linear-gradient(135deg, var(--rose-petard), var(--jaune-moyen) 50%, var(--bleu-petant));

  /* Neutres */
  --texte: #1c1f33;
  --texte-doux: #5b6078;
  --surface: #ffffff;
  --champ: #f4f5fa;
  --ligne: rgba(16, 33, 145, 0.09);
  --ombre: 0 18px 40px -22px rgba(16, 33, 145, 0.28);

  /* Typo. Pour changer : ici + le lien Google Fonts en haut de chaque page. */
  --police-titre: 'Outfit', sans-serif;
  --police-texte: 'Open Sans', sans-serif;

  --rayon: 22px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1.02rem;
  line-height: 1.6;
  background-color: #fff;
  /* Halos de couleur très légers dans les coins, fixes au défilement */
  background-image:
    radial-gradient(40rem 30rem at -10% -10%, rgba(250, 135, 187, 0.22), transparent 70%),
    radial-gradient(36rem 28rem at 110% 20%, rgba(25, 49, 230, 0.10), transparent 70%),
    radial-gradient(40rem 30rem at 50% 115%, rgba(255, 189, 74, 0.18), transparent 70%);
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: var(--police-titre);
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 400;
  letter-spacing: -0.01em;
}
h2 { font-weight: 500; }
h1 {
  font-size: clamp(2.1rem, 6vw, 3rem);
  background: var(--degrade-taverne);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: 1.5rem; color: var(--bleu); }

main > p { color: var(--texte-doux); }

a { color: var(--bleu-petant); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rose-petard); }

:focus-visible { outline: 2px solid var(--bleu-petant); outline-offset: 3px; border-radius: 6px; }

/* --- En-tête ------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ligne);
  padding: 14px 16px;
}
.entete-contenu {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}
.logo {
  font-family: var(--police-titre);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  background: var(--degrade-rose);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav button {
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--texte-doux);
  background: none;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a:hover, .nav button:hover { background: rgba(245, 22, 122, 0.08); color: var(--rose-fonce); }

/* --- Page --------------------------------------------------------- */

main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 56px;
}

.carte {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 28px 24px;
  margin-bottom: 24px;
}
.carte.jaune,
.carte.rose {
  background:
    linear-gradient(135deg, rgba(255, 210, 132, 0.35), rgba(250, 135, 187, 0.22) 60%, rgba(25, 49, 230, 0.06)),
    var(--surface);
}
.carte.danger { border-color: rgba(186, 0, 84, 0.18); box-shadow: none; }
.carte.danger h2 { color: var(--rose-fonce); }

.petit { font-size: .9rem; color: var(--texte-doux); }

/* --- Formulaires -------------------------------------------------- */

label { display: block; font-weight: 600; font-size: .95rem; margin: 18px 0 6px; }
label.case { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--texte-doux); }
label.case input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--rose-petard); }

input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  font: inherit;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--champ);
  color: var(--texte);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #9a9fb5; }
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--bleu-petant);
  box-shadow: 0 0 0 4px rgba(25, 49, 230, 0.12);
}
textarea { min-height: 120px; resize: vertical; }
input[type="file"] { font: inherit; font-size: .9rem; color: var(--texte-doux); }
input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  margin-right: 12px;
  padding: 8px 16px;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: #fff;
  color: var(--bleu);
  cursor: pointer;
}
.aide { font-size: .85rem; color: var(--texte-doux); margin: 6px 0 0; }

.bouton {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--degrade-rose);
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  margin-top: 22px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(186, 0, 84, 0.7);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.bouton:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 26px -10px rgba(186, 0, 84, 0.75); }
.bouton:active { transform: translateY(0); }
.bouton:disabled { opacity: .55; cursor: wait; transform: none; }

.bouton.secondaire {
  background: #fff;
  color: var(--bleu);
  border: 1px solid rgba(16, 33, 145, 0.16);
  box-shadow: none;
}
.bouton.secondaire:hover { border-color: var(--bleu-petant); color: var(--bleu-petant); }

.bouton.danger {
  background: #fff;
  color: var(--rose-fonce);
  border: 1px solid rgba(186, 0, 84, 0.3);
  box-shadow: none;
}
.bouton.danger:hover { background: rgba(186, 0, 84, 0.06); color: var(--rose-fonce); }

.bouton.petit { padding: 7px 16px; margin-top: 0; font-size: .88rem; }

.ou { margin: 24px 0 0; font-size: .95rem; color: var(--texte-doux); }

/* --- Messages ----------------------------------------------------- */

.message {
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: .95rem;
  color: var(--texte);
  background: rgba(255, 189, 74, 0.16);
  border: 1px solid rgba(240, 151, 0, 0.28);
}
.message[data-type="erreur"] { background: rgba(245, 22, 122, 0.07); border-color: rgba(245, 22, 122, 0.28); color: #8a003e; }
.message[data-type="succes"] { background: rgba(25, 49, 230, 0.06); border-color: rgba(25, 49, 230, 0.22); color: var(--bleu); }

/* --- Profil ------------------------------------------------------- */

.fiche { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.photo {
  width: 132px; height: 132px;
  object-fit: cover;
  border-radius: 50%;
  /* anneau en dégradé */
  border: 4px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--degrade-anneau) border-box;
  flex: none;
}
.photo-vide {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-titre);
  font-size: 3rem;
  color: #fff;
  background: var(--degrade-rose) padding-box, var(--degrade-anneau) border-box;
}
.fiche-texte { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.fiche-texte h1 { margin-bottom: .4em; }
.fiche-texte dl { margin: 0; }
.fiche-texte dt {
  font-family: var(--police-titre);
  font-size: .95rem;
  font-weight: 400;
  color: var(--rose-fonce);
  margin-top: 14px;
}
.fiche-texte dd { margin: 2px 0 0; white-space: pre-line; }

/* --- Admin -------------------------------------------------------- */

.lien-invitation {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .88rem;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--ligne);
  border-radius: 12px;
  padding: 12px 14px;
}
.lien-invitation + .bouton.petit { margin-top: 12px; }
.liste-membres { list-style: none; padding: 0; margin: 0; }
.liste-membres li {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--ligne);
}
.liste-membres li:last-child { border-bottom: 0; }
.etiquette {
  display: inline-block;
  font-size: .75rem; font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  color: #8a5a00;
  background: rgba(255, 189, 74, 0.25);
}
.etiquette.bloquee { color: var(--rose-fonce); background: rgba(245, 22, 122, 0.12); }

/* --- Forums ------------------------------------------------------- */

main.large { max-width: 1080px; }
.nav a[aria-current="page"] { color: var(--rose-fonce); background: rgba(245, 22, 122, 0.08); }

h3 { font-family: var(--police-titre); font-weight: 500; font-size: 1.15rem; color: var(--bleu); margin: 20px 0 8px; }

select {
  width: 100%;
  font: inherit;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--champ);
  color: var(--texte);
}
input[type="number"] {
  width: 120px;
  font: inherit;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--champ);
}

.forums-grille { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .forums-grille { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .forums-grille aside { position: sticky; top: 90px; }
}

.titre-section {
  font-size: .85rem;
  font-family: var(--police-texte);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texte-doux);
  margin: 28px 0 12px;
}
#sections > section:first-child .titre-section { margin-top: 0; }

.liste-espaces { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.carte-espace {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: 18px;
  box-shadow: var(--ombre);
  color: var(--texte);
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.carte-espace:hover { color: var(--texte); transform: translateY(-2px); border-color: rgba(245, 22, 122, 0.3); }
.carte-espace-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.carte-espace-texte strong { font-family: var(--police-titre); font-weight: 500; font-size: 1.1rem; }
.carte-espace-texte .petit { line-height: 1.4; }

.emoji-bulle {
  flex: none;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 210, 132, 0.55), rgba(250, 135, 187, 0.4));
}
.compteur {
  flex: none;
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--bleu);
  background: rgba(25, 49, 230, 0.08);
}

.liste-recentes { list-style: none; margin: 0; padding: 0; }
.liste-recentes li { padding: 12px 0; border-bottom: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 2px; }
.liste-recentes li:last-child { border-bottom: 0; }
.liste-recentes a { font-weight: 600; color: var(--texte); text-decoration: none; }
.liste-recentes a:hover { color: var(--rose-fonce); }

.retour { display: inline-block; margin-bottom: 16px; font-weight: 600; text-decoration: none; color: var(--texte-doux); }
.retour:hover { color: var(--rose-fonce); }

.banniere {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  padding: 28px 24px;
  margin-bottom: 24px;
  border-radius: var(--rayon);
  border: 1px solid var(--ligne);
  background:
    radial-gradient(18rem 12rem at 100% 0%, rgba(25, 49, 230, 0.16), transparent 70%),
    linear-gradient(135deg, rgba(255, 189, 74, 0.45), rgba(245, 22, 122, 0.22));
}
.banniere-emoji {
  font-size: 3rem;
  width: 84px; height: 84px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.75);
  flex: none;
}
.banniere-texte { flex: 1 1 240px; }
.banniere-texte h1 { margin-bottom: .2em; }
.banniere-texte p { margin: 0; color: var(--texte-doux); }
.banniere .bouton { margin-top: 0; }
.banniere .petit { flex-basis: 100%; margin: 0; }

.publication h2 { margin: 14px 0 6px; font-size: 1.35rem; }
.publication h2 a { color: var(--texte); text-decoration: none; }
.publication h2 a:hover { color: var(--rose-fonce); }
.titre-publication {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  margin: 16px 0 8px;
}
.texte-membre { white-space: pre-line; overflow-wrap: anywhere; margin: 8px 0 0; }
.pied-publication {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: .9rem;
  font-weight: 600;
}
.pied-publication a { text-decoration: none; color: var(--bleu); }

/* Réactions : pastilles + palette */
.reactions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.reactions.occupee { opacity: .6; pointer-events: none; }
.reaction {
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--ligne);
  background: #fff;
  color: var(--texte-doux);
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s;
}
.reaction:hover { border-color: rgba(245, 22, 122, 0.4); }
.reaction:active { transform: scale(0.94); }
.reaction.mienne { color: var(--rose-fonce); border-color: rgba(245, 22, 122, 0.35); background: rgba(245, 22, 122, 0.08); }
.reaction.ajouter { color: var(--texte-doux); }
.zone-palette { position: relative; display: inline-block; }
.palette {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 6px);
  left: 0;
  display: flex;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ligne);
  box-shadow: var(--ombre);
  white-space: nowrap;
}
.palette[hidden] { display: none; }
.palette button {
  font-size: 1.35rem;
  line-height: 1;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: transform .12s, background .12s;
}
.palette button:hover { background: rgba(245, 22, 122, 0.08); transform: scale(1.2); }
.epingle {
  display: inline-block;
  margin-bottom: 10px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--rose-fonce);
}
.vide { text-align: center; color: var(--texte-doux); padding: 32px 0; }

.auteur { display: flex; align-items: center; gap: 12px; }
.auteur > div { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.auteur-nom { font-weight: 700; color: var(--texte); text-decoration: none; }
.auteur-nom:hover { color: var(--rose-fonce); }
.auteur-date { flex-basis: 100%; font-size: .82rem; color: var(--texte-doux); }

.avatar {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--police-titre);
  font-size: 1.1rem;
  color: #fff;
  background: var(--degrade-rose);
}

.commentaire {
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--ligne);
}
.commentaire textarea { margin-top: 10px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.actions .bouton { margin-top: 0; }
.bouton-lien {
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--texte-doux);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.bouton-lien:hover { color: var(--rose-fonce); }

.sous-bloc { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--ligne); }

/* --- Menu de gauche ----------------------------------------------- */

.menu {
  position: fixed;
  z-index: 9;
  top: 59px;
  left: 0;
  bottom: 0;
  width: 250px;
  overflow-y: auto;
  padding: 18px 12px 32px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--ligne);
}
.menu-titre {
  margin: 22px 12px 6px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--texte-doux);
}
.menu-lien {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  font: inherit;
  font-size: .95rem;
  text-align: left;
  color: var(--texte);
  text-decoration: none;
  cursor: pointer;
}
.menu-lien:hover { background: rgba(245, 22, 122, 0.07); color: var(--rose-fonce); }
.menu-lien[aria-current="page"] {
  background: linear-gradient(135deg, rgba(245, 22, 122, 0.14), rgba(255, 189, 74, 0.18));
  color: var(--rose-fonce);
  font-weight: 600;
}
.menu-emoji { width: 22px; text-align: center; flex: none; }

.bouton-menu {
  display: none;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(16, 33, 145, 0.16);
  background: #fff;
  color: var(--bleu);
  cursor: pointer;
}

@media (min-width: 1000px) {
  body.avec-menu { padding-left: 250px; }
  body.avec-menu .entete { margin-left: -250px; }
  body.avec-menu .entete-contenu { max-width: none; padding: 0 8px; }
}
@media (max-width: 999px) {
  .menu {
    width: min(300px, 85vw);
    transform: translateX(-100%);
    transition: transform .2s;
    box-shadow: var(--ombre);
    background: #fff;
  }
  .menu.ouvert { transform: translateX(0); }
  .bouton-menu { display: inline-block; flex: none; }
  body.avec-menu .entete-contenu { flex-wrap: nowrap; }
  body.avec-menu .logo { font-size: 1.02rem; }
}

/* --- Accueil ------------------------------------------------------ */

.accueil-bandeau {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  padding: 32px 28px;
  margin-bottom: 28px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(22rem 16rem at 95% 110%, rgba(255, 189, 74, 0.75), transparent 70%),
    radial-gradient(18rem 14rem at 0% 0%, rgba(250, 135, 187, 0.45), transparent 70%),
    linear-gradient(120deg, var(--bleu) 0%, var(--bleu-petant) 45%, var(--rose-petard) 100%);
}
.accueil-bandeau-texte { flex: 1 1 260px; }
.accueil-bandeau h1 {
  background: none;
  color: #fff;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  margin: 0 0 .15em;
}
.accueil-bandeau p { margin: 0; color: rgba(255, 255, 255, 0.88); }
.surtitre {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px !important;
}
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  flex: 1 1 0;
  min-width: 84px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
}
.stat-nombre { display: block; font-family: var(--police-titre); font-size: 1.9rem; line-height: 1.1; }
.stat-libelle { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
@media (max-width: 480px) {
  .accueil-bandeau { padding: 24px 16px; }
  .stats { gap: 8px; width: 100%; }
  .stat { flex: 1 1 auto; min-width: 0; padding: 10px 6px; }
  .stat-libelle { font-size: .6rem; letter-spacing: .02em; }
}

.avatar.grand {
  width: 92px; height: 92px;
  font-size: 2.4rem;
  border: 3px solid rgba(255, 255, 255, 0.85);
}

.accueil-grille { display: grid; gap: 24px; }
@media (min-width: 1100px) {
  .accueil-grille { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
}

.progression {
  height: 10px;
  border-radius: 999px;
  background: var(--champ);
  overflow: hidden;
  margin: 4px 0 10px;
}
.progression span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--degrade-taverne);
  transition: width .4s;
}
.liste-cases { list-style: none; padding: 0; margin: 8px 0 16px; columns: 2; font-size: .95rem; color: var(--texte-doux); }
.liste-cases li.fait { color: var(--texte); }
.liste-cases li { padding: 2px 0; }

/* --- Agenda ------------------------------------------------------- */

input[type="url"], input[type="datetime-local"] {
  width: 100%;
  font: inherit;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--champ);
  color: var(--texte);
}
input[type="url"]:focus, input[type="datetime-local"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--bleu-petant);
  box-shadow: 0 0 0 4px rgba(25, 49, 230, 0.12);
}
.deux-champs { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .deux-champs { grid-template-columns: 1fr 1fr; } }

.evenement { display: flex; gap: 20px; align-items: flex-start; }
.evenement h3 { margin: 0 0 4px; font-size: 1.3rem; color: var(--texte); }
.evenement-corps { flex: 1; min-width: 0; }
.evenement-infos { margin: 0 0 8px; color: var(--texte-doux); font-size: .95rem; white-space: pre-wrap; }
.evenement.passe { opacity: .7; box-shadow: none; }

.description-courte {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lire-suite { margin-top: 4px; color: var(--bleu-petant); }
.publication-repliee {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.evenement-photo {
  flex: none;
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 22px;
  border: 4px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--degrade-anneau) border-box;
}
@media (max-width: 640px) {
  .evenement { flex-wrap: wrap; }
  .evenement-photo { order: -1; width: 100%; height: 200px; }
}

.date-bloc {
  flex: none;
  width: 74px;
  padding: 10px 0;
  border-radius: 18px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, var(--bleu-petant), var(--rose-petard));
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.date-jour-semaine, .date-mois { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.date-jour { font-family: var(--police-titre); font-size: 2rem; }

.qui-vient { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.pile-avatars { display: inline-flex; }
.avatar.mini {
  width: 30px; height: 30px;
  font-size: .8rem;
  border: 2px solid #fff;
  margin-left: -8px;
}
.pile-avatars .avatar.mini:first-child { margin-left: 0; }

.bouton-viens { min-width: 9.5em; }
.bouton-viens:hover { background: #fff; color: var(--rose-fonce); box-shadow: inset 0 0 0 2px var(--rose-fonce); filter: none; }
.etiquette-viens {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--rose-fonce);
  background: linear-gradient(135deg, rgba(245, 22, 122, 0.12), rgba(255, 189, 74, 0.2));
}
.passes { margin-top: 32px; }
.passes summary { cursor: pointer; font-weight: 600; color: var(--texte-doux); margin-bottom: 16px; }

/* --- Messagerie --------------------------------------------------- */

.pastille {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: var(--degrade-rose);
}

.messagerie {
  display: grid;
  gap: 20px;
  height: calc(100vh - 140px);
  min-height: 480px;
}
@media (min-width: 860px) {
  .messagerie { grid-template-columns: 320px minmax(0, 1fr); }
}
.messagerie-liste, .messagerie-fil {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.messagerie-liste { padding: 18px 14px; overflow-y: auto; }
.messagerie-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px 10px; }
.messagerie-entete h1 { font-size: 1.8rem; margin: 0; }
.confidentiel { margin: auto 6px 0; padding-top: 14px; }

.recherche { padding: 0 6px 12px; }
.recherche label { margin-top: 0; }

.liste-conversations { list-style: none; margin: 0; padding: 0; }
.ligne-conversation {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--texte);
  text-decoration: none;
  cursor: pointer;
}
.ligne-conversation:hover { background: rgba(245, 22, 122, 0.06); color: var(--texte); }
.ligne-conversation[aria-current="page"] { background: linear-gradient(135deg, rgba(245, 22, 122, 0.12), rgba(255, 189, 74, 0.16)); }
.ligne-conversation-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ligne-conversation-haut { display: flex; justify-content: space-between; gap: 8px; }
.extrait { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.non-lue strong, .non-lue .extrait { color: var(--texte); font-weight: 700; }

.messagerie-fil { overflow: hidden; }
#fil { display: flex; flex-direction: column; height: 100%; min-height: 0; }
#fil[hidden] { display: none; }
.fil-vide { margin: auto; text-align: center; color: var(--texte-doux); padding: 24px; }
.fil-vide span { font-size: 2.6rem; }
.fil-entete { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--ligne); }
.retour-mobile { display: none; margin: 0; font-size: 1.3rem; }
.fil-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    radial-gradient(20rem 14rem at 100% 100%, rgba(255, 189, 74, 0.10), transparent 70%),
    radial-gradient(20rem 14rem at 0% 0%, rgba(250, 135, 187, 0.10), transparent 70%);
}
.separateur-jour { align-self: center; margin: 10px 0 4px; font-size: .78rem; color: var(--texte-doux); }

.bulle {
  max-width: min(78%, 520px);
  padding: 10px 14px 6px;
  border-radius: 18px;
  overflow-wrap: anywhere;
}
.bulle p { margin: 0; white-space: pre-line; }
.bulle-autre { align-self: flex-start; background: #fff; border: 1px solid var(--ligne); border-bottom-left-radius: 6px; }
.bulle-moi { align-self: flex-end; color: #fff; background: var(--degrade-rose); border-bottom-right-radius: 6px; }
.bulle-moi a { color: #fff; }
.bulle-pied { display: block; margin-top: 4px; font-size: .72rem; opacity: .75; text-align: right; }
.bulle-pied .bouton-lien { font-size: .72rem; color: inherit; }

.fil-envoi { display: flex; gap: 10px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--ligne); }
.fil-envoi textarea { min-height: 48px; max-height: 160px; }
.fil-envoi .bouton { margin: 0; }
#fil-bloquee { padding: 12px 18px; margin: 0; }

/* Téléphone : la liste OU la conversation */
@media (max-width: 859px) {
  .messagerie { height: calc(100vh - 120px); }
  body.fil-ouvert .messagerie-liste { display: none; }
  body:not(.fil-ouvert) .messagerie-fil { display: none; }
  .retour-mobile { display: inline; }
}

/* --- Annuaire ----------------------------------------------------- */

.barre-recherche { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.barre-recherche input[type="search"] {
  flex: 1 1 280px;
  font: inherit;
  padding: 12px 18px;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--ombre);
}
.barre-recherche input[type="search"]:focus { outline: none; border-color: var(--bleu-petant); box-shadow: 0 0 0 4px rgba(25, 49, 230, 0.12); }
.barre-recherche select { flex: 0 0 auto; width: auto; border-radius: 999px; background: #fff; border: 1px solid var(--ligne); }

.grille-membres { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.carte-membre {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 18px 20px;
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.carte-membre h3 { margin: 12px 0 4px; font-size: 1.15rem; color: var(--texte); }
.carte-membre-libelle { margin: 4px 0 0; font-size: .75rem; color: var(--texte-doux); }
.carte-membre-accompagne { margin: 0; color: var(--rose-fonce); font-weight: 600; font-size: .92rem; }
.carte-membre-bio {
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.carte-membre .actions { margin-top: auto; padding-top: 14px; justify-content: center; }
.avatar.moyen {
  width: 84px; height: 84px;
  font-size: 2rem;
  border: 3px solid transparent;
  background: var(--degrade-rose) padding-box, var(--degrade-anneau) border-box;
}
img.avatar.moyen { background: linear-gradient(#fff, #fff) padding-box, var(--degrade-anneau) border-box; }

/* --- Ambiances de notification ------------------------------------ */

.choix-ambiance { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 700px) { .choix-ambiance { grid-template-columns: repeat(3, 1fr); } }
.ambiance {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 18px 16px;
  border: 2px solid var(--ligne);
  border-radius: 18px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ambiance:hover { border-color: rgba(245, 22, 122, 0.35); }
.ambiance input { position: absolute; opacity: 0; pointer-events: none; }
.ambiance-emoji { font-size: 1.8rem; }
.ambiance strong { font-family: var(--police-titre); font-weight: 500; font-size: 1.05rem; }
.ambiance:has(input:checked) {
  border-color: var(--rose-petard);
  background: linear-gradient(135deg, rgba(245, 22, 122, 0.08), rgba(255, 189, 74, 0.14));
}
.ambiance:has(input:focus-visible) { outline: 2px solid var(--bleu-petant); outline-offset: 3px; }

/* Raccourci vers un espace : "#Le zinc" dans un texte */
.raccourci {
  display: inline-block;
  padding: 0 9px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: var(--bleu-petant);
  background: rgba(25, 49, 230, 0.08);
}
.raccourci:hover { color: var(--rose-fonce); background: rgba(245, 22, 122, 0.1); }
.bulle-moi .raccourci { color: #fff; background: rgba(255, 255, 255, 0.22); }

.etapes { margin: 8px 0 12px; padding-left: 22px; line-height: 1.7; }
#bloc-appli .actions, #appli-android { margin-bottom: 8px; }

/* Une fois installée, l'appli tient compte de l'encoche des téléphones */
@media (display-mode: standalone) {
  .entete { padding-top: max(14px, env(safe-area-inset-top)); }
}

/* Écrans tactiles : des zones de clic assez grandes pour un doigt */
@media (pointer: coarse) {
  .bouton-lien { padding: 10px 8px; margin: -4px 0; }
  .retour { padding: 10px 0; margin-bottom: 8px; }
  .auteur-nom { padding: 6px 0; }
  .reaction { padding: 7px 12px; }
  .palette button { padding: 9px; }
  .pied a { display: inline-block; padding: 8px 4px; }
}

/* --- Étiquettes (Bénévole, Testeuse...) ---------------------------- */

.pastille-etiquette {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--bleu);
  background: rgba(25, 49, 230, 0.08);
  white-space: nowrap;
}
.etiquettes-membre { display: flex; flex-wrap: wrap; justify-content: inherit; gap: 6px; margin-top: 8px; }
.carte-membre .etiquettes-membre { justify-content: center; }
.fiche-texte .etiquettes-membre { margin: -4px 0 8px; }
.liste-etiquettes { display: flex; flex-wrap: wrap; gap: 8px; }
.retirer-etiquette {
  font: inherit;
  font-weight: 700;
  line-height: 1;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--texte-doux);
  cursor: pointer;
}
.retirer-etiquette:hover { color: var(--rose-fonce); }
select.ajouter-etiquette {
  width: auto;
  padding: 2px 10px;
  font-size: .8rem;
  border-radius: 999px;
  border: 1px dashed rgba(16, 33, 145, 0.25);
  background: #fff;
}
.bloc-lien { padding: 4px 0 14px; border-bottom: 1px solid var(--ligne); }
.bloc-lien:last-child { border-bottom: 0; }
.bloc-lien h3 { margin: 12px 0 8px; }
.bloc-lien .actions { margin-top: 10px; }

.filtres-etiquettes { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.filtre-etiquette {
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--ligne);
  background: #fff;
  color: var(--texte-doux);
  cursor: pointer;
}
.filtre-etiquette[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--degrade-rose); }

/* --- Pied de page ------------------------------------------------- */

.pied {
  border-top: 1px solid var(--ligne);
  padding: 22px 16px;
  text-align: center;
  font-size: .88rem;
}
.pied a { color: var(--texte-doux); margin: 0 10px; text-decoration: none; }
.pied a:hover { color: var(--rose-fonce); }

[hidden] { display: none !important; }

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