/* ============================================================
   COLLECTE ALIMENTAIRE — Flat v7
   css/collecte.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&family=DM+Mono:wght@400;500&display=swap');

.hidden { display: none !important; }

/* ══ OVERRIDE HERO nosactions.css — version claire ═════════ */
.actions-hero {
  height: auto;
  min-height: 0;
  padding: 5rem 0 4rem;
  background: var(--BodyBackground) !important;
  border-bottom: 1px solid var(--border);
}
.actions-hero-bg {
  display: none;
}
.actions-hero-scroll {
  display: none;
}
.actions-hero-content {
  text-align: left;
  padding: 0;
  max-width: 90%;
  margin: 0 auto;
}
.actions-hero-eyebrow {
  justify-content: flex-start;
  color: var(--text-secondary);
  opacity: 1;
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .22em;
}
.actions-hero-eyebrow::before {
  background: var(--text-secondary);
}
.actions-hero-eyebrow::after {
  display: none;
}
.actions-hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--sectiontitlecolor);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -.03em;
}
.actions-hero-divider {
  background: var(--border);
  margin: 0 0 1.2rem;
}
.actions-hero-desc {
  color: var(--text-secondary);
  font-size: .93rem;
  font-weight: 300;
  margin: 0;
  max-width: 560px;
}

/* ══ TABS ══════════════════════════════════════════════════ */
.collecte-tabs {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 62px;
  z-index: 900;
  background: var(--BodyBackground);
}
.collecte-tabs-inner {
  max-width: 90%;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.collecte-tabs-inner::-webkit-scrollbar { display: none; }
.ctab {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .95rem 1.4rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s, border-color .18s;
  flex-shrink: 0;
  background: none;
  font-family: 'DM Sans', sans-serif;
}
.ctab i { font-size: .74rem; opacity: .5; }
.ctab:hover { color: var(--text-primary); }
.ctab.active { color: var(--text-primary); border-bottom-color: var(--primary); font-weight: 700; }
body.dark-mode .ctab.active { border-bottom-color: #fff; }

/* ══ SECTIONS ══════════════════════════════════════════════ */
.collecte-page { padding-top: 0; }
.c-section { padding: 5rem 0; border-bottom: 1px solid var(--border); }
.c-section.alt { background: var(--section1); }
.c-inner { max-width: 90%; margin: 0 auto; }

.c-eyebrow {
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: .5rem;
  font-family: 'DM Mono', monospace;
}
.c-eyebrow::before { content: ''; width: 14px; height: 1px; background: currentColor; opacity: .4; }
.c-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--sectiontitlecolor);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: .7rem;
  font-family: 'DM Sans', sans-serif;
}
.c-desc { font-size: .93rem; color: var(--text-secondary); line-height: 1.85; max-width: 580px; font-weight: 300; }

/* ══ PLANNING ══════════════════════════════════════════════ */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.day-card { border-right: 1px solid var(--border); }
.day-card:last-child { border-right: none; }

.day-header {
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  border-bottom: 1px solid var(--border);
  background: var(--section1);
}
.day-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: var(--text-secondary); flex-shrink: 0;
}
.day-title h3 { font-size: .92rem; font-weight: 700; color: var(--text-primary); margin: 0 0 1px; font-family: 'DM Sans', sans-serif; }
.day-sub { font-size: .68rem; color: var(--text-secondary); margin: 0; font-family: 'DM Mono', monospace; }

.stores-list { display: flex; flex-direction: column; }
.store-block { border-bottom: 1px solid var(--border); }
.store-block:last-child { border-bottom: none; }
.store-head { display: flex; align-items: center; gap: .65rem; padding: .75rem 1.5rem; border-bottom: 1px solid var(--border); }
.store-ico { width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: .62rem; flex-shrink: 0; }
.store-name { font-weight: 600; font-size: .84rem; color: var(--text-primary); font-family: 'DM Sans', sans-serif; }

.slots-wrap { padding: .85rem 1.2rem; display: flex; flex-wrap: wrap; gap: 6px; }
.slot {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border); border-radius: 6px; padding: 9px 13px;
  cursor: pointer; transition: background .14s; flex: 1 1 calc(50% - 6px);
  min-width: 165px; gap: 8px; background: transparent;
}
.slot.ok:hover { background: var(--section1); }
body.dark-mode .slot.ok:hover { background: rgba(255,255,255,.04); }
.slot.full { opacity: .3; cursor: not-allowed; }

.slot-time { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--text-primary); font-family: 'DM Mono', monospace; font-weight: 500; flex: 1; }
.slot-time i { font-size: .65rem; color: var(--text-secondary); opacity: .6; flex-shrink: 0; }

.slot-badge { font-size: .67rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; font-family: 'DM Mono', monospace; flex-shrink: 0; }
.slot-badge.available { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.slot-badge.partial   { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.slot-badge.full      { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
body.dark-mode .slot-badge.available { background: rgba(34,197,94,.1);  color: #86efac; border-color: rgba(34,197,94,.2); }
body.dark-mode .slot-badge.partial   { background: rgba(234,179,8,.1);  color: #fde68a; border-color: rgba(234,179,8,.2); }
body.dark-mode .slot-badge.full      { background: rgba(239,68,68,.1);  color: #fca5a5; border-color: rgba(239,68,68,.2); }

/* ══ FORMULAIRE ════════════════════════════════════════════ */
.c-card { margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 2.2rem; }
.c-card-head { display: flex; align-items: center; gap: .9rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.c-card-ico { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: .9rem; color: var(--text-secondary); flex-shrink: 0; }
.c-card-head h2 { font-size: .95rem; font-weight: 700; color: var(--text-primary); margin: 0 0 2px; font-family: 'DM Sans', sans-serif; }
.c-card-head p { font-size: .74rem; color: var(--text-secondary); margin: 0; }
.c-card-body { background: transparent; padding: 0; }

.sel-display { border: 1px solid var(--border); border-left: 2px solid var(--text-secondary); border-radius: 6px; padding: .95rem 1.1rem; margin-bottom: 1.6rem; background: var(--section1); }
.sel-label { font-size: .57rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .2em; display: flex; align-items: center; gap: 5px; margin-bottom: .7rem; font-family: 'DM Mono', monospace; }
.sel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sel-item { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-primary); }
.sel-item i { color: var(--text-secondary); font-size: .7rem; width: 13px; flex-shrink: 0; opacity: .7; }

.dur-label {
  font-size: .6rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: .6rem;
  font-family: 'DM Mono', monospace;
}

.dur-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.dur-btn {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  color: #aaa;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  background: #111;

  /* effet subtil */
  box-shadow: inset 0 0 0 0 rgba(255,255,255,0.05);
}

.dur-btn:hover {
  color: #fff;
  border-color: #555;
  background: #181818;
  transform: translateY(-1px);
}

.dur-btn.active {
  border-color: #fff;
  color: #fff;
  font-weight: 700;
  background: #1c1c1c;

  /* effet glow léger */
  box-shadow: 0 0 0 1px #fff, 0 4px 14px rgba(255,255,255,0.08);
}

/* effet clic */
.dur-btn:active {
  transform: scale(0.97);
}

.fg { margin-bottom: 1.1rem; }
.fg label { display: flex; align-items: center; gap: 5px; font-size: .58rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; font-family: 'DM Mono', monospace; }
.fg label i { font-size: .58rem; opacity: .55; }
.fg input, .fg select { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 6px; font-size: .9rem; color: var(--text-primary); background: transparent; transition: border-color .14s; box-sizing: border-box; font-family: 'DM Sans', sans-serif; appearance: none; }
.fg input::placeholder { color: var(--text-secondary); opacity: .4; }
.fg input:focus, .fg select:focus { outline: none; border-color: var(--text-primary); }
.fg select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.btn-submit { width: 100%; padding: 12px 18px; background: var(--primary); color: #fff; border: none; border-radius: 6px; font-size: .84rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; transition: opacity .16s; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 6px; font-family: 'DM Sans', sans-serif; }
.btn-submit:hover { opacity: .82; }

.alert { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 6px; font-size: .84rem; font-weight: 500; margin-bottom: 1.1rem; border: 1px solid var(--border); }
.alert-success { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.alert-error   { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
body.dark-mode .alert-success { color: #86efac; background: rgba(34,197,94,.07); border-color: rgba(34,197,94,.18); }
body.dark-mode .alert-error   { color: #fca5a5; background: rgba(239,68,68,.07); border-color: rgba(239,68,68,.18); }

/* ══ TICKET ════════════════════════════════════════════════ */
.ticket { border-top: 1px solid var(--border); padding: 2.2rem 0; text-align: center; margin-top: 2rem; }
.ticket h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 0 0 1.4rem; display: flex; align-items: center; justify-content: center; gap: 7px; font-family: 'DM Sans', sans-serif; }

/* Numéro séquentiel type badge sportif */
.ticket-num-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.8rem;
}
.ticket-num-label {
  font-family: 'DM Mono', monospace;
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: .65;
}
.ticket-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 3.4rem;
  font-weight: 800;
  width: 130px;
  height: 90px;
  border-radius: 10px;
  letter-spacing: .06em;
  font-family: 'DM Mono', monospace;
  line-height: 1;
}
.ticket-num-sub {
  font-family: 'DM Mono', monospace;
  font-size: .52rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: .5;
}
.ticket-info { text-align: left; border-top: 1px solid var(--border); padding-top: 1.1rem; display: flex; flex-direction: column; gap: 9px; }
.ticket-info p { display: flex; align-items: center; gap: 7px; font-size: .83rem; color: var(--text-secondary); margin: 0; }
.ticket-info p strong { color: var(--text-primary); font-weight: 600; }
.ticket-info i { color: var(--text-secondary); width: 13px; text-align: center; font-size: .7rem; flex-shrink: 0; opacity: .65; }

/* ══ ADMIN CONNEXION ═══════════════════════════════════════ */
.login-card { max-width: 440px; margin: 3.5rem auto 0; }
.login-head { text-align: center; padding-bottom: 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.login-head > i { font-size: 2.2rem; color: var(--text-secondary); display: block; margin-bottom: .8rem; opacity: .5; }
.login-head h2 { color: var(--text-primary); font-size: 1.35rem; font-weight: 800; margin: 0 0 5px; font-family: 'DM Sans', sans-serif; letter-spacing: -.03em; }
.login-head p { color: var(--text-secondary); font-size: .82rem; margin: 0; }
.login-body { padding: 0; }
.pwd-wrap { position: relative; }
.pwd-wrap input { width: 100%; padding: 13px 44px 13px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: .98rem; background: transparent; color: var(--text-primary); box-sizing: border-box; font-family: 'DM Mono', monospace; letter-spacing: .1em; transition: border-color .14s; }
.pwd-wrap input:focus { outline: none; border-color: var(--text-primary); }
.pwd-wrap input::placeholder { letter-spacing: .16em; opacity: .3; }
.pwd-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; display: flex; font-size: .9rem; transition: color .14s; }
.pwd-eye:hover { color: var(--text-primary); }

/* ══ ADMIN DASHBOARD ════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 2rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stat-card { padding: 1.4rem 1.1rem; text-align: center; border-right: 1px solid var(--border); }
.stat-card:last-child { border-right: none; }
.stat-card i { font-size: 1rem; color: var(--text-secondary); margin-bottom: 7px; display: block; opacity: .55; }
.stat-card h3 { font-size: 1.7rem; font-weight: 800; color: var(--text-primary); margin: 0 0 2px; font-family: 'DM Sans', sans-serif; letter-spacing: -.03em; }
.stat-card p { font-size: .58rem; color: var(--text-secondary); margin: 0; text-transform: uppercase; letter-spacing: .12em; font-family: 'DM Mono', monospace; }

.admin-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.6rem; }
.admin-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; border-radius: 6px; font-size: .78rem; font-weight: 500; cursor: pointer; border: 1px solid var(--border); transition: border-color .14s, color .14s; background: transparent; color: var(--text-primary); font-family: 'DM Sans', sans-serif; text-decoration: none; }
.btn:hover { border-color: var(--text-primary); }
.btn.danger { color: #dc2626; border-color: rgba(220,38,38,.25); }
.btn.danger:hover { border-color: rgba(220,38,38,.6); }
.logout-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; background: transparent; color: #dc2626; border: 1px solid rgba(220,38,38,.25); border-radius: 6px; font-size: .78rem; font-weight: 500; cursor: pointer; transition: border-color .14s; font-family: 'DM Sans', sans-serif; }
.logout-btn:hover { border-color: rgba(220,38,38,.6); }

.filter-bar { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.filter-grp { display: flex; flex-direction: column; gap: 3px; }
.filter-grp > span { font-size: .56rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .14em; font-family: 'DM Mono', monospace; }
.fsel { padding: 7px 30px 7px 11px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text-primary); font-family: 'DM Sans', sans-serif; font-size: .8rem; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.fsel:focus { outline: none; border-color: var(--text-primary); }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; font-family: 'DM Sans', sans-serif; }
thead { border-bottom: 1px solid var(--border); }
thead th { padding: 11px 14px; color: var(--text-secondary); font-weight: 600; text-align: left; font-size: .57rem; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; font-family: 'DM Mono', monospace; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--section1); }
body.dark-mode tbody tr:hover { background: rgba(255,255,255,.025); }
tbody td { padding: 11px 14px; color: var(--text-primary); vertical-align: middle; }
tbody td strong { font-family: 'DM Mono', monospace; font-size: .74rem; letter-spacing: .05em; color: var(--text-secondary); }
.btn-del { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: transparent; color: #dc2626; border: 1px solid rgba(220,38,38,.22); border-radius: 5px; font-size: .7rem; font-weight: 500; cursor: pointer; transition: border-color .14s; font-family: inherit; }
.btn-del:hover { border-color: rgba(220,38,68,.55); }

.empty { text-align: center; padding: 4rem 1rem; }
.empty i { font-size: 2rem; opacity: .14; margin-bottom: .8rem; display: block; color: var(--text-secondary); }
.empty h3 { font-size: .95rem; font-weight: 600; color: var(--text-primary); margin: 0; font-family: 'DM Sans', sans-serif; }

/* ══ RESPONSIVE ════════════════════════════════════════════ */
@media(max-width:900px) {
  .collecte-tabs { top: 56px; }
  .sel-grid { grid-template-columns: 1fr; }
  .c-section { padding: 3.5rem 0; }
  .planning-grid { grid-template-columns: 1fr; }
  .day-card { border-right: none; border-bottom: 1px solid var(--border); }
  .day-card:last-child { border-bottom: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(even) { border-right: none; }
  .stat-card { border-bottom: 1px solid var(--border); }
  .stat-card:last-child { border-bottom: none; }
  .stat-card:nth-last-child(2):nth-child(odd) { border-bottom: none; }
  .actions-hero-content { text-align: center; }
  .actions-hero-eyebrow { justify-content: center; }
  .actions-hero-desc { max-width: 100%; }
}
@media(max-width:600px) {
  .slot { flex: 1 1 100%; }
  .filter-bar { flex-direction: column; }
  .admin-bar { flex-direction: column; align-items: flex-start; }
  .ticket-num { font-size: 2.4rem; width: 100px; height: 72px; }
  .login-head h2 { font-size: 1.2rem; }
  .actions-hero { padding: 3.5rem 0 3rem; }
}

/* ══ DARK MODE — SELECT / DROPDOWN ════════════════════════════
   Fix : en mode sombre le fond "transparent" laisse le navigateur
   rendre un dropdown blanc avec du texte blanc → illisible.
   On force un fond sombre et le texte clair sur tous les <select>.
   ══════════════════════════════════════════════════════════════ */
body.dark-mode .fg select,
body.dark-mode .fsel {
  background-color: #1a1a1a;
  color: var(--text-primary);
  border-color: var(--border);
}

/* Options à l'intérieur du dropdown natif */
body.dark-mode .fg select option,
body.dark-mode .fsel option {
  background-color: #1a1a1a;
  color: var(--text-primary);
}

/* Placeholder / option désactivée ("— Choisir une journée —") */
body.dark-mode .fg select option[value=""],
body.dark-mode .fsel option[value=""] {
  color: var(--text-secondary);
}