/* Hub « Types de lettres officielles » (/types-de-lettres-officielles) */

.types-updated {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin: 0 0 var(--space-md);
}

.types-lead {
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 760px;
    margin: 0 0 var(--space-lg);
}

/* Le container-narrow est utilisé en interne d'un container : on annule le padding doublé */
.container-flush {
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
}

/* --- Sélecteur de situation --- */
.situation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.situation-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.situation-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0 0 var(--space-xs);
    color: var(--text);
}

.situation-card > p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0 0 var(--space-md);
    line-height: 1.5;
}

.situation-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-xs);
}

.situation-links a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-muted);
    color: var(--text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: var(--transition);
}

.situation-links a:hover {
    background: var(--bg-white);
    box-shadow: inset 0 0 0 1px var(--card-color, var(--primary));
    color: var(--card-color, var(--primary));
}

.situation-links .dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--card-color, var(--primary));
}

/* --- Familles --- */
.famille-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
}

.famille-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.famille-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0 0 var(--space-md);
    color: var(--text);
}

.famille-card dl {
    margin: 0 0 var(--space-md);
}

.famille-card dt {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 2px;
}

.famille-card dd {
    margin: 0 0 var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text);
    line-height: 1.5;
}

.famille-tell {
    margin: 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Tableau --- */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
}

.types-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    min-width: 780px;
}

.politesse-table {
    min-width: 520px;
}

.types-table caption {
    caption-side: bottom;
    padding: var(--space-md);
    font-size: var(--font-size-xs);
    color: var(--text-light);
    text-align: left;
    line-height: 1.5;
}

.types-table thead th {
    background: var(--bg-muted);
    color: var(--text);
    font-weight: 700;
    text-align: left;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.types-table tbody th,
.types-table tbody td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    text-align: left;
    line-height: 1.5;
}

.types-table tbody tr:last-child th,
.types-table tbody tr:last-child td {
    border-bottom: 0;
}

.types-table tbody tr:hover {
    background: var(--bg);
}

.types-table tbody th {
    font-weight: 700;
    color: var(--text);
    min-width: 190px;
}

.types-table tbody th a {
    color: var(--primary);
    text-decoration: none;
}

.types-table tbody th a:hover {
    text-decoration: underline;
}

.types-table td a {
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.types-table td a:hover {
    color: var(--primary);
}

.loi-none {
    color: var(--text-light);
}

.envoi-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    white-space: nowrap;
}

.envoi-strong {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.envoi-mid {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-dark);
}

.envoi-soft {
    background: var(--bg-muted);
    color: var(--text-muted);
}

.table-note {
    margin: var(--space-md) 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Pièges --- */
.piege-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}

.piege-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-left: 3px solid var(--card-color, var(--primary));
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
}

.piege-item h3 {
    font-size: var(--font-size-base);
    font-weight: 700;
    margin: 0 0 var(--space-xs);
}

.piege-item h3 a {
    color: var(--text);
    text-decoration: none;
}

.piege-item h3 a:hover {
    color: var(--card-color, var(--primary));
}

.piege-item p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: 1.65;
}

/* --- CTA --- */
.types-cta {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    margin: var(--space-2xl) 0;
    box-shadow: var(--shadow-sm);
}

.types-cta p {
    margin: 0 0 var(--space-lg);
    color: var(--text-muted);
    line-height: 1.6;
}

.types-cta strong {
    color: var(--text);
}

.types-cta-note {
    display: block;
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

/* --- Structure --- */
.structure-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-sm);
    counter-reset: none;
}

.structure-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    line-height: 1.6;
    font-size: var(--font-size-sm);
}

.structure-list strong {
    color: var(--text);
}

/* --- Formats --- */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

.format-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.format-card h3 {
    font-size: var(--font-size-base);
    font-weight: 700;
    margin: 0 0 var(--space-sm);
    color: var(--text);
}

.format-card p {
    margin: 0 0 var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text);
    line-height: 1.6;
}

.format-quand {
    color: var(--text-muted) !important;
    font-style: italic;
    margin-bottom: 0 !important;
}

/* --- Sources --- */
.sources-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: var(--space-xs);
}

.sources-list li {
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.sources-list a {
    color: var(--text-muted);
}

.sources-list a:hover {
    color: var(--primary);
}

/* --- Sections éditoriales du hub --- */
.seo-content h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text);
    margin: var(--space-lg) 0 var(--space-sm);
}

.seo-content #cadre-juridique p,
.seo-content #structure > p,
.seo-content #mise-en-page > p,
.seo-content #formules-de-politesse > p,
.seo-content #limites p,
.seo-content #sources > p {
    color: var(--text);
    line-height: 1.8;
    margin: 0 0 var(--space-md);
}

@media (max-width: 640px) {
    .types-cta {
        padding: var(--space-lg);
    }
    .piege-list,
    .situation-grid {
        grid-template-columns: 1fr;
    }
}
