/* Tetra Fiches Cours — blocs empilés, lisibilité d'abord */
.tlf {
    --tlf-ink: #1b2430;
    --tlf-muted: #5b6878;
    --tlf-line: #e3e8ef;
    --tlf-surface: #f5f7fa;
    color: var(--tlf-ink);
    font-size: 16px;
    line-height: 1.65;
    margin: 8px 0 0;
    max-width: 100%;
    text-align: left;
}
.tlf *, .tlf *::before, .tlf *::after { box-sizing: border-box; }

/* Bloc (carte) */
.tlf .tlf-block {
    background: #fff;
    border: 1px solid var(--tlf-line);
    border-radius: 14px;
    padding: 26px 28px;
    margin: 0 0 20px;
}
.tlf .tlf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}
.tlf .tlf-h {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--tlf-ink);
    text-transform: none;
}
.tlf .tlf-h::before, .tlf .tlf-h::after { display: none; }

/* Icônes */
.tlf .tlf-ico {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--tlf-accent-soft);
    color: var(--tlf-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tlf .tlf-ico svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Texte */
.tlf .tlf-body p {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--tlf-ink);
}
.tlf .tlf-body p:last-child { margin-bottom: 0; }

/* Listes */
.tlf .tlf-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}
.tlf .tlf-list:last-child { margin-bottom: 0; }
.tlf .tlf-list li {
    position: relative;
    margin: 0 0 10px;
    padding: 0 0 0 20px;
    line-height: 1.6;
}
.tlf .tlf-list li:last-child { margin-bottom: 0; }
.tlf .tlf-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.68em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tlf-accent);
}
.tlf .tlf-list--check li { padding-left: 32px; }
.tlf .tlf-list--check li::before {
    left: 0;
    top: 0.2em;
    width: 22px;
    height: 22px;
    border-radius: 0;
    background: var(--tlf-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10' stroke-width='1.6'/%3E%3Cpath d='M7.5 12.5l3 3 6-6.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10' stroke-width='1.6'/%3E%3Cpath d='M7.5 12.5l3 3 6-6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* L'essentiel */
.tlf .tlf-block--facts { padding: 18px; background: var(--tlf-surface); border-color: transparent; }
.tlf .tlf-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
}
.tlf .tlf-fact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--tlf-line);
    border-radius: 12px;
}
.tlf .tlf-fact-txt { display: flex; flex-direction: column; min-width: 0; }
.tlf .tlf-fact-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tlf-muted);
    line-height: 1.3;
}
.tlf .tlf-fact-value {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--tlf-ink);
    overflow-wrap: anywhere;
}

/* Sous-cartes */
.tlf .tlf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.tlf .tlf-sub {
    background: var(--tlf-surface);
    border-radius: 12px;
    padding: 18px 20px;
}
.tlf .tlf-sub h4 {
    margin: 0 0 10px;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tlf-muted);
    line-height: 1.4;
}
.tlf .tlf-sub p, .tlf .tlf-sub li { font-size: 15.5px; }

/* Programme */
.tlf .tlf-toggle-all {
    flex: none;
    appearance: none;
    background: #fff;
    border: 1px solid var(--tlf-accent-line);
    color: var(--tlf-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
}
.tlf .tlf-toggle-all:hover, .tlf .tlf-toggle-all:focus-visible { background: var(--tlf-accent-soft); }
.tlf .tlf-mod {
    border: 1px solid var(--tlf-line);
    border-radius: 12px;
    margin: 0 0 10px;
    background: #fff;
    overflow: hidden;
}
.tlf .tlf-mod:last-child { margin-bottom: 0; }
.tlf .tlf-mod > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
}
.tlf .tlf-mod > summary::-webkit-details-marker { display: none; }
.tlf .tlf-mod > summary::marker { content: ""; }
.tlf .tlf-mod > summary:hover { background: var(--tlf-surface); }
.tlf .tlf-mod > summary:focus-visible { outline: 2px solid var(--tlf-accent); outline-offset: -2px; }
.tlf .tlf-mod-t { flex: 1; min-width: 0; }
.tlf .tlf-mod-c {
    flex: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--tlf-muted);
    background: var(--tlf-surface);
    padding: 3px 10px;
    border-radius: 999px;
}
.tlf .tlf-mod > summary::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin: 0 4px 3px 0;
    border-right: 2px solid var(--tlf-muted);
    border-bottom: 2px solid var(--tlf-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.tlf .tlf-mod[open] { border-color: var(--tlf-accent-line); }
.tlf .tlf-mod[open] > summary { background: var(--tlf-accent-soft); }
.tlf .tlf-mod[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.tlf .tlf-seq {
    list-style: none;
    margin: 0;
    padding: 6px 18px 10px;
}
.tlf .tlf-seq li {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--tlf-line);
    font-size: 15.5px;
    line-height: 1.5;
}
.tlf .tlf-seq li:last-child { border-bottom: 0; }
.tlf .tlf-seq li::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    margin-top: 0.62em;
    border-radius: 50%;
    background: var(--tlf-accent-line);
}

/* Accessibilité */
.tlf .tlf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tlf .tlf-chip {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--tlf-line);
    color: var(--tlf-muted);
}
.tlf .tlf-chip strong { color: var(--tlf-ink); font-weight: 700; }
.tlf .tlf-chip--yes { border-color: var(--tlf-accent-line); background: var(--tlf-accent-soft); }

@media (max-width: 600px) {
    .tlf .tlf-block { padding: 20px 16px; border-radius: 12px; }
    .tlf .tlf-block--facts { padding: 12px; }
    .tlf .tlf-h { font-size: 18px; gap: 10px; }
    .tlf .tlf-head { flex-wrap: wrap; }
    .tlf .tlf-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tlf .tlf-fact { padding: 12px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .tlf .tlf-fact-value { font-size: 16px; }
    .tlf .tlf-mod > summary { padding: 14px; }
}
@media print {
    .tlf .tlf-toggle-all { display: none; }
    .tlf .tlf-block { break-inside: avoid; }
}
