/* ═══════════════════════════════════════════════════════
   TY LIEN — Grille du calendrier (classe TyCalendar)
   Utilisée sur le site public et dans l'aperçu admin.
   ═══════════════════════════════════════════════════════ */

.tcal { font-family: 'Sora', sans-serif; }

/* ── Navigation ────────────────────────────────────── */
.tcal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: rgba(var(--fg-rgb),.03);
    border: 1px solid rgba(var(--fg-rgb),.05);
    border-radius: 16px;
}
.tcal__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--white);
    text-align: center;
}
.tcal__nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 100px;
    background: rgba(0,201,123,.1);
    border: 1px solid rgba(0,201,123,.15);
    color: #00c97b;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s;
    min-height: 40px;
}
.tcal__nav-btn:hover {
    background: #00c97b;
    color: var(--dark);
}
.tcal__nav-btn--off {
    opacity: .25;
    pointer-events: none;
}

/* ── Grille ────────────────────────────────────────── */
.tcal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.tcal__dow {
    text-align: center;
    padding: 10px 4px;
    background: rgba(0,201,123,.1);
    color: #00c97b;
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 10px;
}
.tcal__day {
    min-height: 92px;
    padding: 8px;
    background: rgba(var(--fg-rgb),.025);
    border: 1px solid rgba(var(--fg-rgb),.03);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color .2s, background .2s;
}
.tcal__day:hover { border-color: rgba(var(--fg-rgb),.12); }
.tcal__day--out {
    background: transparent;
    border-color: transparent;
}
.tcal__num {
    font-size: .78rem;
    font-weight: 700;
    color: rgba(var(--fg-rgb),.45);
}
.tcal__day--today {
    border-color: #00c97b;
    box-shadow: 0 0 0 1px #00c97b, 0 4px 18px rgba(0,201,123,.2);
}
.tcal__day--today .tcal__num {
    color: var(--dark);
    background: #00c97b;
    border-radius: 7px;
    padding: 1px 7px;
    align-self: flex-start;
}

/* ── Pastilles ─────────────────────────────────────── */
.tcal__chip {
    display: block;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: .64rem;
    font-weight: 600;
    line-height: 1.35;
}
.tcal__chip small { font-weight: 400; opacity: .8; font-size: .6rem; }
.tcal__chip--open     { background: rgba(0,201,123,.13);  color: #34e3a0; }
.tcal__chip--continue { background: rgba(59,130,246,.15); color: #7db3f5; }
.tcal__chip--dech     { background: rgba(59,130,246,.08); color: #7db3f5; border: 1px dashed rgba(59,130,246,.35); }
.tcal__chip--event    { background: rgba(245,158,11,.15); color: #fbbf24; }
.tcal__chip--closed   { background: rgba(239,68,68,.14);  color: #f87171; }
.tcal__chip--ferie    { background: rgba(var(--fg-rgb),.06); color: rgba(var(--fg-rgb),.45); }

/* ── Temps forts ───────────────────────────────────── */
.tcal__hl {
    margin-top: 22px;
    padding: 18px 22px;
    background: rgba(var(--fg-rgb),.025);
    border: 1px solid rgba(var(--fg-rgb),.05);
    border-radius: 16px;
}
.tcal__hl-title {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00c97b;
    margin-bottom: 12px;
}
.tcal__hl ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tcal__hl li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: .84rem;
    font-weight: 300;
    color: rgba(var(--fg-rgb),.6);
    line-height: 1.5;
}
.tcal__hl li strong { color: var(--white); font-weight: 600; white-space: nowrap; }
.tcal__hl-ico {
    width: 16px;
    text-align: center;
    font-size: .82rem;
    flex-shrink: 0;
    align-self: center;
}
.tcal__hl-ico--event    { color: #fbbf24; }
.tcal__hl-ico--closed   { color: #f87171; }
.tcal__hl-ico--continue { color: #7db3f5; }
.tcal__hl-ico--dech     { color: #7db3f5; }

.tcal__note {
    margin: 16px 2px 0;
    font-size: .76rem;
    color: rgba(var(--fg-rgb),.35);
    font-weight: 300;
}
.tcal__note b { color: rgba(var(--fg-rgb),.6); }

/* ── Mobile : cases compactes, détail via Temps forts ── */
@media (max-width: 640px) {
    .tcal__grid { gap: 3px; }
    .tcal__day { min-height: 52px; padding: 5px; border-radius: 9px; }
    .tcal__num { font-size: .7rem; }
    .tcal__dow { padding: 7px 2px; font-size: .56rem; letter-spacing: .5px; border-radius: 7px; }
    .tcal__title { font-size: 1.05rem; }
    .tcal__nav { padding: 10px 12px; }
    .tcal__nav-btn span { display: none; }
    .tcal__nav-btn { padding: 9px 13px; }

    /* Les pastilles deviennent des points colorés */
    .tcal__chip {
        padding: 0;
        font-size: 0;
        width: 8px; height: 8px;
        border-radius: 50%;
        display: inline-block;
        margin-right: 3px;
    }
    .tcal__chip--open     { background: #34e3a0; }
    .tcal__chip--continue { background: #7db3f5; }
    .tcal__chip--dech     { background: transparent; border: 1.5px dashed #7db3f5; }
    .tcal__chip--event    { background: #fbbf24; }
    .tcal__chip--closed   { background: #f87171; }
    .tcal__chip--ferie    { background: rgba(var(--fg-rgb),.25); }
}

/* ── Thème clair : contraste des pastilles ─────────── */
html[data-theme="light"] .tcal__chip--open     { background: rgba(0,148,95,.12);   color: #00794c; }
html[data-theme="light"] .tcal__chip--continue { background: rgba(37,99,235,.12);  color: #1d4ed8; }
html[data-theme="light"] .tcal__chip--dech     { background: rgba(37,99,235,.06);  color: #1d4ed8; border-color: rgba(37,99,235,.4); }
html[data-theme="light"] .tcal__chip--event    { background: rgba(180,120,10,.14); color: #92600a; }
html[data-theme="light"] .tcal__chip--closed   { background: rgba(220,38,38,.12);  color: #b91c1c; }
html[data-theme="light"] .tcal__chip--ferie    { background: rgba(0,0,0,.06);      color: rgba(0,0,0,.5); }
html[data-theme="light"] .tcal__title          { color: var(--white, #1a1a1a); }
html[data-theme="light"] .tcal__dow            { background: rgba(0,148,95,.1); color: #00794c; }
html[data-theme="light"] .tcal__nav-btn        { background: rgba(0,148,95,.1); border-color: rgba(0,148,95,.2); color: #00794c; }
html[data-theme="light"] .tcal__nav-btn:hover  { background: #00945f; color: #fff; }
html[data-theme="light"] .tcal__hl-title       { color: #00794c; }
