/* La Chaloupe – Gestion v2.0 — Flat design, lisible, accessible */

:root {
  --lc-primary:      #2563eb;
  --lc-success:      #16a34a;
  --lc-danger:       #dc2626;
  --lc-warning:      #d97706;
  --lc-neutral:      #64748b;
  --lc-border:       #e2e8f0;
  --lc-bg:           #f8fafc;
  --lc-card-bg:      #ffffff;
  --lc-text:         #1e293b;
  --lc-text-soft:    #64748b;
  --lc-radius:       6px;
}

/* ── Base ─────────────────────────────────────────────────── */
#lc-admin-root, #lc-public-root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--lc-text);
  max-width: 960px; margin: 0 auto; padding: 20px 16px;
}
#lc-admin-root *, #lc-public-root * { box-sizing: border-box; }
#lc-admin-root h1, #lc-admin-root h2, #lc-admin-root h3 {
  font-family: inherit; text-transform: none; letter-spacing: normal;
}

/* ── Titre app ────────────────────────────────────────────── */
.lc-app-titre {
  font-size: 1.3rem; font-weight: 700; margin: 0 0 20px;
  padding-bottom: 16px; border-bottom: 2px solid var(--lc-border);
}

/* ── Onglets ──────────────────────────────────────────────── */
.lc-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 2px solid var(--lc-border); margin-bottom: 28px;
}
.lc-tab {
  background: none; border: none; border-bottom: 3px solid transparent;
  margin-bottom: -2px; padding: 11px 18px; font-size: 15px; font-weight: 500;
  color: var(--lc-text-soft); cursor: pointer; white-space: nowrap;
  font-family: inherit; transition: color .15s;
}
.lc-tab:hover { color: var(--lc-text); }
.lc-tab--active { color: var(--lc-primary); border-bottom-color: var(--lc-primary); font-weight: 700; }

/* ── Boutons ──────────────────────────────────────────────── */
.lc-btn {
  display: inline-block; padding: 10px 22px; border-radius: var(--lc-radius);
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  font-family: inherit; transition: opacity .15s; text-align: center; line-height: 1.4;
  margin: 0 6px 6px 0;
}
.lc-btn:hover   { opacity: .87; }
.lc-btn:active  { opacity: .72; }
.lc-btn:disabled { opacity: .4; cursor: not-allowed; }
.lc-btn--primary   { background: var(--lc-primary); color: #fff; }
.lc-btn--secondary { background: #fff; color: var(--lc-text); border: 1px solid var(--lc-border); }
.lc-btn--secondary:hover { background: var(--lc-bg); }
.lc-btn--danger    { background: var(--lc-danger);  color: #fff; }
.lc-btn--ghost     { background: transparent; color: var(--lc-text-soft); border: 1px solid var(--lc-border); padding: 6px 14px; font-size: 13px; }
.lc-btn--ghost:hover { background: var(--lc-bg); color: var(--lc-text); }

/* ── Barre du haut ────────────────────────────────────────── */
.lc-top-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

/* ── Sections ─────────────────────────────────────────────── */
.lc-section__titre {
  font-size: 15px; font-weight: 700; text-transform: none;
  letter-spacing: 0; color: var(--lc-text);
  margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--lc-border);
}

/* ── Cartes ───────────────────────────────────────────────── */
.lc-card {
  background: var(--lc-card-bg); border: 1px solid var(--lc-border);
  border-left: 4px solid var(--lc-primary);
  border-radius: var(--lc-radius); padding: 18px 20px; margin-bottom: 10px;
}
.lc-card--past  { opacity: .55; }
.lc-card--warn  { border-left-color: var(--lc-warning); background: #fffbeb; }
.lc-card--public { border-left-color: var(--lc-primary); }

.lc-card__head   { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.lc-card__titre  { font-size: 16px; font-weight: 700; flex: 1 1 200px; }
.lc-card__date   { font-size: 14px; color: var(--lc-text-soft); flex: 1 1 200px; }
.lc-card__detail { font-size: 14px; color: var(--lc-text-soft); }
.lc-card__nom    { font-weight: 700; font-size: 16px; }
.lc-card__msg    { font-style: italic; color: var(--lc-text-soft); font-size: 14px; margin: 4px 0; }
.lc-card__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-card__places { font-size: 14px; color: var(--lc-success); font-weight: 600; margin: 4px 0; }
.lc-cand-row    { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--lc-border); margin-top: 8px; font-size: 15px; }

/* ── Badges ───────────────────────────────────────────────── */
.lc-badge {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 700; color: #fff;
}
.lc-badge--ok      { background: var(--lc-success); }
.lc-badge--warn    { background: var(--lc-warning); }
.lc-badge--danger  { background: var(--lc-danger);  }
.lc-badge--neutral { background: var(--lc-neutral); }

/* ── États ────────────────────────────────────────────────── */
.lc-loading { color: var(--lc-text-soft); font-style: italic; padding: 20px 0; }
.lc-error   { color: var(--lc-danger); padding: 10px 0; }
.lc-empty   {
  color: var(--lc-text-soft); text-align: center; padding: 32px 20px;
  background: var(--lc-bg); border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius); font-size: 15px;
}
.lc-success { color: var(--lc-success); font-weight: 600; }
.lc-hint    { color: var(--lc-text-soft); font-size: 14px; margin: 0 0 14px; }
.lc-sep     { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--lc-text-soft); margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--lc-border); }

/* ── Formulaires ──────────────────────────────────────────── */
.lc-field    { margin-bottom: 16px; }
.lc-label    { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--lc-text-soft); margin-bottom: 6px; }
.lc-input {
  display: block; width: 100%; padding: 11px 14px;
  border: 1px solid var(--lc-border); border-radius: var(--lc-radius);
  font-size: 16px; font-family: inherit; color: var(--lc-text); background: #fff;
  transition: border-color .15s, box-shadow .15s; margin: 0;
}
.lc-input:focus { outline: none; border-color: var(--lc-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
select.lc-input { height: auto; }
textarea.lc-input { resize: vertical; min-height: 80px; }
.lc-form-grid { display: grid; gap: 4px; }
.lc-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.lc-checkbox-wrap { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.lc-checkbox      { width: 18px; height: 18px; accent-color: var(--lc-primary); cursor: pointer; flex-shrink: 0; }
.lc-color-input   { width: 46px; height: 40px; padding: 2px; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); cursor: pointer; background: none; flex-shrink: 0; }
.lc-hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.lc-jours { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.lc-jour-label { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; padding: 6px 12px; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); }

/* ── Inscrits ─────────────────────────────────────────────── */
.lc-inscrits { list-style: none; padding: 0; margin: 0 0 16px; }
.lc-inscrit {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  border-top: 1px solid var(--lc-border); font-size: 15px; flex-wrap: wrap;
}
.lc-inscrit--ref   { font-weight: 700; }
.lc-inscrit__nom   { font-weight: 600; flex: 1; }
.lc-inscrit__detail { font-size: 13px; color: var(--lc-text-soft); flex: 1 1 140px; }
.lc-inscrits-pub   { list-style: none; padding: 0; margin: 10px 0; }
.lc-inscrits-pub li { font-size: 15px; padding: 4px 0; color: var(--lc-text-soft); }
.lc-ref-btn  { background: none; border: none; font-size: 20px; cursor: pointer; padding: 0; line-height: 1; color: #cbd5e1; transition: color .15s; flex-shrink: 0; }
.lc-ref-btn:hover   { color: #f59e0b; }
.lc-ref-btn--on     { color: #f59e0b; }
.lc-ref-label { font-size: 12px; background: #fffbeb; color: #92400e; padding: 2px 8px; border-radius: 4px; border: 1px solid #fde68a; font-weight: 600; }

/* ── Autocomplétion ───────────────────────────────────────── */
.lc-suggest {
  background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.1); margin-bottom: 10px; overflow: hidden;
}
.lc-suggest__item { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--lc-border); }
.lc-suggest__item:last-child { border-bottom: none; }
.lc-suggest__item:hover { background: var(--lc-bg); }
.lc-suggest__nom    { font-weight: 600; }
.lc-suggest__detail { font-size: 13px; color: var(--lc-text-soft); }

/* ── Modale ───────────────────────────────────────────────── */
.lc-modale-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 10000;
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto;
}
.lc-modale {
  background: #fff; border-radius: 8px; width: 100%; max-width: 520px; margin: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden;
}
.lc-modale__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--lc-border);
}
.lc-modale__titre { font-size: 1.1rem; font-weight: 700; margin: 0; }
.lc-modale__close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--lc-text-soft); padding: 0; line-height: 1; }
.lc-modale__body  { padding: 24px; }
.lc-modale__footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--lc-border); flex-wrap: wrap; }

/* ── Paramètres ───────────────────────────────────────────── */
.lc-param-card { background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); padding: 24px; margin-bottom: 20px; }
.lc-param-card__titre { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; }
.lc-cat-row   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--lc-border); font-size: 15px; }
.lc-cat-row:last-child { border-bottom: none; }
.lc-cat-row--add { padding-top: 16px; }
.lc-cat-dot   { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.lc-cat-nom   { font-weight: 600; flex: 1; min-width: 80px; }
.lc-res-list  { margin-top: 12px; }
.lc-code { display: block; background: #1e293b; color: #7dd3fc; padding: 10px 16px; border-radius: var(--lc-radius); font-family: monospace; font-size: 14px; margin: 4px 0 12px; user-select: all; }

/* ── Passés ───────────────────────────────────────────────── */
.lc-past-toggle { margin: 12px 0; }

/* ── Vue publique ─────────────────────────────────────────── */
.lc-form-pub { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--lc-border); }

/* ── Toast ────────────────────────────────────────────────── */
.lc-toast {
  position: fixed; bottom: 24px; right: 24px; padding: 14px 22px;
  border-radius: var(--lc-radius); font-size: 15px; font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s;
  z-index: 11000; max-width: 340px; box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.lc-toast--visible  { opacity: 1; transform: translateY(0); }
.lc-toast--success  { background: #15803d; color: #fff; }
.lc-toast--error    { background: var(--lc-danger); color: #fff; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  #lc-admin-root, #lc-public-root { font-size: 16px; padding: 14px 12px; }
  .lc-tab   { padding: 9px 12px; font-size: 14px; }
  .lc-row-2 { grid-template-columns: 1fr; }
  .lc-modale { max-width: 100%; }
  .lc-card__head { flex-direction: column; }
}

/* ── Corrections v2.1 ─────────────────────────────────────── */

/* FIX #4 : Réduire les titres dans l'interface admin */
#lc-admin-root h1, #lc-admin-root h2, #lc-admin-root h3 {
  margin-top: 0;
}
.lc-app-titre { font-size: 1.1rem !important; }
.lc-param-card__titre { font-size: .95rem !important; }
.lc-modale__titre { font-size: 1rem !important; }
/* Neutraliser les h1/h2/h3 injectés par le thème Divi */
#lc-admin-root h1 { font-size: 1.1rem; font-weight: 700; }
#lc-admin-root h2 { font-size: .8rem; font-weight: 700; }
#lc-admin-root h3 { font-size: .95rem; font-weight: 600; }

/* FIX #6 : Espace entre nom bénévole et badge "Réf." */
.lc-inscrit { gap: 10px; }
.lc-ref-label {
  margin-left: 4px;
  margin-right: 4px;
}
.lc-inscrits-pub .lc-ref-label {
  margin-right: 6px;
}

/* Onglets : ne pas utiliser la classe lc-btn */
.lc-tab {
  background: none !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  padding: 11px 18px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--lc-text-soft) !important;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  margin: 0 !important;
  border-radius: 0 !important;
}
.lc-tab:hover { color: var(--lc-text) !important; opacity: 1 !important; }
.lc-tab--active { color: var(--lc-primary) !important; border-bottom-color: var(--lc-primary) !important; font-weight: 700 !important; }

/* ── Vue agenda ───────────────────────────────────────────── */
.lc-vue-bar {
  display: flex; gap: 2px; margin-left: auto;
  border: 1px solid var(--lc-border); border-radius: var(--lc-radius); overflow: hidden;
}
.lc-vue-btn {
  background: #fff; border: none; padding: 8px 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; color: var(--lc-text-soft); font-family: inherit; white-space: nowrap;
  transition: background .15s;
}
.lc-vue-btn:hover           { background: var(--lc-bg); color: var(--lc-text); }
.lc-vue-btn--active         { background: var(--lc-primary); color: #fff; font-weight: 700; }
.lc-vue-btn + .lc-vue-btn   { border-left: 1px solid var(--lc-border); }

.lc-top-bar { flex-wrap: wrap; align-items: center; }

.lc-calendrier {
  background: #fff; border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius); padding: 16px; margin-top: 8px;
}
/* FullCalendar overrides */
.lc-calendrier .fc { font-family: inherit; font-size: 14px; }
.lc-calendrier .fc-toolbar-title { font-size: 1em; font-weight: 700; }
.lc-calendrier .fc-button {
  font-size: 13px; padding: 6px 12px; font-family: inherit;
  background: var(--lc-primary) !important; border-color: var(--lc-primary) !important;
  border-radius: var(--lc-radius) !important;
}
.lc-calendrier .fc-button:hover   { opacity: .87 !important; }
.lc-calendrier .fc-button-active  { background: #1d4ed8 !important; border-color: #1d4ed8 !important; }
.lc-calendrier .fc-event          { font-size: 12px; border: none !important; cursor: pointer; }
.lc-calendrier .fc-daygrid-day:hover { background: #eff6ff; cursor: pointer; }

/* ── FIX Divi : texte jaune dans FullCalendar ─────────────── */
.lc-calendrier .fc-col-header-cell-cushion,
.lc-calendrier .fc-daygrid-day-number,
.lc-calendrier .fc-daygrid-week-number,
.lc-calendrier .fc-timegrid-slot-label-cushion,
.lc-calendrier .fc-list-day-text,
.lc-calendrier .fc-list-day-side-text,
.lc-calendrier a {
  color: var(--lc-text) !important;
  text-decoration: none !important;
}
.lc-calendrier .fc-day-today .fc-daygrid-day-number {
  color: var(--lc-primary) !important;
  font-weight: 700;
}
/* Événements : toujours en bloc coloré, jamais en point */
.lc-calendrier .fc-daygrid-event-dot { display: none !important; }
.lc-calendrier .fc-event {
  display: block !important;
  padding: 2px 5px !important;
  border-radius: 3px !important;
  border: none !important;
  cursor: pointer;
}
.lc-calendrier .fc-event-title,
.lc-calendrier .fc-event-time,
.lc-calendrier .fc-event .fc-event-title,
.lc-calendrier .fc-event * {
  color: #fff !important;
  font-weight: 600 !important;
}
.lc-calendrier .fc-daygrid-day-frame { cursor: pointer; }

/* ── Vue publique : sélecteur de vue ──────────────────────── */
.lc-vue-bar--pub {
  margin-bottom: 18px;
  justify-content: flex-end;
}

/* ── Impression ───────────────────────────────────────────── */
@media print {
  .lc-tabs, .lc-top-bar, .lc-vue-bar, .lc-modale-overlay,
  .lc-card__actions, .lc-form-pub, .lc-toast,
  button, .lc-btn { display: none !important; }
  #lc-admin-root, #lc-public-root { max-width: 100%; padding: 0; }
  .lc-card { break-inside: avoid; border: 1px solid #ccc !important; margin-bottom: 8px; }
  .lc-calendrier .fc-toolbar { display: none; }
}

/* Sauvegardes */
.lc-bak-list { margin-top: 8px; }
