/* ═══════════════════════════════════════
   COMPOSANTS — Éléments UI réutilisables
═══════════════════════════════════════ */

/* ─── BOUTONS ─── */
.bty {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--y), var(--sand2));
  border: none;
  border-radius: var(--r);
  color: #000;
  font-family: var(--fb);
  font-size: 18px;
  letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245,168,0,.3);
}
.bty:active { opacity: .85; }

.bto {
  padding: 10px 16px;
  background: transparent;
  border: 2px solid var(--y);
  color: var(--y);
  font-family: var(--fb);
  font-size: 14px;
  letter-spacing: 2px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s;
}
.bto:active    { background: var(--ydim); }
.bto:disabled  { opacity: .3; cursor: not-allowed; border-color: var(--txt3); color: var(--txt3); }

.btf {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--y), var(--sand2));
  border: none;
  color: #000;
  font-family: var(--fb);
  font-size: 14px;
  letter-spacing: 2px;
  border-radius: var(--r);
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(245,168,0,.3);
}
.btf:active   { opacity: .82; }
.btf:disabled { opacity: .35; cursor: not-allowed; }

.btd {
  padding: 10px 16px;
  background: transparent;
  border: 2px solid rgba(231,76,60,.5);
  color: var(--red2);
  font-family: var(--fb);
  font-size: 14px;
  letter-spacing: 2px;
  border-radius: var(--r);
  cursor: pointer;
}

.bts {
  padding: 10px 16px;
  background: transparent;
  border: 2px solid var(--border2);
  color: var(--txt2);
  font-family: var(--fb);
  font-size: 14px;
  letter-spacing: 2px;
  border-radius: var(--r);
  cursor: pointer;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: var(--y);
  font-family: var(--fb);
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 14px 18px 8px;
}

/* ─── TAGS / BADGES STATUS ─── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 6px;
  font-family: var(--fb);
  font-size: 15px;
  letter-spacing: 1px;
  border: 2px solid;
}
.tag-g   { color: #fff; background: rgba(46,204,113,.25); border-color: var(--green2); text-shadow: 0 0 8px rgba(57,255,96,.6); }
.tag-r   { color: #fff; background: rgba(231,76,60,.25);  border-color: var(--red2);   text-shadow: 0 0 8px rgba(255,85,69,.6); }
.tag-o   { color: #000; background: var(--y);             border-color: var(--y2); }
.tag-b   { color: var(--blue2); background: rgba(52,152,219,.15); border-color: rgba(93,187,255,.4); }
.tag-dim { color: var(--txt2); background: rgba(255,255,255,.07); border-color: var(--border2); }

/* ─── FORMULAIRES ─── */
.fl {
  font-family: var(--fm);
  font-size: 10px;
  color: var(--olive3);
  letter-spacing: 2px;
  margin-bottom: 6px;
  display: block;
}

.fi {
  width: 100%;
  background: var(--c3);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: var(--r);
  padding: 13px 15px;
  color: var(--txt);
  margin-bottom: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.fi:focus       { border-color: var(--y); box-shadow: 0 0 0 2px var(--ydim); }
.fi::placeholder { color: var(--txt4); }
textarea.fi     { resize: none; }
select.fi {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2300f2ff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─── TOAST ─── */
.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--c2);
  border: 2px solid var(--y);
  color: var(--txt);
  font-family: var(--fr);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--r);
  box-shadow: 0 8px 40px rgba(0,0,0,.8), 0 0 20px var(--yglow);
  z-index: 9999;
  opacity: 0;
  transition: all .22s;
  pointer-events: none;
  max-width: 92vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── MODAL (bottom sheet) ─── */
.mov {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 500;
  display: none;
  align-items: flex-end;
}
.mov.open { display: flex; }

.ms {
  width: 100%;
  background: var(--c2);
  border-top: 3px solid var(--y);
  border-radius: 18px 18px 0 0;
  padding: 20px 20px 44px;
  max-height: 91vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.8);
}
.ms::-webkit-scrollbar { display: none; }

.mh {
  width: 44px;
  height: 4px;
  background: var(--c4);
  border-radius: 2px;
  margin: 0 auto 22px;
}

.mt {
  font-family: var(--fb);
  font-size: 22px;
  color: var(--y);
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-shadow: 0 0 12px var(--yglow);
}

/* ─── CONFIRM DIALOG ─── */
.cov {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cov.open { display: flex; }

.cbox {
  background: var(--c2);
  border: 1px solid var(--cy);
  border-top: 3px solid var(--cy);
  border-radius: var(--r2);
  padding: 28px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,0,0,.9);
}
.cicon  { font-size: 44px; margin-bottom: 12px; }
.ctitle { font-family: var(--fb); font-size: 24px; color: var(--y); letter-spacing: 2px; margin-bottom: 8px; }
.cmsg   { font-family: var(--fr); font-size: 14px; color: var(--txt2); line-height: 1.5; margin-bottom: 24px; }
.cbtns  { display: flex; gap: 10px; }

.cyes {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, var(--y), var(--sand2));
  border: none;
  border-radius: var(--r);
  color: #000;
  font-family: var(--fb);
  font-size: 17px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245,168,0,.3);
}
.cno {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: 2px solid var(--border2);
  border-radius: var(--r);
  color: var(--txt2);
  font-family: var(--fb);
  font-size: 17px;
  letter-spacing: 2px;
  cursor: pointer;
}

/* ─── PANEL NOTIF ─── */
.npanel {
  position: absolute;
  top: var(--hdr);
  right: 0;
  width: min(360px, 96vw);
  background: var(--c2);
  border: 2px solid var(--border2);
  border-top: none;
  border-left: 3px solid var(--y);
  box-shadow: -6px 8px 40px rgba(0,0,0,.9);
  z-index: 300;
  display: none;
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
}
.npanel.open { display: block; }

.nphdr {
  padding: 13px 16px;
  border-bottom: 2px solid var(--border2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--fb);
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--y);
}
.nitem  { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; gap: 10px; }
.ndot2  { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.ntext  { font-size: 13px; color: var(--txt); line-height: 1.4; font-weight: 500; }
.ntime  { font-family: var(--fm); font-size: 10px; color: var(--txt3); margin-top: 3px; }

/* ─── EN-TÊTE SECTION ─── */
.shdr { padding: 18px 18px 10px; display: flex; align-items: center; justify-content: space-between; }
.st {
  font-family: var(--fb);
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--y);
  display: flex;
  align-items: center;
  gap: 7px;
}
.st::before { content: '▶'; font-size: 8px; color: var(--y); }
.sc { font-family: var(--fm); font-size: 11px; color: var(--txt3); }

/* ─── STAT GRID (3 colonnes) ─── */
.sg { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 0 16px 16px; }
.sb {
  background: var(--c2);
  border: 2px solid var(--border2);
  border-radius: var(--r2);
  padding: 14px 10px;
  text-align: center;
  position: relative;
}
.sb::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--olive2), transparent);
}

/* ─── ICÔNE BOUTON ─── */
.ibtn {
  width: 40px;
  height: 40px;
  background: var(--c3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 18px;
  transition: background .15s;
}
.ibtn:active { background: var(--c4); }

.ndot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  background: var(--red2);
  border-radius: 50%;
  border: 2px solid var(--c1);
  display: none;
  animation: blink 1.6s ease-in-out infinite;
}

/* ─── EMPTY STATE ─── */
.empty {
  text-align: center;
  font-family: var(--fm);
  font-size: 12px;
  color: var(--txt3);
  padding: 32px 16px;
  letter-spacing: 1px;
}

/* ─── BARRE DE PROGRESSION ─── */
.pbar  { height: 8px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; position: relative; box-shadow: inset 0 0 12px rgba(0,0,0,.25); }
.pbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  opacity: .45;
}
.pfill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease, background .4s ease, box-shadow .4s ease;
  background: linear-gradient(90deg, #f5d86c, #ffc25b, #ffcd73);
  box-shadow: 0 0 14px rgba(245,216,108,.24), inset 0 0 6px rgba(255,255,255,.16);
  position: relative;
  overflow: hidden;
}
.pfill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,.22), rgba(255,255,255,0), rgba(255,255,255,.22));
  opacity: .25;
  transform: translateX(-100%);
  animation: progressShine 2.4s infinite ease-in-out;
}

@keyframes progressShine {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(20%); }
  100% { transform: translateX(120%); }
}
.pf-y  { background: linear-gradient(90deg, var(--olive), var(--y)); }
.pf-g  { background: linear-gradient(90deg, var(--green), var(--green2)); }
.pf-b  { background: linear-gradient(90deg, #cd7f32, #d9a25e); }

/* ─── DATA CELL ─── */
.dc { background: var(--c3); border-radius: var(--r); padding: 12px 14px; }
.dl { font-family: var(--fm); font-size: 10px; color: var(--txt3); letter-spacing: 1px; margin-bottom: 6px; }
.dv { font-family: var(--fb); font-size: 22px; color: var(--txt); }
