/* ==========================================================================
   CS Team - feuille de style
   Couleurs tirées du médaillon : bleu nuit, vert de l'arche, or du soleil.
   Police Nunito (arrondie), hébergée sur le site.
   ========================================================================== */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/nunito-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/nunito-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --nuit: #1b2a4e; --nuit-2: #2a3d6e; --canal: #2c8f65; --canal-clair: #dcf1e5; --arche: #8fd3ad;
  --soleil: #f3b63f; --soleil-clair: #fdf1d6; --rouge: #c8323f;
  --encre: #1b2238; --encre-2: #4a5570; --discret: #6b7690; --ligne: #e1e7e4; --brume: #f1f5f3; --papier: #ffffff;
  --ok: #1e8a50; --ok-fond: #dff2e7; --err: #c0392b; --err-fond: #fbe4e1;
  --rayon: 22px; --ombre: 0 10px 30px -22px rgba(27, 42, 78, .55);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 17px; line-height: 1.55; background: var(--brume); color: var(--encre); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; }
a { color: var(--nuit-2); text-underline-offset: 3px; }
h1 { font-size: 1.85rem; line-height: 1.15; font-weight: 900; letter-spacing: -.01em; margin: 0 0 .5rem; color: var(--nuit); }
h2 { font-size: 1.3rem; line-height: 1.2; font-weight: 800; margin: 0 0 .8rem; color: var(--nuit); }
p { margin: 0 0 .9rem; }
small, .discret { color: var(--discret); font-size: .9rem; }
.centre { text-align: center; }
.masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 2px; border-radius: 8px; }
.ico { width: 24px; height: 24px; flex: none; }

/* ---------- Barre du haut ---------- */
.haut { background: var(--nuit); color: #fff; display: flex; align-items: center; gap: 14px; padding: 8px 20px; position: sticky; top: 0; z-index: 30; }
.marque { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.2rem; }
.marque img { border-radius: 50%; background: #fff; }
.liens-publics { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.lien-haut { color: #fff; font-weight: 800; text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.lien-haut:hover, .lien-haut.actif { background: var(--nuit-2); }
.onglets { margin-left: auto; display: flex; gap: 2px; }
.onglets a { position: relative; display: flex; align-items: center; gap: 6px; color: #d9e0f2; text-decoration: none; padding: 9px 11px; border-radius: 999px; font-weight: 700; font-size: .98rem; }
.onglets a:hover { background: var(--nuit-2); color: #fff; }
.onglets a.actif { background: #fff; color: var(--nuit); }
.onglets .ico { width: 21px; height: 21px; }
.lien-admin { color: var(--soleil); font-weight: 800; text-decoration: none; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.lien-admin:hover, .lien-admin.actif { background: var(--nuit-2); }
.pastille { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--rouge); color: #fff; font-size: .78rem; font-weight: 800; text-align: center; line-height: 22px; font-style: normal; }

/* ---------- Structure ---------- */
main { width: 100%; max-width: 760px; margin: 0 auto; padding: 26px 16px 48px; flex: 1; }
body.large main { max-width: 860px; }
body > footer { text-align: center; padding: 20px 16px; color: var(--discret); font-size: .9rem; }
.carte { background: var(--papier); border-radius: var(--rayon); padding: 22px; margin-bottom: 18px; box-shadow: var(--ombre); }
.carte.alerte { box-shadow: 0 0 0 2px var(--soleil), var(--ombre); }
.etroit { max-width: 540px; margin-left: auto; margin-right: auto; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.entete h1 { margin: 0; }
.entete.personne { justify-content: flex-start; gap: 16px; }
.retour { margin-bottom: 10px; font-weight: 700; }
.retour a { text-decoration: none; }
.vide { text-align: center; color: var(--discret); padding: 28px 12px; margin: auto 0; font-size: 1.05rem; }

/* ---------- Accueil public ---------- */
.hero { position: relative; background: #fff; overflow: hidden; }
.hero-in { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 44px 20px 96px; display: flex; align-items: center; gap: 40px; }
.hero-logo { width: 220px; height: 220px; flex: none; border-radius: 50%; box-shadow: 0 18px 40px -24px rgba(27, 42, 78, .7); }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); line-height: 1; margin-bottom: .35em; }
.devise { font-size: 1.3rem; line-height: 1.35; color: var(--encre-2); font-weight: 600; max-width: 26ch; margin-bottom: 1.4rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.arche { position: absolute; left: -5%; bottom: -1px; width: 110%; height: 90px; display: block; }
.arche .sol { fill: var(--brume); }
.arche .trait { fill: none; stroke: var(--arche); stroke-width: 5; stroke-linecap: round; }
main.accueil { max-width: 860px; padding-top: 6px; }
main.pages { max-width: 860px; }
.bloc { margin-bottom: 44px; }
.bloc h2, .rejoindre h2 { font-size: 1.7rem; font-weight: 900; }
.recit p { max-width: 64ch; font-size: 1.08rem; }
.billets { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.billet { background: #fff; border-radius: 20px; padding: 16px 18px; box-shadow: var(--ombre); display: flex; flex-direction: column; border-bottom: 5px solid var(--arche); }
.billet-jour { font-weight: 800; color: var(--encre-2); }
.billet-heure { font-size: 2.2rem; font-weight: 900; line-height: 1.1; color: var(--nuit); }
.billet.prochain { background: var(--nuit); border-bottom-color: var(--soleil); }
.billet.prochain .billet-jour { color: #cfd8ee; }
.billet.prochain .billet-heure { color: #fff; }
.billet-note { margin-top: 6px; color: var(--soleil); font-weight: 800; font-size: .92rem; }
.rdv-texte p { color: var(--encre-2); font-size: 1.05rem; }
.rejoindre { background: var(--nuit); color: #fff; border-radius: 28px; padding: 30px 28px; margin-bottom: 44px; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.rejoindre h2 { color: #fff; margin-bottom: .2rem; }
.rejoindre p { margin: 0; color: #cfd8ee; }
.contact p { font-size: 1.08rem; }

/* ---------- Commentaires publics ---------- */
.chapo { font-size: 1.15rem; color: var(--encre-2); margin-bottom: 18px; }
.avis { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.avis li { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px 22px; border-left: 6px solid var(--arche); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.avis blockquote { margin: 0; }
.avis blockquote p { margin: 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.avis footer { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.avis footer strong { font-weight: 800; color: var(--nuit); }
.formulaire .apres { margin: 12px 0 0; }

/* ---------- Actualités ---------- */
.bloc .entete h2 { margin: 0; }
.actus { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.actu-carte { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); text-decoration: none; color: inherit; transition: transform .12s ease; }
.actu-carte:hover { transform: translateY(-3px); }
.actu-carte:active { transform: scale(.98); }
.actu-carte img, .actu-sans-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--canal-clair); }
.actu-sans-photo { background: linear-gradient(135deg, var(--canal-clair), var(--soleil-clair)); }
.actu-txt { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 20px; }
.actu-txt strong { font-size: 1.2rem; font-weight: 900; line-height: 1.25; color: var(--nuit); }
.actu-txt span { color: var(--encre-2); font-size: .98rem; }
.article { max-width: 68ch; margin: 0 auto 44px; }
.article h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: .2rem 0 1.2rem; }
.article p { font-size: 1.1rem; }
.article-photo { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--rayon); margin-bottom: 22px; display: block; }
.actu-apercu { max-width: 260px; width: 100%; border-radius: 16px; display: block; }
.case { display: flex !important; align-items: center; gap: 10px; min-height: 44px; }
.case input { width: 22px; height: 22px; accent-color: var(--canal); flex: none; }
.case small { font-weight: 600; }
.visible { border: 2px solid #dfe5ee; border-radius: 16px; padding: 8px 16px 4px; margin: 0 0 16px; }
.visible legend { font-weight: 800; color: var(--encre-2); font-size: .95rem; padding: 0 6px; }
.visible .case { margin-bottom: 4px; }
a.prochain-rdv.lien-actus { background: var(--soleil-clair); color: #6f4f0c; text-decoration: none; margin: 0 6px 6px 0; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 2px solid transparent; background: #fff; color: var(--nuit); padding: 10px 22px; border-radius: 999px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .08s ease, background .15s ease; touch-action: manipulation; }
.btn:active { transform: scale(.96); }
.btn.primaire { background: var(--nuit); color: #fff; }
.btn.primaire:hover { background: var(--nuit-2); }
.btn.soleil { background: var(--soleil); color: var(--nuit); }
.btn.soleil:hover { background: #f7c35c; }
.btn.doux { background: #e9eef6; color: var(--nuit); }
.btn.doux:hover { background: #dde5f1; }
.haut .btn.doux { background: var(--nuit-2); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: var(--err-fond); color: var(--err); }
.btn.danger:hover { background: var(--err); color: #fff; }
.btn.petit { min-height: 40px; padding: 6px 16px; font-size: .95rem; }
.btn.plein { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
button.lien { background: none; border: none; font: inherit; font-weight: 700; color: var(--nuit-2); cursor: pointer; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }
button.lien.danger { color: var(--err); font-size: .9rem; }
form.enligne { display: inline; }
.deconnexion { margin-top: 8px; }

/* ---------- Formulaires ---------- */
.formulaire label { display: block; font-weight: 700; font-size: .95rem; color: var(--encre-2); margin-bottom: 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input:not([type]), textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 13px 15px; border: 2px solid #dfe5ee; border-radius: 16px; font: inherit; font-size: 1rem; color: var(--encre); background: #f8fafc; transition: border-color .15s ease, background .15s ease; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--canal); background: #fff; }
::placeholder { color: #98a2b6; }
textarea { resize: vertical; }
.piege { position: absolute; left: -9999px; }
.masque-label { font-size: 0 !important; margin-bottom: 10px !important; }
.masque-label textarea { font-size: 1rem; margin-top: 0; }
.envoi-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.depot { display: inline-flex !important; align-items: center; gap: 8px; min-height: 48px; margin: 0 !important; padding: 8px 18px; border: 2px dashed #c3ccdc; border-radius: 999px; color: var(--encre-2); cursor: pointer; max-width: 100%; }
.depot:hover { border-color: var(--canal); color: var(--canal); }
.depot.plein { border-style: solid; border-color: var(--canal); background: var(--canal-clair); color: #17603f; }
.depot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16rem; }
.depot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.depot:focus-within { outline: 3px solid var(--soleil); outline-offset: 2px; }
.envoi .discret { margin: 0; font-size: .82rem; }
.flash { padding: 13px 18px; border-radius: 16px; margin-bottom: 18px; font-weight: 700; }
.flash.ok { background: var(--ok-fond); color: #14613a; }
.flash.err { background: var(--err-fond); color: #8c271c; }

/* ---------- Avatars, pastilles ---------- */
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; background: hsl(var(--t, 210) 62% 86%); color: hsl(var(--t, 210) 55% 24%); font-weight: 900; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; }
.avatar.grand { width: 68px; height: 68px; font-size: 1.45rem; }
img.avatar { object-fit: cover; background: #e9eef6; }
.avatar.dessin svg { width: 58%; height: 58%; }
.photo-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ou { text-align: center; color: var(--discret); font-weight: 700; margin: 18px 0 12px; }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; justify-items: center; }
.choix { border: none; background: none; padding: 4px; border-radius: 50%; cursor: pointer; line-height: 0; transition: transform .08s ease; touch-action: manipulation; }
.choix:active { transform: scale(.9); }
.choix:hover { box-shadow: 0 0 0 3px var(--arche); }
.choix.actuel { box-shadow: 0 0 0 4px var(--canal); }
.badge { display: inline-block; padding: 2px 11px; border-radius: 999px; background: #e9eef6; color: var(--encre-2); font-size: .78rem; font-weight: 800; vertical-align: middle; }
.badge.ok { background: var(--ok-fond); color: var(--ok); }
.badge.err { background: var(--err-fond); color: var(--err); }
.badge.attente { background: var(--soleil-clair); color: #8a6412; }
.epingle { display: inline-block; background: var(--soleil-clair); color: #8a6412; font-size: .75rem; font-weight: 800; padding: 1px 9px; border-radius: 999px; vertical-align: middle; }

/* ---------- Discussions ---------- */
.accueil-membre { margin-bottom: 18px; }
.accueil-membre h1 { font-size: 2.1rem; }
.prochain-rdv { display: inline-block; margin: 0; background: var(--canal-clair); color: #17603f; padding: 7px 16px; border-radius: 999px; font-weight: 700; }
.nouveau { padding: 14px; }
.nouveau summary { list-style: none; cursor: pointer; }
.nouveau summary::-webkit-details-marker { display: none; }
.nouveau[open] summary { margin-bottom: 16px; }
.nouveau[open] summary .btn { background: #e9eef6; }
.liste { list-style: none; margin: 0 0 18px; padding: 0; }
.liste.carte { padding: 6px 12px; }
.liste > li { border-bottom: 1px solid var(--ligne); }
.liste > li:last-child { border-bottom: none; }
.fil { display: flex; align-items: center; gap: 14px; padding: 14px 8px; text-decoration: none; color: inherit; border-radius: 16px; min-height: 64px; }
a.fil:hover, a.fil:active { background: var(--brume); }
.fil-txt { flex: 1; min-width: 0; }
.fil-txt strong { display: block; font-weight: 800; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.fil-txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compteur { flex: none; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 999px; background: var(--brume); color: var(--encre-2); font-weight: 800; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; }
.heure { flex: none; }
.messages { padding: 8px 20px; }
.msg { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--ligne); scroll-margin-top: 80px; }
.msg:last-child { border-bottom: none; }
.msg-corps { flex: 1; min-width: 0; }
.msg-corps header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.msg-corps header strong { font-weight: 800; }
.msg-corps p { overflow-wrap: anywhere; margin-bottom: .5rem; font-size: 1.05rem; }
.msg footer { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.aime { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 14px; border-radius: 999px; border: none; background: var(--brume); color: var(--encre-2); font: inherit; font-weight: 800; cursor: pointer; transition: transform .08s ease; touch-action: manipulation; }
.aime:active { transform: scale(.9); }
.aime .ico { width: 20px; height: 20px; }
.aime.oui { background: #fde3e5; color: var(--rouge); }
.aime.oui .ico { fill: var(--rouge); }
.medias { display: grid; gap: 6px; margin: 8px 0; border-radius: 18px; overflow: hidden; }
.medias.n2 { grid-template-columns: 1fr 1fr; }
.medias.n3 { grid-template-columns: repeat(3, 1fr); }
.medias img, .medias video { width: 100%; height: 100%; max-height: 460px; object-fit: cover; display: block; background: #0d1326; }
.medias.n2 img, .medias.n3 img { aspect-ratio: 1; }
.medias video { object-fit: contain; }
.repondre { padding: 16px; }

/* ---------- Chatroom et messages privés ---------- */
.presents { background: var(--canal-clair); color: #17603f; font-weight: 700; font-size: .9rem; padding: 5px 14px; border-radius: 999px; }
.presents:empty { display: none; }
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-liste { height: min(60vh, 600px); height: min(60dvh, 600px); overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ligne { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.ligne.moi { align-self: flex-end; }
.ligne .avatar { width: 34px; height: 34px; font-size: .78rem; }
.bulle { background: var(--brume); border-radius: 20px 20px 20px 6px; padding: 9px 15px; min-width: 0; }
.ligne.moi .bulle { background: var(--nuit); color: #fff; border-radius: 20px 20px 6px 20px; }
.ligne.moi .bulle small { color: #b9c4e0; }
.ligne.moi .bulle a { color: #fff; }
.bulle p { margin: 0; overflow-wrap: anywhere; }
.bulle small { font-size: .76rem; display: block; }
.chat-saisie { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--ligne); }
.chat-saisie input { margin: 0; flex: 1; min-width: 0; border-radius: 999px; }

/* ---------- Membres ---------- */
.trombi { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.personne-carte { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.personne-carte strong { font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }

/* ---------- Administration ---------- */
.demande { display: flex; gap: 14px; align-items: flex-start; padding: 16px 4px; }
.demande-txt { flex: 1; min-width: 0; }
.demande-txt strong { display: block; font-weight: 800; }
.demande-txt small { display: block; overflow-wrap: anywhere; }
.demande-txt p { margin: .5rem 0 0; color: var(--encre-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Téléphone : onglets en bas, sous le pouce ---------- */
@media (max-width: 820px) {
  body { font-size: 16px; }
  body.membre { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .haut { padding: 8px 14px; }
  .lien-admin { margin-left: auto; }
  .onglets { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; gap: 0; background: #fff; box-shadow: 0 -8px 24px -18px rgba(27, 42, 78, .6); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .onglets a { flex: 1; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 0; border-radius: 14px; color: var(--discret); font-size: .66rem; letter-spacing: -.01em; min-height: 56px; justify-content: center; white-space: nowrap; }
  .onglets a:hover { background: none; color: var(--discret); }
  .onglets a.actif { background: var(--canal-clair); color: #17603f; }
  .onglets .ico { width: 25px; height: 25px; }
  .onglets .pastille { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 20px; line-height: 20px; font-size: .7rem; }
  body.membre > footer { display: none; }
  main { padding: 18px 12px 30px; }
  .carte { padding: 18px 16px; }
  .deux { grid-template-columns: 1fr; }
  .hero-in { flex-direction: column; text-align: center; gap: 20px; padding: 30px 18px 80px; }
  .hero-logo { width: 170px; height: 170px; }
  .devise { margin-left: auto; margin-right: auto; font-size: 1.15rem; }
  .hero-actions { justify-content: center; }
  .arche { height: 60px; }
  body.public .haut { flex-wrap: wrap; row-gap: 4px; }
  .rejoindre-haut { margin-left: auto; }
  .liens-publics { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .lien-haut { padding: 8px 10px; font-size: .95rem; }
  .avis { grid-template-columns: 1fr; }
  .actus { grid-template-columns: 1fr; }
  .rejoindre { padding: 26px 20px; border-radius: 24px; }
  .rejoindre .btn { width: 100%; }
  .messages { padding: 4px 16px; }
  .msg { gap: 10px; }
  .msg .avatar { width: 40px; height: 40px; font-size: .9rem; }
  .ligne { max-width: 92%; }
  .chat-liste { height: calc(100vh - 400px); height: calc(100dvh - 400px); min-height: 220px; }
  .envoi-bas .btn { flex: 1; }
  .trombi { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .medias.n3 { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- Atelier de rédaction (Administration > Rédiger avec Claude) ---- */
.redac-liste { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.redac-liste .ligne { max-width: 86%; }
.redac-claude { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: 100%; }
.redac-claude > small { margin-left: 6px; }
.redac-claude .bulle { max-width: 92%; }
.redac-claude .bulle p + p { margin-top: 8px; }
.redac-prop { width: 100%; background: var(--soleil-clair); border: 2px solid var(--soleil); border-radius: 18px; padding: 16px 18px; position: relative; }
.redac-prop header { margin-bottom: 8px; }
.redac-prop h3 { margin: 4px 0 8px; font-size: 1.2rem; color: var(--nuit); }
.redac-texte { background: var(--papier); border-radius: 14px; padding: 12px 16px; }
.redac-texte p { margin: 0 0 10px; overflow-wrap: anywhere; }
.redac-texte p:last-child { margin-bottom: 0; }
.redac-saisie { margin: 0; }
.redac-saisie button[disabled], .redac-saisie textarea[disabled] { opacity: .55; cursor: not-allowed; }
.redac-nouvelle { text-align: right; margin-top: 4px; }
.redac-idees { background: var(--brume); border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; color: var(--encre-2); }
.redac-idees p { margin: 0 0 6px; }
.redac-idees ul { margin: 0; padding-left: 20px; }
.redac-idees li { margin-bottom: 4px; }
.redac-reprise { margin-top: 10px; }
.redac-reprise fieldset { margin: 0 0 4px; }
.redac-etat { margin: 12px 0 0; font-weight: 700; color: var(--encre-2); }
.redac-etat .badge { margin-right: 6px; }

/* ---- Publications : état d'une publication, compteur de section ---- */
.actu-etat { background: var(--brume); border-radius: 14px; padding: 10px 14px; margin: 0 0 16px; font-weight: 700; color: var(--encre-2); }
.actu-etat.attente { background: var(--soleil-clair); color: #6f4f0c; }
.actu-etat .badge { margin-right: 6px; }
.compte { display: inline-block; min-width: 26px; text-align: center; padding: 1px 8px; border-radius: 999px; background: #e9eef6; color: var(--encre-2); font-size: .85rem; vertical-align: middle; }
.demande-txt strong a { color: inherit; text-decoration: none; }
.demande-txt strong a:hover { text-decoration: underline; }
.btn small { color: inherit; font-weight: 600; opacity: .85; }

/* ---- Accueil structuré : panneaux, entraînements (quand / où), contact ---- */
.panneau { background: var(--papier); border-radius: 28px; padding: 28px 30px; box-shadow: var(--ombre); }
.panneau > h2 { margin: 0 0 .3rem; }
.sous-titre { color: var(--encre-2); font-size: 1.08rem; margin: 0 0 20px; }
.entr-grille { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.entr-grille h3, .lieu h3 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 800; color: var(--canal); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; }
.entr-grille h3 .ico { width: 20px; height: 20px; flex: none; }
.entr .billets { margin: 0; grid-template-columns: 1fr; gap: 10px; }
.entr .billet { flex-direction: row; align-items: baseline; gap: 14px; flex-wrap: wrap; background: var(--brume); box-shadow: none; border-bottom: none; border-left: 6px solid var(--arche); border-radius: 16px; padding: 12px 18px; }
.entr .billet-jour { min-width: 6.2em; font-size: 1.1rem; }
.entr .billet-heure { font-size: 1.7rem; }
.entr .billet.prochain { background: var(--nuit); border-left-color: var(--soleil); }
.entr .billet-note { margin: 0 0 0 auto; }
.lieu { background: var(--canal-clair); border-radius: 20px; padding: 18px 20px; }
.lieu .adresse { font-size: 1.2rem; font-weight: 800; color: var(--nuit); margin: 0 0 12px; }
.lieu p { margin: 0 0 12px; }
.notes { margin: 6px 0 0; padding: 12px 0 0 18px; border-top: 1px solid rgba(27, 42, 78, .12); color: var(--encre-2); }
.notes li { margin-bottom: 4px; }
.panneau.recit p:last-child, .panneau.contact p:last-child { margin-bottom: 0; }
.coordonnees { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.coordonnees li { display: flex; gap: 12px; align-items: flex-start; background: var(--brume); border-radius: 16px; padding: 14px 16px; }
.coordonnees .ico { width: 24px; height: 24px; flex: none; color: var(--canal); margin-top: 2px; }
.coordonnees small { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .76rem; }
.coordonnees a, .coordonnees span { font-weight: 700; color: var(--nuit); overflow-wrap: anywhere; }
.coordonnees a.plan { display: inline-block; font-size: .9rem; color: var(--nuit-2); }
@media (max-width: 820px) {
  .panneau { padding: 22px 18px; border-radius: 24px; }
  .entr-grille { grid-template-columns: 1fr; gap: 18px; }
  .entr .billet-note { margin-left: 0; width: 100%; }
}
.lieu .note-seule { margin: 6px 0 0; padding-top: 12px; border-top: 1px solid rgba(27, 42, 78, .12); color: var(--encre-2); }
