:root{
  --bg: #f3f3f3;
  --panel: #e9e9e9;
  --panel2:#f8f8f8;
  --text: #1f1f1f;
  --muted: #565656;
  --gridGap: 6px;
  --border: rgba(0,0,0,0.10);
  --shadow: rgba(0,0,0,0.06);
  --btn: #dcdcdc;
  --btnHover: #cfcfcf;
  --accent: #2b2b2b;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

html,body{ height:100%; }

.app{
  display:grid;
  grid-template-columns: 1fr 420px;
  gap: 14px;
  padding: 14px;
  height: calc(100vh - 28px);
}

.left{
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display:flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.logo{
  width: 70px;
  height: auto;
  border-radius: 90px;
  display: grid;
  place-items: center;
  display: block;
}

.left-header{
  display:flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
}

.title{
  font-weight: 700;
  font-size: 18px;
}

.label{
  font-size: 13px;
  color: var(--muted);
}

.yearSelect{
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
}

.calendarViewport{
  flex: 1;
  overflow: auto;
  padding: 6px;
  border-radius: 10px;
  background: #fefefe;
  border: 1px solid rgba(0,0,0,0.06);
  min-height: 0; /* important pour que flex fonctionne avec overflow */
}

.hint{
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.right{
  display:flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.panel{
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 10px var(--shadow);
}

.panel-title{
  margin: 0 0 10px 0;
  font-size: 16px;
}

.block{
  background: var(--panel);
  border-radius: 10px;
  padding: 10px;
}

.sub-title{
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--accent);
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.col{ min-width:0; }

.input{
  width:100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  color: var(--text);
  margin-top: 6px;
  margin-bottom: 8px;
}

.btn{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.14);
  background: var(--btn);
  cursor:pointer;
  font-weight: 650;
  width: 100%;
  margin-top: 4px;
}
.btn:hover{ background: var(--btnHover); }

.output{
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #f6f6f6;
  border: 1px dashed rgba(0,0,0,0.16);
  min-height: 44px;
  color: var(--text);
  font-size: 14px;
  word-break: break-word;
}

.micro{
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- Calendrier ---------- */

.yearGrid{
  display:flex;
  flex-direction: column;
  gap: 14px;
}

.monthCard{
  padding: 10px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.08);
}

.monthTitle{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.monthTitle span:first-child{
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
}
.monthTitle span:last-child{
  font-size: 12px;
  color: var(--muted);
}

.weekHeader{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--gridGap);
  padding: 0 2px 6px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.monthDays{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--gridGap);
  padding: 0 2px;
}

.dayCell{
  height: 30px;
  border-radius: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.03);
  font-size: 13px;
  color: var(--text);
  /* Pas de lignes visibles : pas de border, juste fond léger */
}

.dayCell.muted{
  opacity: 0.35;
  background: rgba(0,0,0,0.015);
}

.dayCell.today{
  outline: 2px solid rgba(0,0,0,0.28);
  background: rgba(0,0,0,0.05);
  font-weight: 800;
}

@media (max-width: 980px){
  .app{ grid-template-columns: 1fr; height: auto; }
  .calendarViewport{ max-height: 55vh; }
}
n