/* ============================================================
   Les Epicuriens — feuille de style (mobile-first, PWA)
   Palette gourmande : bordeaux, creme, or.
   ============================================================ */
:root {
  --wine:        #7a1f2b;
  --wine-dark:   #5c1620;
  --gold:        #c79a3e;
  --cream:       #faf6ef;
  --ink:         #2b2420;
  --muted:       #8a7f76;
  --line:        #e7ddd0;
  --ok:          #2e7d4f;
  --ok-bg:       #e6f4ec;
  --err:         #b3261e;
  --err-bg:      #fbeae8;
  --info-bg:     #fff7e6;
  --radius:      14px;
  --shadow:      0 2px 10px rgba(60,40,20,.08);
  --maxw:        760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--wine); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2em 0 .3em; }
h2 { font-size: 1.15rem; margin: 0 0 .5em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* --- Barre superieure --- */
.topbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem;
  background: var(--wine); color: #fff;
  position: sticky; top: 0; z-index: 10;
  box-shadow: var(--shadow);
  padding-top: calc(.6rem + env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.4rem; }
.brand-name { letter-spacing: .2px; }
.topbar .group-switch { margin-left: auto; }
.group-switch select {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px; padding: .3rem .5rem; font-size: .9rem;
}
.group-switch select option { color: var(--ink); }
.topnav { margin-left: auto; }
.topbar .group-switch + .topnav { margin-left: .5rem; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff; font-weight: 700; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* --- Conteneur --- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 1rem 1rem 4rem; }
.page-head { margin-bottom: 1rem; }
.back { display: inline-block; margin-bottom: .3rem; font-size: .9rem; }

/* --- Cartes / grilles --- */
.card-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.card {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
}
.card:hover { text-decoration: none; border-color: var(--gold); }
.group-card h2 { color: var(--wine); }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.panel-soft { background: #fffdf8; border-style: dashed; }

/* --- Listes membres / invitations --- */
.member-list, .invite-list { list-style: none; margin: 0; padding: 0; }
.member-list li {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem 0; border-bottom: 1px solid var(--line);
}
.member-list li:last-child { border-bottom: 0; }
.member-id { display: flex; flex-direction: column; }
.member-list form { margin-left: auto; }
.invite-list li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }

.badge {
  display: inline-block; background: var(--gold); color: #fff;
  font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 10px;
  vertical-align: middle; margin-left: .3rem;
}

/* --- Formulaires --- */
label { display: block; font-weight: 600; margin: .6rem 0 .2rem; font-size: .92rem; }
input[type=text], input[type=email], select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,154,62,.18);
}
input:disabled { background: #f3eee6; color: var(--muted); }
.stack > * { margin-bottom: .2rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline-form input[type=email] { flex: 1 1 200px; width: auto; }
.inline-form select { width: auto; }

/* --- Boutons --- */
.btn {
  display: inline-block; cursor: pointer; border: 1px solid transparent;
  border-radius: 10px; padding: .6rem 1rem; font-size: 1rem; font-weight: 600;
  background: #efe7da; color: var(--ink); text-align: center;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-block { display: block; width: 100%; margin-top: .8rem; }
.btn-sm { padding: .3rem .55rem; font-size: .9rem; }

/* --- Flashs --- */
.flash { padding: .7rem .9rem; border-radius: 10px; margin-bottom: .9rem; font-size: .95rem; }
.flash-success { background: var(--ok-bg);  color: var(--ok);  border: 1px solid #bfe3cd; }
.flash-error   { background: var(--err-bg); color: var(--err); border: 1px solid #f0c4c0; }
.flash-info    { background: var(--info-bg);color: #8a6d1a;     border: 1px solid #f0e0b8; }

/* --- Banniere dev (lien magique local) --- */
.dev-banner {
  background: #fff7e6; border: 1px dashed var(--gold); border-radius: 10px;
  padding: .7rem .8rem; margin-bottom: .9rem; font-size: .88rem; word-break: break-all;
}

/* --- Carte d'authentification --- */
.auth-card {
  max-width: 380px; margin: 8vh auto 0; background: #fff; border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); border: 1px solid var(--line); text-align: center;
}
.auth-card form { text-align: left; }
.auth-logo { font-size: 2.4rem; }
.auth-card h1 { color: var(--wine); }

/* --- Divers --- */
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.create-box { margin-top: 1.2rem; }
.create-box summary { cursor: pointer; font-weight: 600; color: var(--wine); }
.create-box form { margin-top: .8rem; }
.logout-row { margin-top: 2rem; text-align: center; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* --- Liste des week-ends --- */
.event-list { list-style: none; margin: .3rem 0 0; padding: 0; }
.event-row { border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-main {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .2rem; color: var(--ink);
}
.event-main:hover { text-decoration: none; background: #fbf7f0; }
.event-icon { font-size: 1.4rem; line-height: 1; }
.event-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.event-go { color: var(--gold); font-size: 1.6rem; line-height: 1; }
.event-row.is-archived .event-main { opacity: .6; }
.badge-muted { background: var(--muted); }

/* --- Frise des phases --- */
.phase-track {
  list-style: none; margin: .2rem 0 1rem; padding: 0;
  display: flex; gap: .25rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.phase-step {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  text-align: center; width: 5.2rem; position: relative;
}
.phase-step + .phase-step::before {
  content: ""; position: absolute; top: 16px; left: -50%; width: 100%;
  height: 2px; background: var(--line); z-index: 0;
}
.phase-step.is-done + .phase-step::before,
.phase-step.is-current::before { background: var(--gold); }
.phase-dot {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: #efe7da; border: 2px solid var(--line);
  font-size: 1rem; position: relative; z-index: 1;
}
.phase-step.is-done  .phase-dot { background: var(--ok-bg);  border-color: var(--ok); }
.phase-step.is-current .phase-dot { background: var(--wine); border-color: var(--wine); box-shadow: 0 0 0 3px rgba(122,31,43,.15); }
.phase-name { font-size: .68rem; margin-top: .3rem; color: var(--muted); line-height: 1.2; }
.phase-step.is-current .phase-name { color: var(--wine); font-weight: 700; }
.inline-label { font-weight: 600; margin: 0; }

/* Etapes cliquables (bouton qui reprend l'aspect d'une etape) */
.phase-form { margin: 0; }
.phase-btn {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; width: 100%;
}
.phase-btn:hover .phase-dot { transform: scale(1.12); transition: transform .1s; }
.phase-btn:hover .phase-name { color: var(--wine); }

/* Surbrillance des etapes deja initiees (anneau or), distinct de done/current */
.phase-step.is-initiated .phase-dot { box-shadow: 0 0 0 2px var(--gold); }
.phase-step.is-initiated .phase-name { color: var(--ink); }

/* Frise comme navigation : chaque etape est un lien */
.phase-link { display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; width: 100%; }
.phase-link:hover { text-decoration: none; }
.phase-link:hover .phase-dot { transform: scale(1.12); transition: transform .1s; }
.phase-link:hover .phase-name { color: var(--wine); }
.phase-step.is-selected .phase-dot { outline: 2px solid var(--wine); outline-offset: 2px; }
.phase-step.is-selected .phase-name { color: var(--wine); font-weight: 700; text-decoration: underline; }

/* Outils d'une etape : une ligne par outil, bouton « Ouvrir » a droite */
.tool-rows { list-style: none; margin: 0; padding: 0; }
.tool-row { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.tool-row:last-child { border-bottom: 0; }
.tool-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.tool-info strong { color: var(--wine); }
.tool-open { flex: 0 0 auto; white-space: nowrap; }

/* Raccourci chat dans la barre du haut */
.chat-shortcut { display: inline-flex; align-items: center; font-size: 1.3rem; color: #fff; margin-left: .4rem; position: relative; }
.chat-shortcut:hover { text-decoration: none; }

/* --- Champs cote a cote / zone dangereuse --- */
.field-row { display: flex; gap: .8rem; }
.field-row > div { flex: 1; }
.danger-row { display: flex; gap: .6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.danger-row form { margin: 0; }
.btn-danger { color: var(--err); border-color: #f0c4c0; }
.btn-danger:hover { background: var(--err-bg); }

/* --- Sondage de dates : couleurs des choix --- */
.v-yes   { color: var(--ok); }
.v-maybe { color: #c98a1a; }
.v-no    { color: var(--err); }
.v-none  { color: var(--line); }

/* --- Matrice de votes --- */
.matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -.4rem; }
.poll-matrix { border-collapse: collapse; width: 100%; font-size: .9rem; }
.poll-matrix th, .poll-matrix td { padding: .45rem .5rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.poll-matrix thead th { font-size: .8rem; color: var(--muted); font-weight: 700; vertical-align: bottom; }
.poll-matrix .who { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 600; }
.poll-matrix .cell { font-size: 1.1rem; font-weight: 700; }
.poll-matrix .opt-label { display: block; font-weight: 400; font-size: .72rem; }
.poll-matrix .is-best { background: #fff7e6; }
.poll-matrix thead .is-best { box-shadow: inset 0 -3px 0 var(--gold); }
.best-tag { display: block; font-size: .62rem; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.poll-matrix tfoot td { background: #fbf7f0; }
.legend span { font-weight: 700; }

/* --- Vote du membre courant --- */
.vote-list { display: grid; gap: .6rem; margin-bottom: 1rem; }
.vote-item { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; margin: 0; }
.vote-item legend { font-weight: 600; font-size: .92rem; padding: 0 .3rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.choice {
  flex: 1 1 30%; display: flex; align-items: center; justify-content: center; gap: .3rem;
  border: 1px solid var(--line); border-radius: 8px; padding: .4rem .3rem; cursor: pointer;
  font-size: .85rem; font-weight: 600; user-select: none;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice.is-sel.v-yes   { background: var(--ok-bg);  border-color: var(--ok); }
.choice.is-sel.v-maybe { background: #fff5e0;       border-color: #c98a1a; }
.choice.is-sel.v-no    { background: var(--err-bg); border-color: var(--err); }
.choice:has(input:checked) { box-shadow: 0 0 0 2px rgba(122,31,43,.15); }

.ical-link { font-size: .8rem; font-weight: 600; white-space: nowrap; }

/* --- Destination : "deja visite" + cartes --- */
.visited-box { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.chip { display: inline-block; background: #efe7da; color: var(--ink); border-radius: 12px; padding: 2px 10px; font-size: .82rem; font-weight: 600; }

.dest-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 560px) { .dest-grid { grid-template-columns: 1fr 1fr; } }
.dest-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.dest-card.is-leader { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(199,154,62,.25), var(--shadow); }
.dest-img { height: 130px; background-size: cover; background-position: center; background-color: #eee; }
.dest-body { padding: .8rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.dest-body h3 { margin: 0; color: var(--wine); }
.dest-args { font-size: .9rem; margin: .2rem 0; }
.dest-vote { margin-top: .4rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
.pts-input { width: 4.5rem; text-align: center; }
.pick { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; cursor: pointer; }
.dest-remove { align-self: flex-start; margin-top: .3rem; }

/* --- Logement : faits, actions, likes, commentaires --- */
.plat-badge { display: inline-block; color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; }
.lodging-facts { list-style: none; margin: .3rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .9rem; }
.lodging-facts li { white-space: nowrap; }
.lodging-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .4rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
.inline-mini { margin: 0; display: inline; }
.like-btn.is-liked { color: var(--err); border-color: #f0c4c0; background: var(--err-bg); }
.lodging-comments { margin-top: .6rem; }
.comment { font-size: .88rem; padding: .3rem 0; border-top: 1px solid var(--line); display: flex; gap: .4rem; align-items: baseline; }
.comment strong { color: var(--wine); white-space: nowrap; }
.comment span { flex: 1; }
.cmt-del { margin-left: auto; }
.link-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .85rem; }
.cmt-add { display: flex; gap: .4rem; margin-top: .4rem; }
.cmt-add input { flex: 1; }
.vote-submit { margin-bottom: 1rem; }

/* --- Raccourcis outils --- */
.tool-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.tool-link { display: inline-block; background: #efe7da; color: var(--ink); border-radius: 10px; padding: .5rem .8rem; font-weight: 600; font-size: .9rem; }
.tool-link:hover { text-decoration: none; background: #e6dccb; }

/* --- Fiche logement (vue) + coffre a documents --- */
.fiche-view { margin: .5rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; }
.fiche-view dt { font-weight: 700; color: var(--muted); }
.fiche-view dd { margin: 0; }
.doc-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }
.doc-icon { font-size: 1.3rem; }
.doc-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.doc-list form { margin: 0; }
.doc-upload { margin-top: .5rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

/* --- Informations datees (fiche logement) --- */
.note-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.note-list li { display: flex; align-items: baseline; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.note-list li:last-child { border-bottom: 0; }
.note-date { background: var(--gold); color: #fff; border-radius: 6px; padding: 1px 8px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.note-text { flex: 1; }
.note-list .inline-mini { margin: 0; }
input[type=file] { width: 100%; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* --- Depenses --- */
.balance-list { list-style: none; margin: 0; padding: 0; }
.balance-list li { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.balance-list li:last-child { border-bottom: 0; }
.balance-list .v-yes, .balance-list .v-no { font-weight: 700; }

.settle-list { list-style: none; margin: 0; padding: 0; }
.settle-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.settle-row:last-child { border-bottom: 0; }
.settle-txt { flex: 1 1 100%; }
.settle-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.settle-actions form { margin: 0; }
.wero-id { font-size: .82rem; background: #eef3ff; color: #003580; border-radius: 8px; padding: .25rem .6rem; font-weight: 600; }

.expense-list { list-style: none; margin: 0; padding: 0; }
.expense-row { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.expense-row:last-child { border-bottom: 0; }
.expense-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.expense-amt { font-weight: 700; white-space: nowrap; }
.expense-act { display: flex; gap: .3rem; align-items: center; }
.expense-act form { margin: 0; }

/* --- Repartition (saisie depense) --- */
.share-box { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.share-box legend { font-weight: 600; padding: 0 .3rem; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .25rem 0; }
.share-name { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin: 0; }
.share-w { width: 4.5rem; text-align: center; }

.check-line { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin-top: .8rem; }
.check-line input { width: auto; }

/* --- Barre de test [DEV LOCAL] --- */
.dev-bar {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: repeating-linear-gradient(45deg, #2b2420, #2b2420 10px, #332b25 10px, #332b25 20px);
  color: #f4e7c8; padding: .35rem .8rem; font-size: .82rem;
}
.dev-bar .dev-tag { background: var(--gold); color: #2b2420; font-weight: 800; border-radius: 6px; padding: 1px 7px; letter-spacing: .5px; }
.dev-bar label { color: #f4e7c8; font-weight: 600; margin: 0; display: flex; align-items: center; gap: .4rem; }
.dev-bar select { background: #fff; color: var(--ink); border-radius: 6px; padding: .2rem .4rem; font-size: .82rem; }
.dev-bar .dev-logout { color: #e9c9a0; margin-left: auto; }

/* --- Programme : agenda + activites --- */
.act-list { list-style: none; margin: 0; padding: 0; }
.act-item { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.act-item:last-child { border-bottom: 0; }
.act-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.act-time { display: inline-block; background: var(--wine); color: #fff; border-radius: 6px; padding: 0 .4rem; font-size: .82rem; font-weight: 700; }
.act-notes { font-size: .88rem; }
.act-actions { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.act-actions form { margin: 0; }

/* --- Box repliables "Gerer" (details/summary avec titre) --- */
.manage-box { border-top: 1px dashed var(--line); padding-top: .6rem; margin-top: .6rem; }
.manage-box:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.manage-box > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .4rem; }
.manage-box > summary::-webkit-details-marker { display: none; }
.manage-box > summary::before { content: "\25B8"; color: var(--gold); font-weight: 700; }
.manage-box[open] > summary::before { content: "\25BE"; }
.manage-box > summary h2 { display: inline; margin: 0; }
.manage-box[open] > summary { margin-bottom: .7rem; }

/* --- Logistique --- */
.logi-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.logi-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.logi-list li:last-child { border-bottom: 0; }
.room-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .6rem; }
@media (min-width: 560px) { .room-list { grid-template-columns: 1fr 1fr; } }
.room { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.room-head { display: flex; align-items: center; gap: .5rem; }
.room-head form { margin-left: auto; }
.room-occ { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.bring-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.bring-list li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.bring-list li:last-child { border-bottom: 0; }
.bring-list li.is-claimed .bring-label { color: var(--muted); }
.bring-label { flex: 1; }
.bring-act { display: flex; align-items: center; gap: .3rem; }
.bring-act form { margin: 0; }
.pack-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.pack-list li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.pack-list li.is-checked .pack-label { text-decoration: line-through; color: var(--muted); }
.pack-check { background: none; border: 0; cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--wine); padding: 0; }
.pack-label { flex: 1; }
.suggest-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-add { background: #efe7da; border: 1px dashed var(--gold); cursor: pointer; font: inherit; }
.chip-add:hover { background: #e6dccb; }

/* --- Repas & courses --- */
.diet-box p { margin: .2rem 0; font-size: .9rem; }
.meal-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.meal { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.meal:last-child { border-bottom: 0; }
.meal-head strong { color: var(--wine); }
.meal-act { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .35rem; }
.meal-act form, .meal-act details { margin: 0; }
.meal-act summary { display: inline-block; list-style: none; }
.meal-act summary::-webkit-details-marker { display: none; }

.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-item { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.shop-item:last-child { border-bottom: 0; }
.shop-main { display: flex; align-items: center; gap: .5rem; flex: 1; margin: 0; cursor: pointer; }
.shop-check { width: 20px; height: 20px; }
.shop-item.is-checked .shop-label { text-decoration: line-through; color: var(--muted); }
.shop-by { white-space: nowrap; }
.shop-list .inline-mini { margin: 0; }

/* --- Chat --- */
.badge-on-btn { background: #fff; color: var(--wine); margin-left: .3rem; }
.thread-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; align-items: flex-start; }
.thread-tab { display: inline-block; background: #efe7da; color: var(--ink); border-radius: 14px; padding: .35rem .8rem; font-size: .88rem; font-weight: 600; }
.thread-tab:hover { text-decoration: none; background: #e6dccb; }
.thread-tab.is-active { background: var(--wine); color: #fff; }
.thread-new summary { cursor: pointer; list-style: none; }
.thread-new summary::-webkit-details-marker { display: none; }

.chat-box { background: #fbf7f0; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; }
.msg { max-width: 85%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .4rem .6rem; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: #f0e7d6; border-color: #e3d7bf; }
.msg-head { font-size: .75rem; color: var(--muted); }
.msg-author { font-weight: 700; color: var(--wine); }
.msg-body { margin: .15rem 0; word-wrap: break-word; }
.msg-body .mention { color: var(--wine); font-weight: 700; background: #f3e7d0; border-radius: 4px; padding: 0 3px; }
.msg-photo img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; margin: .2rem 0; }
.msg-place { font-size: .85rem; }
.msg-react { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
.react-btn { background: #f3eee6; border: 1px solid var(--line); border-radius: 12px; padding: 0 .45rem; font-size: .95rem; cursor: pointer; line-height: 1.5; }
.react-btn.has { background: #fff5e0; border-color: var(--gold); }
.react-btn .rc { font-size: .8rem; font-weight: 700; color: var(--wine); }
.react-add { background: #f3eee6; border: 1px dashed var(--line); border-radius: 12px; padding: 0 .5rem; cursor: pointer; color: var(--muted); font-weight: 700; line-height: 1.5; }
.msg-file { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; font-size: .9rem; font-weight: 600; margin: .2rem 0; }

.chat-composer { display: flex; align-items: flex-end; gap: .3rem; margin-top: .6rem; }
.chat-composer textarea { flex: 1; resize: none; border-radius: 18px; padding: .55rem .8rem; max-height: 120px; }
.chat-icon-btn { font-size: 1.35rem; cursor: pointer; background: none; border: 0; padding: .2rem; line-height: 1; }
.chat-send { border-radius: 18px; }
.chat-hint { margin: .3rem 0 0; min-height: 1em; }

/* Panneau d'emojis */
.emoji-panel { display: grid; grid-template-columns: repeat(8, 1fr); gap: .1rem; max-height: 200px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; margin-top: .4rem; box-shadow: var(--shadow); }
.emoji-panel[hidden] { display: none; }
.emoji-cell { background: none; border: 0; cursor: pointer; font-size: 1.4rem; padding: .15rem; border-radius: 6px; line-height: 1.2; }
.emoji-cell:hover { background: #f3eee6; }

/* --- Page groupe en onglets (Discussion / Evenements / Membres) --- */
.tabpane { display: none; }
.tabpane.is-active { display: block; }
.discussion-frame { width: 100%; height: 66vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fbf7f0; display: block; }
.tabbar { position: sticky; bottom: 0; display: flex; gap: .25rem; background: var(--cream); padding: .4rem 0 .3rem; margin-top: .6rem; z-index: 5; }
.tabbar .tab { flex: 1; background: #efe7da; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; padding: .55rem .4rem; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); }
.tabbar .tab.is-active { background: #fff; color: var(--wine); box-shadow: inset 0 -3px 0 var(--gold); }
.tabbar .tab .badge { background: var(--wine); }

/* Chat en mode embarque (iframe dans la page groupe) */
.chat-embed { height: 100%; margin: 0; background: var(--cream); }
.chat-embed-wrap { display: flex; flex-direction: column; height: 100vh; padding: .4rem .5rem; gap: .4rem; box-sizing: border-box; }
.chat-embed-wrap .chat-box { height: auto; flex: 1; min-height: 0; margin: 0; }
.chat-embed-wrap .chat-composer { margin-top: 0; }
.chat-embed-wrap .thread-tabs { margin-bottom: 0; }

/* Table d'administration des utilisateurs */
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-size: .8rem; }
.admin-table td strong { display: block; }
.admin-table .inline-mini { margin: 0; }

/* --- Galerie photos --- */
.photo-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.photo-upload label { width: 100%; }
.photo-upload input[type=file] { flex: 1 1 200px; width: auto; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.photo-cell { margin: 0; }
.photo-thumb { display: block; width: 100%; aspect-ratio: 1/1; background-size: cover; background-position: center; border-radius: 10px; background-color: #eee; }
.photo-cell figcaption { display: flex; align-items: center; justify-content: space-between; gap: .3rem; margin-top: .2rem; }
.photo-cell figcaption form { margin: 0; }

.photo-view { position: relative; display: flex; align-items: center; justify-content: center; background: #2b2420; border-radius: var(--radius); overflow: hidden; }
.photo-full { max-width: 100%; max-height: 70vh; display: block; }
.photo-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 2.4rem; background: rgba(0,0,0,.35); width: 44px; height: 60px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.photo-nav.prev { left: 0; border-radius: 0 8px 8px 0; }
.photo-nav.next { right: 0; border-radius: 8px 0 0 8px; }
.photo-nav:hover { background: rgba(0,0,0,.55); text-decoration: none; }
.photo-meta .photo-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.photo-meta form { margin: 0; }

/* --- Livre d'or --- */
.guestbook { display: grid; gap: .7rem; }
.gb-entry { margin: 0; background: #fffdf8; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: .7rem .9rem; }
.gb-entry blockquote { margin: 0; font-style: italic; }
.gb-entry figcaption { margin-top: .4rem; font-weight: 600; color: var(--wine); display: flex; align-items: center; gap: .4rem; }
.gb-entry figcaption form { margin: 0 0 0 auto; }

/* --- Historique & statistiques --- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; text-align: center; box-shadow: var(--shadow); }
.stat-n { display: block; font-size: 1.6rem; font-weight: 800; color: var(--wine); line-height: 1.1; }
.stat-l { font-size: .8rem; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 .3rem; }
.tl-item { display: flex; gap: .7rem; padding: .5rem 0; border-left: 2px solid var(--line); padding-left: .9rem; position: relative; }
.tl-item:last-child { border-left-color: transparent; }
.tl-dot { position: absolute; left: -11px; top: .5rem; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.tl-body { display: flex; flex-direction: column; }

/* --- Carte & parcours (Leaflet) --- */
.leaflet-map { height: 60vh; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.place-strip { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; }
.place-thumb { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 8px; border: 2px solid var(--line); background-size: cover; background-position: center; cursor: pointer; }
.place-thumb.armed { border-color: var(--wine); box-shadow: 0 0 0 2px rgba(122,31,43,.25); }
.hidden-form { display: none; }

/* --- Parametres du groupe (zone admin) --- */
.group-settings .inline-form { margin-bottom: .8rem; }
.danger-zone { margin-top: .5rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.danger-zone summary { cursor: pointer; color: var(--err); font-weight: 600; font-size: .9rem; }
.danger-zone .inline-form { margin-top: .6rem; }
