/* ============================================
   Espace associations — La Clé des Jeux
   Mobile d'abord, mêmes couleurs et polices que le site vitrine.
   ============================================ */

:root {
    --vert: #54B435;
    --vert-fonce: #379237;
    --marine: #0F172A;
    --ardoise: #2F3B40;
    --gris: #64748B;
    --menthe-clair: #EDFBE2;
    --menthe: #D5EAD8;
    --rouge: #BD1622;
    --rouge-clair: #FDECEE;
    --blanc: #FFFFFF;
    --fond: #F5FAF2;
    --bordure: #D6E2D3;

    --police-titre: 'EB Garamond', Georgia, 'Times New Roman', serif;
    --police: 'Work Sans', 'Segoe UI', Tahoma, sans-serif;

    --rayon: 16px;
    --rayon-petit: 10px;
    --ombre: 0 6px 20px rgba(15, 23, 42, 0.07);
    --orga: #B45309;
    --orga-clair: #FEF3C7;
    --haut: 60px;
    --bas: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
/* L'attribut hidden l'emporte toujours, même sur un élément stylé (bouton, liste…). */
[hidden] { display: none !important; }

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

body {
    margin: 0;
    font-family: var(--police);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ardoise);
    background: var(--fond);
    min-height: 100vh;
}

h1, h2 {
    font-family: var(--police-titre);
    font-weight: 500;
    line-height: 1.2;
    color: var(--marine);
    margin: 0 0 0.5em;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
a { color: var(--vert-fonce); }

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

:focus-visible { outline: 3px solid var(--vert); outline-offset: 2px; }

/* ---------- Barre du haut ---------- */
.barre-haut {
    position: sticky;
    top: 0;
    z-index: 10;
    height: calc(var(--haut) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--blanc);
    border-bottom: 1px solid var(--bordure);
}
.barre-haut__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #000000;              /* mêmes couleurs que le logo du site vitrine : noir et rouge */
    font-family: var(--police-titre);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.1;
}
.barre-haut__logo em { font-style: normal; color: var(--rouge); }
.barre-haut__logo small {
    display: block;
    font-family: var(--police);
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--gris);
    letter-spacing: 0.02em;
}
.pastille {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--menthe);
    color: var(--vert-fonce);
    font-weight: 600;
    font-size: 0.9rem;
}
.barre-haut__compte { text-decoration: none; }

/* ---------- Contenu ---------- */
.contenu {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px calc(var(--bas) + 24px + env(safe-area-inset-bottom));
}
.contenu--invite {
    max-width: 440px;
    padding-top: 32px;
    padding-bottom: 32px;
}

.carte {
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 24px 20px;
    margin-bottom: 16px;
}
.carte > :last-child { margin-bottom: 0; }
.carte--discrete { background: var(--menthe-clair); box-shadow: none; }

.intro { color: var(--ardoise); }
.note, .aide { color: var(--gris); font-size: 0.9rem; }
.aide { margin: -6px 0 14px; }
.lien-bas { margin: 16px 0 0; text-align: center; }

.infos {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0 0 1em;
}
.infos dt { color: var(--gris); }
.infos dd { margin: 0; overflow-wrap: anywhere; }

.liste-a-venir { margin: 0; padding-left: 1.2em; }
.liste-a-venir li { margin-bottom: 4px; }

.encadre {
    background: var(--menthe-clair);
    border-radius: var(--rayon-petit);
    padding: 14px;
    margin: 6px 0 18px;
    font-size: 0.92rem;
}
.encadre p { margin-bottom: 10px; }

/* ---------- Messages ---------- */
.flash {
    border-radius: var(--rayon-petit);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.flash--ok { background: var(--menthe-clair); color: #1F5E1F; border: 1px solid var(--menthe); }
.flash--erreur { background: var(--rouge-clair); color: var(--rouge); border: 1px solid #F5C2C7; }

/* ---------- Formulaires ---------- */
.formulaire label:not(.case) {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}
.formulaire input[type="email"],
.formulaire input[type="password"],
.formulaire input[type="text"],
.formulaire input[type="number"],
.formulaire input[type="url"],
.formulaire input[type="tel"],
.formulaire input[type="datetime-local"],
.formulaire select,
.formulaire textarea,
.filtres input,
.filtres select {
    display: block;
    width: 100%;
    font: inherit;
    font-size: 16px;              /* évite le zoom automatique sur iPhone */
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: var(--blanc);
    color: var(--marine);
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus, .filtres input:focus, .filtres select:focus { border-color: var(--vert); outline: none; box-shadow: 0 0 0 3px rgba(84, 180, 53, 0.25); }

.case {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    cursor: pointer;
}
.case input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--vert-fonce); }

.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 2px solid var(--vert-fonce);
    background: var(--blanc);
    color: var(--vert-fonce);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.bouton--plein { width: 100%; background: var(--vert-fonce); color: var(--blanc); }
.bouton--plein:hover { background: var(--vert); border-color: var(--vert); }
.bouton--contour { width: 100%; }
.bouton--contour:hover { background: var(--menthe-clair); }

/* ---------- Barre du bas ---------- */
.barre-bas {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: space-around;
    height: calc(var(--bas) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--blanc);
    border-top: 1px solid var(--bordure);
}
.barre-bas a {
    flex: 1;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--gris);
    text-decoration: none;
    font-size: 0.75rem;
}
.barre-bas a[aria-current="page"] { color: var(--vert-fonce); font-weight: 600; }

@media (min-width: 720px) {
    .carte { padding: 28px; }
    h1 { font-size: 2.2rem; }
}

/* ============================================
   Chat : salon général
   ============================================ */
.page-chat .contenu {
    max-width: 760px;
    padding-bottom: calc(var(--bas) + 96px + env(safe-area-inset-bottom));
}

.chat__entete {
    display: flex;
    flex-direction: column;
    padding: 4px 4px 12px;
    border-bottom: 1px solid var(--bordure);
    margin-bottom: 8px;
}
.chat__entete strong { font-family: var(--police-titre); font-size: 1.4rem; font-weight: 500; color: var(--marine); }
.chat__entete span { color: var(--gris); font-size: 0.85rem; }

.chat__etat { text-align: center; color: var(--gris); font-size: 0.9rem; margin: 24px 0; }
.chat__etat[hidden] { display: none; }
.chat__etat--erreur { color: var(--rouge); }

.chat__plus {
    display: block;
    margin: 8px auto 12px;
    padding: 8px 16px;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    background: var(--blanc);
    color: var(--vert-fonce);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.chat__plus[hidden] { display: none; }

.chat__fil { list-style: none; margin: 0; padding: 0; }

.chat__jour {
    text-align: center;
    margin: 18px 0 10px;
    color: var(--gris);
    font-size: 0.8rem;
    font-weight: 500;
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 14px;
    max-width: 100%;
}
.message--suite { margin-top: 3px; }
.message--suite .message__entete { display: none; }
.message--suite .message__pastille { visibility: hidden; }

.message__pastille {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--menthe);
    color: var(--vert-fonce);
    font-size: 0.78rem;
    font-weight: 600;
    align-self: flex-start;
    margin-top: 20px;
}
.message--suite .message__pastille { margin-top: 0; height: 0; }

.message__corps { min-width: 0; max-width: min(80%, 520px); }

.message__entete { font-size: 0.82rem; margin: 0 0 3px 12px; color: var(--marine); }
.message__entete span { color: var(--gris); }

.message__bulle {
    margin: 0;
    padding: 9px 14px;
    background: var(--blanc);
    border-radius: 18px 18px 18px 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.message__bulle a { color: inherit; text-decoration: underline; }

.message__pied {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 12px 0;
    font-size: 0.72rem;
    color: var(--gris);
}
.message__marque { color: var(--rouge); font-weight: 500; }
.message__menu {
    border: 0;
    background: none;
    color: var(--gris);
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
}
.message__menu:hover, .message__menu[aria-expanded="true"] { background: var(--menthe-clair); color: var(--marine); }

.message__actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 8px 0; }
.message__actions[hidden] { display: none; }
.message__actions button {
    border: 1px solid var(--bordure);
    background: var(--blanc);
    color: var(--marine);
    font: inherit;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
}
.message__actions .danger { color: var(--rouge); border-color: #F5C2C7; }

/* Mes messages : à droite, en vert */
.message--moi { flex-direction: row-reverse; }
.message--moi .message__pastille { display: none; }
.message--moi .message__corps { margin-left: auto; }
.message--moi .message__entete { display: none; }
.message--moi .message__bulle { background: var(--vert-fonce); color: var(--blanc); border-radius: 18px 18px 6px 18px; }
.message--moi .message__pied, .message--moi .message__actions { justify-content: flex-end; }

/* Message masqué (vu par le super admin seul) */
.message--masque .message__bulle { opacity: 0.55; background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f3f4f6 6px, #f3f4f6 12px); color: var(--ardoise); }

.chat__nouveaux {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--bas) + 84px + env(safe-area-inset-bottom));
    z-index: 11;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--marine);
    color: var(--blanc);
    font: inherit;
    font-size: 0.85rem;
    box-shadow: var(--ombre);
    cursor: pointer;
}
.chat__nouveaux[hidden] { display: none; }

/* Zone de saisie, au-dessus de la barre du bas */
.chat-saisie {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bas) + env(safe-area-inset-bottom));
    z-index: 10;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    background: var(--fond);
    border-top: 1px solid var(--bordure);
}
.chat-saisie textarea {
    flex: 1;
    max-width: 700px;
    margin-left: auto;
    resize: none;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    padding: 10px 14px;
    border: 1px solid var(--bordure);
    border-radius: 22px;
    background: var(--blanc);
    color: var(--marine);
    max-height: 160px;
}
.chat-saisie textarea:focus { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(84, 180, 53, 0.25); }
.chat-saisie__envoyer {
    flex: none;
    margin-right: auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--vert-fonce);
    color: var(--blanc);
    cursor: pointer;
}
.chat-saisie__envoyer:disabled { opacity: 0.5; }

/* ============================================
   Éléments communs ajoutés à l'étape 3
   ============================================ */
.titre-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 14px;
}
.titre-page h1 { margin: 0; }
.titre-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.titre-section a { font-size: 0.9rem; white-space: nowrap; }
.fil-retour { margin: 0 0 8px; font-size: 0.9rem; }
.facultatif { color: var(--gris); font-weight: 400; font-size: 0.85em; }

.bouton--petit { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }
.bouton--danger { width: 100%; border-color: #F5C2C7; color: var(--rouge); }
.bouton--danger:hover { background: var(--rouge-clair); }

.formulaire textarea { resize: vertical; min-height: 90px; }
.formulaire input[type="file"] { display: block; margin: 4px 0 18px; font: inherit; font-size: 0.9rem; max-width: 100%; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.choix { border: 0; padding: 0; margin: 0 0 8px; }
.choix legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.choix .case { margin-bottom: 10px; }
.encadre--alerte { background: var(--orga-clair); }
.encadre--alerte .case { margin: 0; }
.apercu-image { max-width: 220px; border-radius: var(--rayon-petit); margin: 0 0 10px; }

.etiquette {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--menthe-clair);
    color: var(--vert-fonce);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}
.etiquette--visiteurs { background: var(--menthe); color: #1F5E1F; }
.etiquette--organisateurs { background: var(--orga-clair); color: var(--orga); }
.etiquette--alerte { background: var(--rouge-clair); color: var(--rouge); }

.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--bordure); }
.liste-simple li:first-child { border-top: 0; padding-top: 2px; }
.liste-simple span { color: var(--gris); font-size: 0.88rem; }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0; font-size: 0.92rem; }
.pagination span { color: var(--gris); }

/* ---------- Jeux ---------- */
.filtres { padding: 16px; }
.filtres input[type="search"] { margin-bottom: 12px; }
.filtres__ligne { display: grid; grid-template-columns: 1fr 76px; gap: 0 10px; }
.filtres__ligne label:last-child { grid-column: 1 / -1; }
.filtres__ligne span { display: block; font-size: 0.8rem; color: var(--gris); margin-bottom: 4px; }
.filtres__ligne input, .filtres__ligne select { margin-bottom: 10px; padding: 10px 12px; }
.filtres__actions { display: flex; align-items: center; gap: 16px; }
.filtres__actions .bouton { width: auto; }
.compte-resultats { color: var(--gris); font-size: 0.9rem; margin: 0 4px 10px; }

.liste-jeux { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.jeu { background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px 16px; }
.jeu__haut { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.jeu__nom { font-family: var(--police); font-size: 1.05rem; font-weight: 600; margin: 0 0 4px; }
.jeu__infos { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 4px; font-size: 0.92rem; }
.jeu__remarque { margin: 6px 0; font-size: 0.9rem; font-style: italic; }
.jeu__proprio { margin: 6px 0 0; color: var(--gris); font-size: 0.82rem; }

@media (min-width: 720px) {
    .filtres__ligne { grid-template-columns: 1fr 90px 1fr; }
    .filtres__ligne label:last-child { grid-column: auto; }
    .liste-jeux { grid-template-columns: 1fr 1fr; }
}

/* ---------- Événements ---------- */
.onglets { display: flex; gap: 6px; background: var(--blanc); padding: 4px; border-radius: 999px; box-shadow: var(--ombre); margin-bottom: 10px; }
.onglet { flex: 1; text-align: center; padding: 9px 12px; border-radius: 999px; text-decoration: none; color: var(--gris); font-weight: 500; }
.onglet--visiteurs[aria-current="page"] { background: var(--vert-fonce); color: var(--blanc); }
.onglet--organisateurs[aria-current="page"] { background: var(--orga); color: var(--blanc); }
.calendrier-aide { margin: 0 4px 10px; }

.bascule { display: inline-flex; border: 1px solid var(--bordure); border-radius: 999px; overflow: hidden; margin: 0 0 12px; }
.bascule a { padding: 6px 16px; text-decoration: none; color: var(--gris); font-size: 0.9rem; background: var(--blanc); }
.bascule a[aria-current="page"] { background: var(--marine); color: var(--blanc); }

.mois-titre, .jour-titre { font-family: var(--police); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gris); margin: 18px 4px 8px; }
.jour-titre { text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--marine); scroll-margin-top: calc(var(--haut) + 12px); }

.liste-evts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.evt {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 14px;
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    text-decoration: none;
    color: var(--ardoise);
    border-left: 5px solid var(--vert);
}
.evt--organisateurs { border-left-color: var(--orga); }
.evt--passe { opacity: 0.7; }
.evt:hover { box-shadow: var(--ombre), 0 0 0 2px var(--menthe); }
.evt__date { flex: none; width: 46px; text-align: center; line-height: 1.1; }
.evt__date strong { display: block; font-family: var(--police-titre); font-size: 1.6rem; font-weight: 500; color: var(--marine); }
.evt__date span { font-size: 0.75rem; text-transform: uppercase; color: var(--gris); }
.evt--organisateurs .evt__date strong { color: var(--orga); }
.evt__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.evt__titre { font-weight: 600; color: var(--marine); }
.evt__infos { font-size: 0.85rem; color: var(--gris); }

.passes { margin-top: 20px; }
.passes summary { cursor: pointer; color: var(--gris); font-weight: 500; padding: 8px 4px; }
.passes .liste-evts { margin-top: 8px; }

.calendrier { background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 12px; margin-bottom: 8px; }
.calendrier__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendrier__nav h2 { margin: 0; font-size: 1.25rem; }
.calendrier__nav a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; font-size: 1.5rem; color: var(--marine); }
.calendrier__nav a:hover { background: var(--menthe-clair); }
.calendrier__grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendrier__entete { text-align: center; font-size: 0.72rem; color: var(--gris); text-transform: uppercase; padding: 4px 0; }
.calendrier__jour {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-height: 46px;
    padding: 6px 0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--marine);
    text-decoration: none;
}
.calendrier__jour.is-hors { color: #CBD5E1; }
.calendrier__jour.is-aujourdhui > span { background: var(--marine); color: var(--blanc); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.calendrier__jour.has-evt { background: var(--menthe-clair); font-weight: 600; }
.calendrier__jour.has-evt:hover { background: var(--menthe); }
.pastilles { display: flex; gap: 3px; font-style: normal; }
.pastille-evt { width: 6px; height: 6px; border-radius: 50%; background: var(--vert); }
.pastille-evt--organisateurs { background: var(--orga); }

.fiche-evt { border-top: 5px solid var(--vert); }
.fiche-evt--organisateurs { border-top-color: var(--orga); }
.fiche-evt__calendrier { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.fiche-evt__image { width: 100%; border-radius: var(--rayon-petit); margin: 4px 0 16px; }
.fiche-evt__description { margin: 0 0 1em; overflow-wrap: anywhere; }
.actions-evt { display: grid; gap: 10px; }
.actions-evt form { margin: 0; }

/* Barre du bas à 5 onglets : libellés plus petits sur les écrans étroits */
@media (max-width: 380px) {
    .barre-bas a { font-size: 0.68rem; }
}

/* ---------- Jeux : deux parties (les nôtres / les autres) et photos ---------- */
.jeux-partie__titre { font-family: var(--police); font-size: 1rem; font-weight: 600; margin: 6px 4px 10px; }
.jeux-partie__titre span { color: var(--gris); font-weight: 400; }
.jeux-partie + .jeux-partie { margin-top: 18px; }

.jeu__photos { display: flex; gap: 6px; margin: 8px 0 4px; }
.jeu__photos a { display: block; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--menthe-clair); }
.jeu__photos img { width: 100%; height: 100%; object-fit: cover; }

.photos-edition { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; padding: 0; }
.photos-edition li { width: 96px; }
.photos-edition img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; margin-bottom: 4px; }
.photos-edition .case { margin: 0; font-size: 0.85rem; }

@media (max-width: 899px) {
    .jeux-partie.is-cache-mobile { display: none; }
    .jeux-partie + .jeux-partie { margin-top: 0; }
}
@media (min-width: 900px) {
    .page-jeux .contenu { max-width: 1100px; }
    .onglets--jeux { display: none; }
    .jeux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
    .jeux-partie + .jeux-partie { margin-top: 0; }
    .jeux-colonnes .liste-jeux { grid-template-columns: 1fr; }
}

/* ---------- Visionneuse de photos ---------- */
.visionneuse {
    border: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    background: transparent;
}
.visionneuse::backdrop { background: rgba(15, 23, 42, 0.94); }
.visionneuse__cadre { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 12px; }
.visionneuse img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.visionneuse button {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--blanc);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.visionneuse button:hover { background: rgba(255, 255, 255, 0.3); }
.visionneuse__fermer { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
.visionneuse__prec { left: 10px; top: 50%; transform: translateY(-50%); }
.visionneuse__suiv { right: 10px; top: 50%; transform: translateY(-50%); }
.visionneuse__compteur { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: var(--blanc); font-size: 0.9rem; }

/* ============================================
   Onglet « Plus » et pages de l'association
   ============================================ */
.actions-ligne { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.actions-ligne .bouton { width: auto; }

.menu-plus { list-style: none; margin: 0 0 16px; padding: 4px 0; }
.menu-plus li + li { border-top: 1px solid var(--bordure); }
.menu-plus__lien {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--ardoise);
}
.menu-plus__lien:hover { background: var(--menthe-clair); }
.menu-plus__icone { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--menthe-clair); color: var(--vert-fonce); }
.menu-plus__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-plus__texte strong { color: var(--marine); font-weight: 600; }
.menu-plus__texte span { color: var(--gris); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-plus__fleche { color: var(--gris); font-size: 1.4rem; line-height: 1; }
.menu-plus__titre { font-family: var(--police); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gris); margin: 18px 4px 8px; }
.menu-plus__note { margin: -6px 4px 16px; }
.carte.menu-plus { padding: 4px 0; overflow: hidden; }

.asso-entete__haut { display: flex; align-items: center; gap: 14px; }
.asso-entete__haut h1 { margin: 0 0 2px; }
.asso-entete__haut .note { margin: 0; }
.asso-logo { flex: none; width: 72px; height: 72px; border-radius: 16px; object-fit: contain; background: var(--blanc); border: 1px solid var(--bordure); margin-bottom: 8px; }
.asso-logo--vide { display: grid; place-items: center; background: var(--menthe); color: var(--vert-fonce); font-family: var(--police-titre); font-size: 2rem; border: 0; margin: 0; }
.asso-description { overflow-wrap: anywhere; }
.carte--privee { border-top: 5px solid var(--orga); }

.infos--empile { grid-template-columns: 1fr; gap: 2px; }
.infos--empile dt { font-size: 0.82rem; margin-top: 10px; }
.infos--empile dt:first-child { margin-top: 0; }
.infos--empile dd { overflow-wrap: anywhere; }

.galerie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.galerie a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--menthe-clair); }
.galerie img { width: 100%; height: 100%; object-fit: cover; }

.bloc-fiche { border: 0; border-top: 5px solid var(--vert); border-radius: 0; padding: 16px 0 4px; margin: 8px 0 16px; }
.bloc-fiche--privee { border-top-color: var(--orga); }
.bloc-fiche legend { font-family: var(--police-titre); font-size: 1.35rem; color: var(--marine); padding: 0 8px 0 0; }
.bloc-fiche legend .etiquette { font-family: var(--police); margin-left: 6px; }
.sous-titre { font-weight: 600; color: var(--marine); margin: 6px 0 10px; }

.ajout-membre summary { list-style: none; cursor: pointer; }
.ajout-membre summary::-webkit-details-marker { display: none; }
.ajout-membre[open] summary { margin-bottom: 16px; }
.ajout-membre:not([open]) { padding: 14px 16px; }

.liste-membres { list-style: none; margin: 0 0 8px; padding: 4px 0; }
.liste-membres li + li { border-top: 1px solid var(--bordure); }
.liste-membres a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; text-decoration: none; color: var(--ardoise); }
.liste-membres a:hover { background: var(--menthe-clair); }
.liste-membres__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.liste-membres__texte strong { color: var(--marine); font-weight: 600; }
.liste-membres__texte span { color: var(--gris); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Administration (super admin) ---------- */
.liste-admin { list-style: none; margin: 0; padding: 0; }
.admin-asso__haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-asso__haut h2 { margin: 0; font-size: 1.3rem; }
.admin-asso__haut h2 a { color: var(--marine); text-decoration: none; }
.admin-asso .note { margin: 6px 0 0; }
.admin-asso .actions-ligne form { margin: 0; }
.admin-asso--off { opacity: 0.75; }
.carte--danger { border-top: 5px solid var(--rouge); }
.carte--danger .bouton--danger { margin-top: 4px; }

/* ============================================
   Sondages et messages épinglés
   ============================================ */
.chat__entete { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.chat__entete > div { display: flex; flex-direction: column; }

.chat-saisie__sondage {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--vert-fonce);
    background: var(--blanc);
    border: 1px solid var(--bordure);
}
.chat-saisie__sondage:hover { background: var(--menthe-clair); }
.chat-saisie .chat-saisie__sondage + .sr-only + textarea { margin-left: 0; }
@media (min-width: 760px) {
    .chat-saisie__sondage { margin-left: auto; }
}

/* Barre des épinglés, sous l'en-tête du salon */
.chat__epingles {
    position: sticky;
    top: calc(var(--haut) + env(safe-area-inset-top));
    z-index: 5;
    display: grid;
    gap: 6px;
    padding: 8px 0;
    background: var(--fond);
}
.chat__epingles[hidden] { display: none; }
.epingle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #F3D9A4;
    border-left: 4px solid var(--orga);
    border-radius: var(--rayon-petit);
    background: var(--orga-clair);
    color: var(--ardoise);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.epingle__etiquette { font-size: 0.75rem; font-weight: 600; color: var(--orga); }
.epingle__texte { font-size: 0.9rem; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epingle.is-deplie .epingle__texte { white-space: pre-wrap; overflow-wrap: anywhere; }

.message__epingle { color: var(--orga); font-weight: 500; }
.message.is-surligne .message__bulle { animation: surligne 1.6s ease; }
@keyframes surligne {
    0%, 40% { box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.45); }
    100% { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
}

/* Carte de sondage dans le salon (même rendu pour tous, y compris mes sondages) */
.message__bulle.sondage-carte,
.message--moi .message__bulle.sondage-carte {
    min-width: min(280px, 70vw);
    background: var(--blanc);
    color: var(--ardoise);
    border: 1px solid var(--bordure);
    border-left: 4px solid var(--vert);
    white-space: normal;
}
.sondage-carte__etiquette { margin: 0 0 2px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--vert-fonce); }
.sondage-carte__question { margin: 0 0 8px; font-weight: 600; color: var(--marine); white-space: pre-wrap; }
.sondage-carte__form { display: grid; gap: 6px; }
.sondage-carte__choix { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border: 1px solid var(--bordure); border-radius: 10px; cursor: pointer; }
.sondage-carte__choix input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--vert-fonce); }
.sondage-carte__choix:has(input:checked) { border-color: var(--vert); background: var(--menthe-clair); }
.sondage-carte__voter {
    justify-self: start;
    margin-top: 4px;
    padding: 8px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--vert-fonce);
    color: var(--blanc);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.sondage-carte__voter:disabled { opacity: 0.6; }
.sondage-carte__aide { display: block; margin: 6px 0 0; font-size: 0.78rem; color: var(--gris); }
.sondage-carte__resultats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sondage-carte__ligne { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; }
.sondage-carte__ligne span:last-child { color: var(--gris); white-space: nowrap; }
.sondage-carte__resultats .is-choisi .sondage-carte__ligne span:first-child { font-weight: 600; color: var(--vert-fonce); }

/* Barres de résultats (salon et page Sondages) */
.sondage-carte progress,
.sondage__barre {
    display: block;
    width: 100%;
    height: 8px;
    margin-top: 3px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--menthe-clair);
    appearance: none;
}
.sondage-carte progress::-webkit-progress-bar, .sondage__barre::-webkit-progress-bar { background: var(--menthe-clair); border-radius: 999px; }
.sondage-carte progress::-webkit-progress-value, .sondage__barre::-webkit-progress-value { background: var(--vert); border-radius: 999px; }
.sondage-carte progress::-moz-progress-bar, .sondage__barre::-moz-progress-bar { background: var(--vert); border-radius: 999px; }

/* Page Sondages */
.sondage { border-left: 5px solid var(--vert); scroll-margin-top: calc(var(--haut) + 12px); }
.sondage--masque { opacity: 0.7; }
.sondage__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 0.82rem; color: var(--gris); }
.sondage__question { font-family: var(--police); font-size: 1.1rem; font-weight: 600; margin: 0 0 10px; }
.sondage__form { display: grid; gap: 4px; }
.sondage__choix { margin-bottom: 6px; }
.sondage__form .bouton { justify-self: start; width: auto; }
.sondage__resultats { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 10px; }
.sondage__resultats li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.sondage__resultats .sondage__barre { grid-column: 1 / -1; }
.sondage__chiffres { color: var(--gris); font-size: 0.88rem; white-space: nowrap; }
.sondage__resultats .is-choisi .sondage__libelle { font-weight: 600; color: var(--vert-fonce); }
.sondage__coche { color: var(--vert-fonce); }
#sondage-options input { margin-bottom: 8px; }

/* ---------- Mentions ---------- */
.chat-saisie { position: fixed; }
.suggestions {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(100% + 6px);
    max-width: 520px;
    margin: 0 auto;
    padding: 4px;
    list-style: none;
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    z-index: 12;
}
.suggestions[hidden] { display: none; }
.suggestions li { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--menthe-clair); }
.suggestions strong { color: var(--marine); font-weight: 600; }
.suggestions span { color: var(--gris); font-size: 0.8rem; }

.mention { font-weight: 600; color: var(--vert-fonce); }
.message--moi .mention { color: var(--blanc); text-decoration: underline; text-underline-offset: 2px; }
.mention--moi { background: var(--orga-clair); color: var(--orga); border-radius: 4px; padding: 0 3px; }
.message--mention:not(.message--moi) .message__bulle { box-shadow: 0 0 0 2px var(--orga); }

/* ---------- Application installable ---------- */
.banniere-maj {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--bas) + 12px + env(safe-area-inset-bottom));
    z-index: 30;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--rayon);
    background: var(--marine);
    color: var(--blanc);
    box-shadow: var(--ombre);
    font-size: 0.92rem;
}
.is-invite .banniere-maj { bottom: 16px; }
.banniere-maj button {
    flex: none;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--vert);
    color: var(--blanc);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.carte--installer { border-top: 5px solid var(--vert); }
.carte--installer[hidden] { display: none; }
#notifications-appareil p:last-child { margin-bottom: 0; }

/* ---------- Champ mot de passe avec bouton « afficher » ---------- */
.champ-mdp { position: relative; margin-bottom: 16px; }
.formulaire .champ-mdp input { margin-bottom: 0; padding-right: 52px; }
.champ-mdp__oeil {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--rayon-petit);
    background: none;
    color: var(--gris);
    cursor: pointer;
}
.champ-mdp__oeil:hover, .champ-mdp__oeil[aria-pressed="true"] { color: var(--vert-fonce); }
.champ-mdp + .aide { margin-top: -8px; }

/* ---------- Fenêtre « Recevoir les notifications ? » ---------- */
.popup-notif {
    width: min(92vw, 420px);
    border: 0;
    border-radius: var(--rayon);
    padding: 24px 22px 20px;
    background: var(--blanc);
    color: var(--ardoise);
    box-shadow: var(--ombre);
}
.popup-notif::backdrop { background: rgba(15, 23, 42, 0.55); }
.popup-notif h2 { margin-bottom: 8px; }
.popup-notif__actions { display: grid; gap: 8px; margin-top: 16px; }
.popup-notif__erreur { color: var(--rouge); font-size: 0.9rem; }

/* ---------- Journal (super admin) ---------- */
.onglets .onglet { padding: 9px 8px; font-size: 0.92rem; }
.journal-categories { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.journal-categories a {
    padding: 5px 12px;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    background: var(--blanc);
    color: var(--ardoise);
    font-size: 0.85rem;
    text-decoration: none;
}
.journal-categories a[aria-current="true"] { background: var(--marine); border-color: var(--marine); color: var(--blanc); }
.journal { list-style: none; margin: 0; padding: 0; }
.journal__jour { margin: 18px 4px 8px; font-size: 0.85rem; font-weight: 600; color: var(--gris); }
.journal__ligne {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 6px;
    background: var(--blanc);
    border-radius: var(--rayon-petit);
    box-shadow: var(--ombre);
    border-left: 4px solid var(--bordure);
}
.journal__ligne--compte, .journal__ligne--membre { border-left-color: #2563EB; }
.journal__ligne--association { border-left-color: var(--vert); }
.journal__ligne--chat { border-left-color: var(--orga); }
.journal__ligne--evenement { border-left-color: #7C3AED; }
.journal__ligne--jeu { border-left-color: #0D9488; }
.journal__ligne time { flex: none; width: 52px; font-size: 0.85rem; font-weight: 600; color: var(--marine); }
.journal__texte { min-width: 0; }
.journal__texte p { margin: 0; }
.journal__action { overflow-wrap: anywhere; }
.journal__action .etiquette { margin-right: 4px; }
.journal__details { font-size: 0.88rem; color: var(--ardoise); overflow-wrap: anywhere; }
.journal__acteur { font-size: 0.8rem; color: var(--gris); margin-top: 2px; }

/* ---------- Bouton d'aide et tutoriel ---------- */
.barre-haut__droite { display: flex; align-items: center; gap: 10px; }
.barre-haut__aide {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid var(--bordure);
    border-radius: 50%;
    background: var(--blanc);
    color: var(--marine);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
.barre-haut__aide:hover { border-color: var(--vert); color: var(--vert-fonce); }

.tuto {
    width: min(94vw, 460px);
    max-height: 88vh;
    border: 0;
    border-radius: var(--rayon);
    padding: 28px 22px 18px;
    background: var(--blanc);
    color: var(--ardoise);
    box-shadow: var(--ombre);
    overflow-y: auto;
}
.tuto::backdrop { background: rgba(15, 23, 42, 0.55); }
.tuto__fermer {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--gris);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.tuto__fermer:hover { background: var(--menthe-clair); color: var(--marine); }
.tuto__icone { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--menthe-clair); color: var(--vert-fonce); margin-bottom: 10px; }
.tuto__icone svg { width: 30px; height: 30px; }
.tuto__compteur { margin: 0 0 2px; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gris); }
.tuto h2 { margin-bottom: 10px; }
.tuto ul { margin: 0 0 6px; padding-left: 1.1em; }
.tuto li { margin-bottom: 8px; }
.tuto__points { display: flex; justify-content: center; gap: 6px; margin: 14px 0 12px; }
.tuto__points span { width: 8px; height: 8px; border-radius: 50%; background: var(--bordure); }
.tuto__points span.is-actif { background: var(--vert-fonce); width: 20px; border-radius: 999px; }
.tuto__nav { display: flex; justify-content: space-between; gap: 10px; }
.tuto__nav .bouton { width: auto; flex: 1; }
.tuto__nav [data-tuto-prec][hidden] + [data-tuto-suiv] { flex: 1; }
