/* =========================
   CHECKLIST S1 — Styles
========================= */

/* Layout */
.clWrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 16px 56px;
}

.clHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.clHeader .brand a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
}

.clHeader .sigil {
    width: 60px;
    height: 60px;
}

/* ===== OVERALL PROGRESS BAR ===== */
.clProgress {
    margin-bottom: 24px;
}

.clProgress__label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.clProgress__bar {
    height: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.clProgress__fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transition: width 300ms ease;
    width: 0%;
}

/* ===== WEEK SECTIONS ===== */
.clWeek {
    margin-bottom: 12px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--glass2), var(--glass));
    overflow: hidden;
}

.clWeek[open] {
    border-color: rgba(185, 140, 255, .32);
}

.clWeek__summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 15px;
    transition: background 120ms ease;
}

.clWeek__summary::-webkit-details-marker {
    display: none;
}

.clWeek__summary::before {
    content: "▸";
    display: inline-block;
    width: 1em;
    color: var(--accent);
    transition: transform 160ms ease;
    flex-shrink: 0;
}

.clWeek[open]>.clWeek__summary::before {
    transform: rotate(90deg);
}

.clWeek__summary:hover {
    background: rgba(255, 255, 255, .04);
}

.clWeek__badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: rgba(185, 140, 255, .12);
    border: 1px solid rgba(185, 140, 255, .25);
    color: var(--accent);
}

.clWeek__badge--cyan {
    background: rgba(102, 247, 255, .10);
    border-color: rgba(102, 247, 255, .25);
    color: var(--accent2);
}

.clWeek__badge--gold {
    background: rgba(255, 179, 71, .10);
    border-color: rgba(255, 179, 71, .25);
    color: #ffb347;
}

.clWeek__count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.clWeek__body {
    padding: 4px 16px 16px;
}

/* ===== CHECKBOX ITEMS ===== */
.clItem {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 100ms ease;
}

.clItem:hover {
    background: rgba(255, 255, 255, .04);
}

.clItem__check {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 5px;
    border: 2px solid rgba(185, 140, 255, .4);
    background: rgba(255, 255, 255, .05);
    cursor: pointer;
    position: relative;
    margin-top: 1px;
    transition: border-color 120ms ease, background 120ms ease;
}

.clItem__check:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.clItem__check:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 900;
    color: #05030a;
    line-height: 1;
}

.clItem__text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
    transition: color 120ms ease, opacity 120ms ease;
}

/* Checked state: strike-through + fade */
.clItem:has(.clItem__check:checked) .clItem__text {
    text-decoration: line-through;
    text-decoration-color: rgba(185, 140, 255, .4);
    opacity: .55;
}

/* ===== INFO / NOTE ITEMS (non-checkable) ===== */
.clNote {
    padding: 8px 10px 8px 38px;
    font-size: 13px;
    color: var(--muted);
    opacity: .75;
    font-style: italic;
}

.clNote--target {
    font-style: normal;
    opacity: .85;
    padding: 10px 12px;
    margin-top: 6px;
    border-radius: 8px;
    background: rgba(102, 247, 255, .06);
    border: 1px solid rgba(102, 247, 255, .15);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent2);
}

/* ===== SECTION HEADER (week title inside) ===== */
.clWeek__title {
    flex: 1;
}

.clWeek__date {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

/* ===== RESET BUTTON ===== */
.clActions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

.clActions .btn {
    font-size: 13px;
    padding: 8px 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .clHeader {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== CURRENT WEEK INDICATOR ===== */
.clWeek--current {
    border-color: rgba(102, 247, 255, .35);
    box-shadow: 0 0 18px rgba(102, 247, 255, .08);
}

.clWeek--current>.clWeek__summary::after {
    content: "Cette semaine";
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(102, 247, 255, .12);
    border: 1px solid rgba(102, 247, 255, .25);
    color: var(--accent2);
    margin-left: 6px;
}