/* =========================================================
   BASE
========================================================= */
*{ box-sizing:border-box }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:#0f172a;
  color:#e5e7eb;
}

/* =========================================================
   TOP BAR
========================================================= */
.top{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:18px 22px;
  background:#020617;
  border-bottom:1px solid rgba(148,163,184,.15);
}

.title{
  margin:0;
  font-size:1.6rem;
  font-weight:900;
}

.topActions{
  display:flex;
  gap:10px;
}

.btn{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.25);
  background:rgba(148,163,184,.08);
  color:#e5e7eb;
  font-weight:700;
  cursor:pointer;
}

/* =========================================================
   ANNÉES
========================================================= */
.yearTitle{
  margin:30px 22px 10px;
  font-size:1.4rem;
  font-weight:900;
}

.year{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
  padding:18px 22px 32px;
  border-radius:26px;
  margin-bottom:30px;
}

.year-0{ background:rgba(59,130,246,.07) }
.year-1{ background:rgba(16,185,129,.07) }
.year-2{ background:rgba(234,179,8,.07) }

@media (max-width:1200px){
  .year{ grid-template-columns:repeat(2,1fr) }
}
@media (max-width:700px){
  .year{ grid-template-columns:1fr }
}

/* =========================================================
   MOIS / GRILLE
========================================================= */
.monthCard{
  background:#020617;
  border-radius:18px;
  padding:14px;
}

.monthHeader{
  font-weight:900;
  font-size:1.05rem;
  color:#93c5fd;
  margin:4px 6px 10px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
}

.dayLabel{
  text-align:center;
  font-size:.75rem;
  font-weight:800;
  color:#64748b;
}

/* =========================================================
   CASE JOUR (COMPACT PAR DÉFAUT)
========================================================= */
.day{
  position:relative;
  isolation:isolate;
  background:#f8fafc;
  color:#020617;
  border-radius:10px;
  padding:4px;
  height:60px;
  border:2px solid #e5e7eb;
  display:flex;
  flex-direction:column;
  gap:4px;
  cursor:pointer;
  overflow:hidden;
}

.dayNum{
  font-size:.75rem;
  font-weight:900;
  color:#1e293b;
}

.day.empty{
  background:transparent;
  border:none;
  cursor:default;
}

/* =========================================================
   TEXTE ÉVÉNEMENT (EN GRAS)
========================================================= */
.preview{
  background:rgba(255,255,255,.95);
  border-radius:6px;
  padding:3px 5px;
  font-size:.65rem;
  line-height:1.15;
  font-weight:700;           /* 👈 GRAS */
  border-left:4px solid #2563eb;
}

/* =========================================================
   TYPES
========================================================= */
.day.type-ferie,
.day.weekend{
  background:#f87171;
  border-color:#7f1d1d;
}
.day.type-conge{
  background:#fb923c;
  border-color:#9a3412;
}
.day.type-charlie{
  background:#38bdf8;
  border-color:#075985;
}
.day.type-sandrine{
  background:#f472b6;
  border-color:#9d174d;
}
.day.type-tous{
  background:#facc15;
  border-color:#854d0e;
}

/* =========================================================
   JOURS PASSÉS — GRIS CONTRASTÉ
========================================================= */
.day.past-day::before{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.55);
  border-radius:10px;
  z-index:10;
  pointer-events:none;
}

.day.past-day > *{
  position:relative;
  z-index:20;
}

.day.past-day .dayNum{
  color:#e5e7eb;
}

/* =========================================================
   MODAL
========================================================= */
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:1000;
}
.modal.open{ display:block }

.modalBackdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}

.modalCard{
  position:relative;
  max-width:520px;
  margin:8vh auto 0;
  background:#020617;
  border-radius:18px;
  padding:16px;
}

.modalForm{
  display:grid;
  gap:10px;
}

.modalForm textarea,
.modalForm select{
  width:100%;
  background:#0f172a;
  color:#e5e7eb;
  border:1px solid rgba(148,163,184,.25);
  border-radius:12px;
  padding:10px;
}
