/* =====================================================================
   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: inline-block;
  margin-top: 14px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--bleu);
}
.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); }

/* --- 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; }
}
