/* Composants partagés. Les couleurs qui dépendent de l'état (sélection, j'aime,
   participation, bouton actif/inactif) restent posées en style inline par le JS,
   exactement comme dans les maquettes. */

/* --- Bouton rond de retour ------------------------------------------------ */
.icon-btn {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 24px;
  background: var(--surface);
  color: var(--blue);
  box-shadow: var(--shadow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--tint); }
.icon-btn svg { display: block; position: relative; left: -1px; }

/* --- Pastilles de filtre / de choix --------------------------------------- */
.chip {
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 21px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip--sm {
  height: 38px;
  padding: 0 16px;
  border-radius: 19px;
  font-size: 14px;
}
.chip--lg {
  height: 52px;
  padding: 0 20px;
  border-radius: 26px;
  font-size: 17px;
  font-weight: 700;
}
.chip--wide { padding: 0 22px; }
.chip--fixed { min-width: 64px; justify-content: center; padding: 0 18px; }
.chip-set { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Bouton d'action de l'en-tête ----------------------------------------- */
.cta {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: 26px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.cta:hover { background: var(--blue-dark); color: #fff; }
.cta__plus { font-size: 24px; line-height: 0; margin-top: -2px; }

/* --- Ligne de liste (rencontres, aide aux devoirs) ------------------------ */
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-row);
  border-left: 6px solid var(--border);
  width: 100%;
}
.row__time { width: 74px; flex: none; text-align: center; }
.row__hour { font-size: 20px; font-weight: 700; color: var(--ink); }
.row__key { font: 500 11px var(--mono); color: var(--muted-2); }
.row__body { flex: 1; min-width: 0; }
.row__body--stack { display: flex; flex-direction: column; gap: 4px; }
.row__title { font-size: 19px; font-weight: 700; color: var(--ink); }
.row__title-line { display: flex; align-items: center; gap: 8px; }
.row__place { font-size: 15px; color: var(--muted); margin-top: 2px; }
.row__place--flat { margin-top: 0; }
.row__meta { text-align: right; flex: none; }
.row__count { font-size: 16px; font-weight: 700; color: var(--muted); }
.row__sub { font-size: 13px; color: var(--muted-2); }
.row__like {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* --- Ligne de la boîte à idées -------------------------------------------- */
.idea-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-row);
  border-left: 6px solid var(--border);
  width: 100%;
}
.idea-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.idea-row__title { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.idea-row__teaser { font-size: 15px; color: var(--muted); line-height: 1.35; text-wrap: pretty; }
.idea-row__meta { font-size: 13px; color: var(--muted-2); }
.idea-like {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 18px;
  cursor: pointer;
}
.idea-like__num { font-size: 19px; font-weight: 700; }
.idea-like__word { font-size: 11px; font-weight: 600; }

/* --- Ligne d'actualité ---------------------------------------------------- */
.news-row {
  display: flex;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-row);
  border-left: 6px solid var(--border);
  width: 100%;
}
.news-row__thumb {
  flex: 0 0 96px;
  height: 76px;
  border-radius: 12px;
  background-image: var(--hatch-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 10px var(--mono);
  color: var(--blue);
  text-align: center;
}
.news-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.news-row__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-row__cat { font: 600 11px var(--mono); color: var(--blue); letter-spacing: 1px; }
.news-row__date { font-size: 13px; color: var(--muted-2); }
.news-row__title { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.22; text-wrap: pretty; }
.news-row__teaser { font-size: 14px; color: var(--muted); line-height: 1.35; text-wrap: pretty; }

/* --- Badges ---------------------------------------------------------------- */
.badge-new {
  height: 20px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--blue);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .4px;
}
.badge-level {
  height: 24px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(23, 54, 93, .16);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}
.badge-level--solid {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: var(--blue);
  font-size: 15px;
  color: #fff;
}
.badge-cat {
  height: 30px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 15px;
  background: var(--blue);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* --- Fiche de détail ------------------------------------------------------- */
.visual {
  border-radius: 18px;
  background-image: var(--hatch);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 13px var(--mono);
  color: var(--blue);
  text-align: center;
}
.visual--pane { flex: 0 0 118px; }
.visual--news { flex: 0 0 232px; background-image: var(--hatch-lg); }

.detail__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -.5px;
  text-wrap: pretty;
}
.detail__title-line { display: flex; align-items: center; gap: 10px; }
.detail__meta { font-size: 18px; color: var(--muted); }
.detail__meta--first { margin-top: 8px; }
.detail__text { font-size: 17px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.detail__note { font-size: 14px; color: var(--muted-2); text-align: center; }

.stats { display: flex; gap: 12px; }
.stat { flex: 1; background: var(--surface); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.stat--wide { flex: 1.4; }
.stat__value { font-size: 26px; font-weight: 700; color: var(--ink); }
.stat__value--sm { font-size: 20px; }
.stat__label { font-size: 14px; color: var(--muted); }

/* --- Fil de commentaires --------------------------------------------------- */
.thread { flex: 1; min-height: 150px; display: flex; flex-direction: column; gap: 10px; }
.thread__head { display: flex; align-items: baseline; gap: 8px; }
.thread__count { font-size: 13px; color: var(--muted-2); }
.thread__list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-gutter: stable;
}
.comment {
  background: var(--surface-3);
  border-radius: 14px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.comment__head { display: flex; align-items: baseline; gap: 8px; }
.comment__author { font-size: 14px; font-weight: 700; color: var(--muted); }
.comment__ago { font-size: 13px; color: var(--comment-time); }
.comment__text { font-size: 15px; line-height: 1.4; color: var(--ink-2); text-wrap: pretty; }

.compose { display: flex; gap: 10px; }
.compose__input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  padding: 0 16px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.compose__send {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

/* --- État vide ------------------------------------------------------------- */
.empty {
  border: 2px dashed var(--border-2);
  border-radius: 14px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted-2);
  text-align: center;
  text-wrap: pretty;
}
.empty--list { border-radius: 16px; padding: 22px; font-size: 16px; color: var(--muted); }

/* --- Champs de saisie ------------------------------------------------------ */
.input {
  height: 58px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-3);
  padding: 0 18px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  width: 100%;
}
.input--tall { height: 64px; padding: 0 20px; font-size: 21px; }
.input--plain { height: 56px; font-size: 17px; font-weight: 400; }
.textarea {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-3);
  padding: 14px 18px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  outline: none;
  resize: none;
  width: 100%;
}
.textarea--grow { flex: 1; }
.hint { font-size: 14px; color: var(--blue); }
.hint--muted { font-size: 14px; color: var(--muted-2); text-wrap: pretty; }

/* Sélecteur d'heure par pas de 15 minutes */
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-3);
  padding: 0 10px;
}
.stepper__btn {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 22px;
  background: var(--tint-2);
  color: var(--blue);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.stepper__value { flex: 1; text-align: center; font-size: 20px; font-weight: 700; color: var(--ink); }

/* --- Grands boutons -------------------------------------------------------- */
.big-btn {
  height: 64px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  padding: 0 20px;
}
.big-btn--sm { font-size: 20px; }
.big-btn--grow { flex: 1; }
.big-btn--pad { flex: none; padding: 0 24px; font-size: 18px; }
.btn-row { display: flex; gap: 12px; }

.ghost-btn {
  height: 52px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
  background: var(--tint);
  cursor: pointer;
  flex: none;
}
.ghost-btn:hover { background: var(--border-2); color: var(--muted); }

/* --- Carte d'aperçu (écrans de création) ----------------------------------- */
.preview-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preview-card--lg { padding: 18px; gap: 10px; }
.preview-card__title { font-size: 16px; font-weight: 700; color: var(--ink); }
.preview-card__title--lg { font-size: 22px; line-height: 1.2; text-wrap: pretty; }
.preview-card__meta { font-size: 16px; color: var(--muted); }
.preview-card__text { font-size: 15px; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.preview-card__text--lg { font-size: 16px; line-height: 1.45; }

.recap { background: var(--surface); border-radius: 14px; padding: 14px 16px; }
.recap__label { font-size: 13px; color: var(--muted-2); margin-bottom: 4px; }
.recap__value { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.35; text-wrap: pretty; }
.recap__value--text { font-size: 16px; font-weight: 400; line-height: 1.45; color: var(--ink-2); }

.notice {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Zone visuelle des aperçus de création (hauteur fixe, comme les maquettes) */
.visual--form { flex: none; height: 120px; }
.visual--form-sm { flex: none; height: 110px; }
.pager__btn:disabled { cursor: default; }

/* Sur un écran moins haut que la maquette (borne 1280 × 800), la fiche défile.
   L'action principale reste alors accessible, collée en bas du volet. */
.detail-actions {
  position: sticky;
  bottom: -26px;
  background: var(--surface-2);
  padding: 10px 0 26px;
  margin: -10px 0 -26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
