
.interface-contes {
    --ic-border: #d6d6d6;
    --ic-soft: #f6f6f4;
    --ic-text: #161616;
    --ic-muted: #555;
    --ic-link: #0a5c7a;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    color: var(--ic-text);
    line-height: 1.55;
}

.interface-contes * {
    box-sizing: border-box;
}

.ic-hero {
    padding: 1.5rem 0 1.2rem;
    border-bottom: 1px solid var(--ic-border);
    margin-bottom: 1rem;
}

.ic-surtitre {
    margin: 0 0 0.2rem;
    color: var(--ic-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.ic-hero h1,
.ic-title {
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.ic-hero h1 {
    font-size: clamp(2rem, 4vw, 3.3rem);
}

.ic-intro {
    max-width: 820px;
    margin: 0;
    color: var(--ic-muted);
    font-size: 1.05rem;
}

.ic-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.2rem 0 1.5rem;
}

.ic-btn {
    appearance: none;
    border: 1px solid var(--ic-border);
    background: white;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    font: inherit;
    color: var(--ic-text);
}

.ic-btn:hover,
.ic-btn:focus {
    border-color: #999;
}

.ic-btn-primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.ic-app {
    min-height: 20rem;
}

.ic-loading,
.ic-error,
.ic-empty {
    padding: 1rem;
    border: 1px solid var(--ic-border);
    background: var(--ic-soft);
    border-radius: 0.7rem;
}

.ic-error {
    border-color: #b34242;
    background: #fff5f5;
}

.ic-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: end;
    margin-bottom: 1.2rem;
}

.ic-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.ic-field input,
.ic-field select {
    width: 100%;
    border: 1px solid #bdbdbd;
    border-radius: 0.5rem;
    padding: 0.7rem;
    font: inherit;
}

.ic-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.4rem 0 0.7rem;
}

.ic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--ic-border);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    background: var(--ic-soft);
    color: #333;
    font-size: 0.9rem;
}

.ic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 0.9rem;
}

.ic-card {
    border: 1px solid var(--ic-border);
    background: #fff;
    border-radius: 0.85rem;
    padding: 1rem;
}

.ic-card h2,
.ic-card h3 {
    margin-top: 0;
}

.ic-card h2 {
    font-size: 1.35rem;
}

.ic-card h3 {
    font-size: 1.15rem;
}

.ic-card p {
    margin-bottom: 0.7rem;
}

.ic-card-actions {
    margin-top: 0.9rem;
}

.ic-link-btn {
    border: 0;
    background: none;
    color: var(--ic-link);
    text-decoration: underline;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.ic-detail-header {
    margin-bottom: 1.2rem;
}

.ic-back {
    margin-bottom: 1rem;
}

.ic-section {
    border-top: 1px solid var(--ic-border);
    padding-top: 1.2rem;
    margin-top: 1.3rem;
}

.ic-section h2 {
    margin-top: 0;
}

.ic-two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 1rem;
}

.ic-summary {
    background: var(--ic-soft);
    border: 1px solid var(--ic-border);
    border-radius: 0.85rem;
    padding: 1rem;
}

.ic-summary p:last-child {
    margin-bottom: 0;
}

.ic-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ic-border);
    border-radius: 0.75rem;
}

.ic-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 720px;
}

.ic-table th,
.ic-table td {
    border-bottom: 1px solid var(--ic-border);
    padding: 0.55rem 0.65rem;
    vertical-align: top;
    text-align: left;
}

.ic-table th {
    background: var(--ic-soft);
    font-weight: 700;
}

.ic-table tr:last-child td {
    border-bottom: 0;
}

.ic-edc-list {
    display: grid;
    gap: 0.45rem;
}

.ic-edc-item {
    border: 1px solid var(--ic-border);
    border-radius: 0.65rem;
    padding: 0.55rem 0.7rem;
    background: #fff;
}

.ic-edc-lvl-1 { margin-left: 0; }
.ic-edc-lvl-2 { margin-left: 1rem; }
.ic-edc-lvl-3 { margin-left: 2rem; }
.ic-edc-lvl-4 { margin-left: 3rem; }

.ic-edc-code {
    font-weight: 700;
    margin-right: 0.4rem;
}

.ic-muted {
    color: var(--ic-muted);
}

.ic-small {
    font-size: 0.9rem;
}

.ic-pre {
    white-space: pre-wrap;
    background: var(--ic-soft);
    border: 1px solid var(--ic-border);
    padding: 1rem;
    border-radius: 0.75rem;
    max-height: 420px;
    overflow: auto;
}

.ic-count {
    font-weight: 700;
}

.ic-pagination {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
}

.ic-hidden {
    display: none;
}

@media (max-width: 760px) {
    .ic-toolbar,
    .ic-two-cols {
        grid-template-columns: 1fr;
    }

    .ic-edc-lvl-3,
    .ic-edc-lvl-4 {
        margin-left: 1rem;
    }
}


.ic-note {
    margin: 0 0 0.8rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--ic-border);
    border-radius: 0.65rem;
    background: var(--ic-soft);
    color: var(--ic-muted);
    font-size: 0.95rem;
}

.ic-doc-link {
    color: var(--ic-link);
    text-decoration: underline;
    overflow-wrap: anywhere;
}

/* V3 - fiche conte-type complète */
.ic-fiche-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--ic-border);
    border-radius: 0.9rem;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.admin-bar .ic-fiche-header {
    top: 32px;
}

.ic-fiche-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.ic-section-focus {
    scroll-margin-top: 8rem;
    border: 1px solid var(--ic-border);
    border-radius: 0.9rem;
    padding: 1.1rem;
    background: #fff;
}

.ic-section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 0.8rem;
}

.ic-section-head h2 {
    margin-bottom: 0;
}

.ic-cell-title {
    font-weight: 650;
    margin-bottom: 0.25rem;
}

.ic-details {
    margin-top: 0.35rem;
}

.ic-details summary {
    color: var(--ic-link);
    cursor: pointer;
    font-size: 0.92rem;
}

.ic-edc-tree {
    display: grid;
    gap: 0.35rem;
}

.ic-edc-row {
    border: 1px solid var(--ic-border);
    border-radius: 0.55rem;
    padding: 0.55rem 0.7rem;
    background: #fff;
}

.ic-edc-section {
    background: var(--ic-soft);
    font-weight: 400;
}

.ic-edc-section .ic-edc-code,
.ic-edc-section .ic-edc-desc {
    font-weight: 700;
}

.ic-edc-main {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: baseline;
}

.ic-edc-code {
    min-width: 4.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    color: #111;
}

.ic-edc-desc {
    flex: 1 1 18rem;
}

.ic-edc-parent {
    margin-top: 0.25rem;
    margin-left: 5.35rem;
    color: var(--ic-muted);
    font-size: 0.9rem;
}

.ic-edc-lvl-2 { margin-left: 1rem; }
.ic-edc-lvl-3 { margin-left: 2rem; }
.ic-edc-lvl-4 { margin-left: 3rem; }
.ic-edc-lvl-5 { margin-left: 4rem; }

.ic-keyvals p {
    margin: 0 0 0.45rem;
}

.ic-table-versions th:nth-child(2),
.ic-table-versions td:nth-child(2) {
    min-width: 26rem;
}

.ic-table-pdf th:nth-child(3),
.ic-table-pdf td:nth-child(3),
.ic-table-sources th:nth-child(2),
.ic-table-sources td:nth-child(2) {
    min-width: 20rem;
}

@media (max-width: 782px) {
    .admin-bar .ic-fiche-header { top: 46px; }
    .ic-fiche-header { position: static; }
    .ic-section-head { display: block; }
    .ic-edc-lvl-2,
    .ic-edc-lvl-3,
    .ic-edc-lvl-4,
    .ic-edc-lvl-5 { margin-left: 0; }
    .ic-edc-parent { margin-left: 0; }
}

/* =========================================================
   V4 - Mode compact avec accordéons documentaires
   ========================================================= */

.interface-contes {
    max-width: 1180px;
    padding: 1rem 1.1rem 3rem;
    font-size: 14px;
    line-height: 1.38;
}

.ic-hero {
    padding: 0.75rem 0 0.8rem;
    margin-bottom: 0.8rem;
}

.ic-hero h1 {
    font-size: 1.65rem;
    line-height: 1.18;
    margin-bottom: 0.35rem;
}

.ic-intro {
    max-width: 760px;
    font-size: 0.92rem;
}

.ic-surtitre {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.ic-title,
.interface-contes h2 {
    font-size: 1.25rem;
    line-height: 1.22;
}

.interface-contes h3 {
    font-size: 1rem;
    line-height: 1.25;
}

.ic-nav,
.ic-fiche-nav {
    gap: 0.35rem;
    margin: 0.75rem 0 1rem;
}

.ic-btn {
    font-size: 0.82rem;
    padding: 0.35rem 0.62rem;
    line-height: 1.25;
}

.ic-btn-secondary {
    background: var(--ic-soft);
}

.ic-badge {
    font-size: 0.78rem;
    padding: 0.14rem 0.45rem;
    line-height: 1.25;
}

.ic-small {
    font-size: 0.78rem;
}

.ic-card,
.ic-summary,
.ic-note,
.ic-fiche-header,
.ic-section-focus {
    border-radius: 0.62rem;
}

.ic-card,
.ic-summary {
    padding: 0.75rem 0.85rem;
}

.ic-note {
    padding: 0.55rem 0.7rem;
    font-size: 0.86rem;
}

.ic-fiche-header {
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.75rem;
}

.ic-meta-row {
    gap: 0.35rem;
    margin: 0.35rem 0 0.55rem;
}

.ic-accordions,
.ic-list-accordions {
    display: grid;
    gap: 0.55rem;
}

.ic-accordion {
    padding: 0;
    overflow: clip;
    scroll-margin-top: 7rem;
}

.ic-accordion-summary,
.ic-mini-accordion > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    padding: 0.65rem 0.8rem;
    background: var(--ic-soft);
    border-radius: 0.62rem;
}

.ic-accordion[open] > .ic-accordion-summary,
.ic-mini-accordion[open] > summary {
    border-bottom: 1px solid var(--ic-border);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ic-accordion-summary::-webkit-details-marker,
.ic-mini-accordion > summary::-webkit-details-marker {
    display: none;
}

.ic-accordion-summary::before,
.ic-mini-accordion > summary::before {
    content: "▸";
    flex: 0 0 auto;
    font-size: 0.8rem;
    color: var(--ic-muted);
}

.ic-accordion[open] > .ic-accordion-summary::before,
.ic-mini-accordion[open] > summary::before {
    content: "▾";
}

.ic-accordion-title,
.ic-mini-accordion > summary > span:first-child,
.ic-version-title {
    font-weight: 700;
}

.ic-accordion-content,
.ic-mini-content {
    padding: 0.75rem 0.85rem;
}

.ic-mini-accordion {
    border: 1px solid var(--ic-border);
    border-radius: 0.62rem;
    background: #fff;
    overflow: clip;
}

.ic-mini-accordion > summary {
    padding: 0.48rem 0.65rem;
    font-size: 0.9rem;
}

.ic-mini-meta {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ic-pre {
    padding: 0.7rem;
    max-height: 340px;
    font-size: 0.86rem;
    line-height: 1.38;
}

.ic-pre-compact {
    max-height: 220px;
}

.ic-field label {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.ic-field input,
.ic-field select {
    font-size: 0.88rem;
    padding: 0.42rem 0.55rem;
    min-height: 2.05rem;
}

.ic-table {
    font-size: 0.84rem;
}

.ic-table th,
.ic-table td {
    padding: 0.34rem 0.44rem;
    line-height: 1.32;
}

.ic-edc-tree {
    gap: 0.3rem;
}

.ic-edc-row {
    padding: 0.4rem 0.55rem;
    border-radius: 0.45rem;
}

.ic-edc-main {
    gap: 0.42rem;
}

.ic-edc-code {
    min-width: 4.2rem;
    font-size: 0.84rem;
}

.ic-edc-parent {
    margin-left: 4.65rem;
    font-size: 0.8rem;
}

.ic-edc-lvl-2 { margin-left: 0.7rem; }
.ic-edc-lvl-3 { margin-left: 1.35rem; }
.ic-edc-lvl-4 { margin-left: 2rem; }
.ic-edc-lvl-5 { margin-left: 2.65rem; }

.ic-two-cols {
    gap: 0.75rem;
}

.ic-section {
    padding-top: 0.85rem;
    margin-top: 0.9rem;
}

@media (max-width: 782px) {
    .interface-contes { padding: 0.75rem; }
    .ic-accordion { scroll-margin-top: 1rem; }
    .ic-accordion-summary,
    .ic-mini-accordion > summary { align-items: flex-start; }
    .ic-mini-meta { justify-content: flex-start; }
    .ic-edc-lvl-2,
    .ic-edc-lvl-3,
    .ic-edc-lvl-4,
    .ic-edc-lvl-5 { margin-left: 0; }
    .ic-edc-parent { margin-left: 0; }
}


/* =========================================================
   V5 - Recherche globale catégorisée et fiche version dense
   ========================================================= */

.ic-callout {
    margin: 0.75rem 0 0.9rem 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--ic-border);
    border-radius: 0.6rem;
    background: #fafafa;
    font-size: 0.88rem;
}

.ic-inline-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ic-link);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.ic-toolbar-search {
    align-items: end;
}

.ic-field-grow {
    flex: 1 1 620px;
}

.ic-global-results {
    margin-top: 0.9rem;
}

.ic-global-counts {
    margin-bottom: 0.8rem;
}

.ic-global-accordions .ic-accordion-summary {
    background: #fbfbfb;
}

.ic-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.ic-table-global-versions th:nth-child(1),
.ic-table-global-versions td:nth-child(1) {
    width: 18%;
}

.ic-table-global-versions th:nth-child(2),
.ic-table-global-versions td:nth-child(2) {
    width: 8%;
}

.ic-table-global-versions th:nth-child(4),
.ic-table-global-versions td:nth-child(4),
.ic-table-global-versions th:nth-child(5),
.ic-table-global-versions td:nth-child(5) {
    width: 13%;
}

.ic-table-global-edc th:nth-child(1),
.ic-table-global-edc td:nth-child(1) {
    width: 11%;
}

.ic-table-global-edc th:nth-child(2),
.ic-table-global-edc td:nth-child(2) {
    width: 13%;
}

.ic-action-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.ic-fiche-header .ic-title {
    margin-bottom: 0.3rem;
}

.ic-keyvals p {
    margin: 0.25rem 0;
}

.ic-table-global-themes th:nth-child(1),
.ic-table-global-themes td:nth-child(1) {
    width: 10%;
}

.ic-table-global-themes th:nth-child(2),
.ic-table-global-themes td:nth-child(2) {
    width: 22%;
}

.ic-table-global-themes th:nth-child(5),
.ic-table-global-themes td:nth-child(5) {
    width: 8%;
}

@media (max-width: 782px) {
    .ic-toolbar-search { align-items: stretch; }
    .ic-table-global-versions th,
    .ic-table-global-versions td,
    .ic-table-global-edc th,
    .ic-table-global-edc td,
    .ic-table-global-themes th,
    .ic-table-global-themes td { width: auto !important; }
}

/* =========================================================
   V6 - Comparaison des versions par EDC
   ========================================================= */

.ic-comparison-summary {
    margin-bottom: 0.8rem;
}

.ic-table-comparison th:nth-child(1),
.ic-table-comparison td:nth-child(1) {
    width: 28%;
}

.ic-table-comparison th:nth-child(2),
.ic-table-comparison td:nth-child(2) {
    width: 12%;
}

.ic-table-comparison th:nth-child(3),
.ic-table-comparison td:nth-child(3),
.ic-table-comparison th:nth-child(4),
.ic-table-comparison td:nth-child(4),
.ic-table-comparison th:nth-child(5),
.ic-table-comparison td:nth-child(5) {
    width: 10%;
    text-align: center;
}

.ic-score-bar {
    display: block;
    width: 100%;
    max-width: 140px;
    height: 0.38rem;
    margin-top: 0.25rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e8e8e8;
}

.ic-score-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #111;
}

.ic-three-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.ic-three-cols .ic-card {
    margin-bottom: 0;
}

.ic-three-cols h4 {
    margin: 0 0 0.35rem 0;
    font-size: 0.92rem;
}

.ic-compact-list {
    margin: 0;
    padding-left: 1.05rem;
}

.ic-compact-list li {
    margin-bottom: 0.28rem;
    line-height: 1.32;
}

.ic-table-specific-edc th:nth-child(1),
.ic-table-specific-edc td:nth-child(1) {
    width: 13%;
}

.ic-table-specific-edc th:nth-child(3),
.ic-table-specific-edc td:nth-child(3) {
    width: 14%;
    text-align: center;
}

@media (max-width: 920px) {
    .ic-three-cols {
        grid-template-columns: 1fr;
    }

    .ic-table-comparison th,
    .ic-table-comparison td,
    .ic-table-specific-edc th,
    .ic-table-specific-edc td {
        width: auto !important;
        text-align: left !important;
    }
}


/* =========================================================
   V7 - Résumés narratifs et lecture structurelle
   ========================================================= */
.interface-contes .ic-summary h3 {
    margin-top: 0.85rem;
    margin-bottom: 0.35rem;
}
.interface-contes .ic-summary h3:first-child {
    margin-top: 0;
}
.interface-contes .ic-summary p {
    max-width: 76rem;
}
.interface-contes .ic-muted strong {
    font-weight: 700;
}

/* =========================================================
   V9 - Intégration PDF depuis wp-content/uploads/contes-pdf
   ========================================================= */

.interface-contes .ic-pdf-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.interface-contes .ic-pdf-folder {
    font-size: 0.78rem;
    white-space: nowrap;
}

.interface-contes .ic-pdf-status {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d5d5d5;
    border-radius: 999px;
    padding: 0.12rem 0.42rem;
    font-size: 0.76rem;
    line-height: 1.25;
    white-space: nowrap;
}

.interface-contes .ic-pdf-status-pending {
    background: #f7f7f7;
    color: #555;
}

.interface-contes .ic-pdf-status-ok {
    background: #eef8ee;
    border-color: #b9ddb9;
    color: #225a22;
}

.interface-contes .ic-pdf-status-missing {
    background: #fff2f2;
    border-color: #e2b5b5;
    color: #8a1f1f;
}

.interface-contes .ic-pdf-toggle {
    font-size: 0.78rem;
}

.interface-contes .ic-pdf-viewer {
    margin-top: 0.55rem;
    border: 1px solid #d8d8d8;
    border-radius: 7px;
    overflow: hidden;
    background: #fafafa;
}

.interface-contes .ic-pdf-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #d8d8d8;
    font-size: 0.82rem;
}

.interface-contes .ic-pdf-viewer iframe {
    display: block;
    width: 100%;
    height: 72vh;
    min-height: 520px;
    border: 0;
    background: #fff;
}

@media (max-width: 760px) {
    .interface-contes .ic-pdf-viewer iframe {
        height: 65vh;
        min-height: 360px;
    }
}

/* =========================================================
   V10 - Boutons PDF plus ergonomiques
   ========================================================= */

.interface-contes .ic-pdf-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.interface-contes .ic-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: 1px solid #b9c7d8;
    border-radius: 999px;
    padding: 0.26rem 0.58rem;
    min-height: 1.85rem;
    font-size: 0.78rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    background: #fff;
    color: #17496d;
    white-space: nowrap;
}

.interface-contes .ic-pdf-open {
    border-color: #9ebbd2;
    background: #eef6fb;
    color: #0f4f78;
    font-weight: 600;
}

.interface-contes .ic-pdf-open:hover,
.interface-contes .ic-pdf-open:focus {
    background: #ddeef8;
    border-color: #6fa3c5;
}

.interface-contes .ic-pdf-view {
    border-color: #cfcfcf;
    background: #fafafa;
    color: #333;
}

.interface-contes .ic-pdf-view:hover,
.interface-contes .ic-pdf-view:focus {
    background: #f1f1f1;
    border-color: #aaa;
}

.interface-contes .ic-pdf-open::before {
    content: "↗";
    font-size: 0.78rem;
    line-height: 1;
}

.interface-contes .ic-pdf-view::before {
    content: "▣";
    font-size: 0.72rem;
    line-height: 1;
}

.interface-contes .ic-pdf-status {
    min-height: 1.55rem;
}

.interface-contes .ic-pdf-folder {
    display: none;
}

.interface-contes .ic-table-pdf td {
    vertical-align: middle;
}

.interface-contes .ic-table-pdf .ic-pdf-actions {
    display: flex;
}

.interface-contes .ic-pdf-viewer-toolbar {
    background: #f6f6f6;
}

.interface-contes .ic-pdf-viewer-title {
    font-weight: 700;
    color: #333;
}

.interface-contes .ic-pdf-viewer-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.interface-contes .ic-pdf-open-small,
.interface-contes .ic-pdf-view-small {
    font-size: 0.76rem;
    padding: 0.22rem 0.5rem;
    min-height: 1.65rem;
}

/* =========================================================
   V11 - Intégration du thésaurus thématique
   ========================================================= */

.interface-contes .ic-thesaurus-section .ic-toolbar-search {
    margin-top: 0.8rem;
}

.interface-contes .ic-thesaurus-grid {
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.interface-contes .ic-thesaurus-card h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.interface-contes .ic-thesaurus-card .ic-meta-row {
    margin: 0.45rem 0;
}

.interface-contes .ic-thesaurus-card p {
    font-size: 0.86rem;
}

.interface-contes .ic-thesaurus-category .ic-accordion-summary {
    gap: 0.45rem;
}

.interface-contes .ic-table-thesaurus-contes th,
.interface-contes .ic-table-thesaurus-contes td,
.interface-contes .ic-table-thesaurus-edc th,
.interface-contes .ic-table-thesaurus-edc td,
.interface-contes .ic-table-thesaurus-conte th,
.interface-contes .ic-table-thesaurus-conte td {
    font-size: 0.83rem;
    line-height: 1.32;
}

.interface-contes .ic-table-thesaurus-conte td:nth-child(4) div + div {
    margin-top: 0.25rem;
}

.interface-contes .ic-thesaurus-conte .ic-mini-content {
    padding-top: 0.4rem;
}

.interface-contes .ic-table-thesaurus-conte td:nth-child(3) {
    color: #555;
}

/* =========================================================
   V12 - Table des motifs : code / description / contes-types
   ========================================================= */
.interface-contes .ic-table-motifs-v12 th:nth-child(1),
.interface-contes .ic-table-motifs-v12 td:nth-child(1) {
    width: 11rem;
    white-space: nowrap;
}

.interface-contes .ic-table-motifs-v12 th:nth-child(2),
.interface-contes .ic-table-motifs-v12 td:nth-child(2) {
    width: auto;
}

.interface-contes .ic-table-motifs-v12 th:nth-child(3),
.interface-contes .ic-table-motifs-v12 td:nth-child(3) {
    width: 28%;
}

.interface-contes .ic-motif-code {
    font-variant-numeric: tabular-nums;
}

.interface-contes .ic-motif-description {
    line-height: 1.35;
}

.interface-contes .ic-motif-conte-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: flex-start;
}

.interface-contes .ic-motif-conte-btn {
    padding: 0.16rem 0.38rem;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #d8dde3;
    font-size: 0.78rem;
    line-height: 1.25;
}

.interface-contes .ic-motif-conte-btn:hover,
.interface-contes .ic-motif-conte-btn:focus {
    background: #e9eef5;
}


/* =========================================================
   V15 - Accordéons de motifs et table transversale
   ========================================================= */

.interface-contes .ic-motif-family-accordions .ic-accordion {
    margin-bottom: 0.55rem;
}

.interface-contes .ic-table-motifs-v14 th:nth-child(1),
.interface-contes .ic-table-motifs-v14 td:nth-child(1),
.interface-contes .ic-table-motifs-v15 th:nth-child(1),
.interface-contes .ic-table-motifs-v15 td:nth-child(1) {
    width: 11rem;
    white-space: nowrap;
}

.interface-contes .ic-table-motifs-v14 th:nth-child(3),
.interface-contes .ic-table-motifs-v14 td:nth-child(3),
.interface-contes .ic-table-motifs-v15 th:nth-child(3),
.interface-contes .ic-table-motifs-v15 td:nth-child(3) {
    width: 32%;
}

.interface-contes .ic-table-motifs-v15 .ic-motif-conte-list {
    max-height: 6.5rem;
    overflow: auto;
    padding-right: 0.2rem;
}

/* =========================================================
   V17 - Fiches Motif-Index global et bibliographie
   ========================================================= */

.interface-contes .ic-motif-code-large {
    display: inline-block;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.interface-contes .ic-motif-description-en {
    max-width: 900px;
    margin: 0.45rem 0 0.75rem 0;
    font-size: 0.98rem;
}

.interface-contes .ic-motif-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.interface-contes .ic-kv-table th {
    width: 180px;
    color: #344054;
    background: #fafafa;
}

.interface-contes .ic-bibliography-field {
    white-space: pre-wrap;
    line-height: 1.45;
}

.interface-contes .ic-table-motif-index th:first-child,
.interface-contes .ic-table-motif-index td:first-child,
.interface-contes .ic-table-motifs th:first-child,
.interface-contes .ic-table-motifs td:first-child {
    width: 9rem;
    white-space: nowrap;
}

.interface-contes .ic-motif-code-btn {
    font-weight: 700;
}

.interface-contes .ic-table-bibliography td,
.interface-contes .ic-table-bibliography th {
    vertical-align: top;
}

.interface-contes .ic-field-actions {
    min-width: 190px;
}


/* =========================================================
   V19 - Fiches EDC et hiérarchie logique
   ========================================================= */

.ic-edc-code-btn {
    text-align: left;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ic-link);
    cursor: pointer;
    min-width: 4.2rem;
}

.ic-edc-code-btn:hover,
.ic-edc-code-btn:focus {
    text-decoration: underline;
}


.ic-edc-code-main {
    display: block;
    white-space: nowrap;
}

.ic-edc-code-note {
    display: block;
    margin-top: 0.15rem;
    white-space: normal;
    line-height: 1.25;
    font-size: 0.88em;
    color: var(--ic-muted);
    text-decoration: none;
}

.ic-edc-path {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.ic-edc-path-row {
    display: grid;
    grid-template-columns: minmax(8rem, 16rem) 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.55rem 0.65rem;
    margin-left: calc(var(--ic-level, 0) * 1.35rem);
    border-bottom: 1px solid var(--ic-border);
    background: #fff;
}

.ic-edc-path-row:last-child {
    border-bottom: 0;
}

.ic-edc-path-current {
    border-left: 3px solid var(--ic-link);
    background: var(--ic-soft);
}

.ic-edc-path-code {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.ic-code-chip {
    display: inline-block;
    width: fit-content;
    padding: 0.12rem 0.42rem;
    border-radius: 0.32rem;
    background: var(--ic-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
}

.ic-edc-path-desc {
    line-height: 1.35;
}

.ic-edc-meta-line {
    margin-top: 0.75rem;
}

.ic-small-btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.55rem;
}

/* V21 - alignement des boutons de navigation dans les fiches */
.ic-action-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin: 0 0 0.9rem 0;
}

.ic-action-row .ic-btn,
.ic-action-row .ic-back {
    margin: 0;
}

/* =========================================================
   V24 - EDC de fiche conte-type à plat et descriptions de versions
   ========================================================= */

.ic-table-conte-edc {
    table-layout: fixed;
}

.ic-table-conte-edc th:nth-child(1),
.ic-table-conte-edc td:nth-child(1) {
    width: 16%;
    white-space: normal;
}

.ic-table-conte-edc th:nth-child(3),
.ic-table-conte-edc td:nth-child(3) {
    width: 32%;
}

.ic-table-conte-edc th:nth-child(4),
.ic-table-conte-edc td:nth-child(4) {
    width: 10%;
    white-space: nowrap;
}

.ic-edc-flat-section td {
    font-weight: 400;
    background: #faf8f1;
}

.ic-edc-flat-section td:nth-child(1),
.ic-edc-flat-section td:nth-child(2) {
    font-weight: 700;
}

.ic-table-conte-edc tr:not(.ic-edc-flat-section) td:nth-child(2),
.ic-table-version-edc td:nth-child(2),
.ic-edc-row:not(.ic-edc-section) .ic-edc-desc {
    font-weight: 400;
}

.ic-edc-flat-lvl-2 td:nth-child(1) {
    padding-left: 1.25rem;
}

.ic-edc-flat-lvl-3 td:nth-child(1) {
    padding-left: 2rem;
}

.ic-edc-flat-lvl-4 td:nth-child(1) {
    padding-left: 2.75rem;
}

.ic-edc-flat-lvl-5 td:nth-child(1) {
    padding-left: 3.5rem;
}

.ic-notice-preview {
    margin-bottom: 0.35rem;
}

.ic-notice-toggle {
    margin-top: 0.2rem;
}

.ic-version-notice-full {
    margin-top: 0.55rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--ic-border);
    border-radius: 0.5rem;
    background: #fffdf8;
    line-height: 1.42;
}

.ic-version-notice-text {
    white-space: pre-wrap;
}

.ic-version-reference-hint {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: var(--ic-muted);
}

.ic-version-reference-note {
    margin-top: 0.25rem;
    margin-bottom: 0.65rem;
}

.ic-version-reference-note p {
    margin: 0.25rem 0;
}

.ic-version-reference-anchor {
    font-size: 0.92rem;
    color: var(--ic-muted);
}

.ic-table-edc-versions th:nth-child(3),
.ic-table-edc-versions td:nth-child(3) {
    width: 50%;
}

.ic-table-edc-versions th:nth-child(4),
.ic-table-edc-versions td:nth-child(4),
.ic-table-edc-versions th:nth-child(5),
.ic-table-edc-versions td:nth-child(5) {
    width: 12%;
}


/* =========================================================
   V26 - Finitions de présentation
   ========================================================= */

/* Accordéons : titre centré, flèche à gauche, compteur à droite. */
.interface-contes .ic-accordion-summary,
.interface-contes .ic-mini-accordion > summary {
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.6rem;
}

.interface-contes .ic-accordion-summary::before,
.interface-contes .ic-mini-accordion > summary::before {
    grid-column: 1;
    justify-self: start;
}

.interface-contes .ic-accordion-title,
.interface-contes .ic-mini-accordion > summary > span:first-child,
.interface-contes .ic-version-title {
    grid-column: 2;
    justify-self: center;
    text-align: center;
}

.interface-contes .ic-accordion-summary > .ic-badge,
.interface-contes .ic-mini-accordion > summary > .ic-badge {
    grid-column: 3;
    justify-self: end;
}

/* Si plusieurs compteurs sont présents, on les regroupe proprement à droite. */
.interface-contes .ic-accordion-summary > .ic-badge + .ic-badge,
.interface-contes .ic-mini-accordion > summary > .ic-badge + .ic-badge {
    margin-left: 0.25rem;
}

/* Pied de page GeneratePress : suppression de la mention technique si le filtre PHP n'est pas appliqué. */
.site-info .copyright-bar .powered-by,
.site-info .powered-by,
.generatepress-powered-by {
    display: none !important;
}

/* =========================================================
   V27 - Accordéons : centrage réel des libellés
   ========================================================= */

/* Les titres d'accordéons sont centrés sur toute la largeur du bouton.
   La flèche et le compteur sont positionnés indépendamment pour éviter
   que la largeur variable des badges décale le texte. */
.interface-contes .ic-accordion-summary,
.interface-contes .ic-mini-accordion > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding-left: 2.4rem;
    padding-right: 7.5rem;
}

.interface-contes .ic-accordion-summary::before,
.interface-contes .ic-mini-accordion > summary::before {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    grid-column: auto;
    justify-self: auto;
}

.interface-contes .ic-accordion-title,
.interface-contes .ic-mini-accordion > summary > span:first-child,
.interface-contes .ic-version-title {
    grid-column: auto;
    justify-self: auto;
    width: 100%;
    text-align: center;
    min-width: 0;
}

.interface-contes .ic-accordion-summary > .ic-badge,
.interface-contes .ic-mini-accordion > summary > .ic-badge {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    grid-column: auto;
    justify-self: auto;
    max-width: 7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.interface-contes .ic-accordion-summary > .ic-badge + .ic-badge,
.interface-contes .ic-mini-accordion > summary > .ic-badge + .ic-badge {
    display: none;
}


/* =========================================================
   V28 - Page simple "Liste des contes-types"
   ========================================================= */

.interface-contes .ic-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.9rem 0 1rem 0;
}

.interface-contes .ic-conte-directory .ic-directory-picker {
    display: flex;
    gap: 0.65rem;
    align-items: end;
    margin: 0.9rem 0;
}

.interface-contes .ic-field-grow {
    flex: 1 1 auto;
}

.interface-contes .ic-conte-directory select,
.interface-contes .ic-conte-directory input[type="search"] {
    width: 100%;
}

.interface-contes .ic-toolbar-compact {
    margin-top: 0.75rem;
    margin-bottom: 0.6rem;
}

.interface-contes .ic-conte-directory-table th:first-child,
.interface-contes .ic-conte-directory-table td:first-child {
    width: 9rem;
    white-space: nowrap;
}

.interface-contes .ic-conte-directory-table th:last-child,
.interface-contes .ic-conte-directory-table td:last-child {
    width: 10rem;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .interface-contes .ic-conte-directory .ic-directory-picker {
        display: block;
    }

    .interface-contes .ic-conte-directory .ic-directory-picker .ic-btn {
        margin-top: 0.5rem;
    }
}


/* V30 - Recherche par collecteur */
.ic-collector-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.65rem 0 1rem 0;
}
.ic-table-collectors th:nth-child(1),
.ic-table-collectors td:nth-child(1) {
    width: 13rem;
}
.ic-table-collectors th:nth-child(2),
.ic-table-collectors td:nth-child(2) {
    width: 5rem;
    text-align: center;
}
.ic-table-collectors th:nth-child(4),
.ic-table-collectors td:nth-child(4) {
    width: 14rem;
}
.ic-table-collectors th:nth-child(5),
.ic-table-collectors td:nth-child(5) {
    width: 8rem;
    text-align: center;
}


/* V31 - Collecteurs et références normalisées */
.ic-toolbar-collectors {
    align-items: end;
}
.ic-table-collector-directory th,
.ic-table-collector-directory td,
.ic-table-collectors th,
.ic-table-collectors td {
    vertical-align: top;
}
.ic-confidence-strong {
    background: #e8f7ec;
    border-color: #b7dfc2;
    color: #1d6b35;
}
.ic-confidence-medium {
    background: #fff7e6;
    border-color: #ead7a8;
    color: #775300;
}
.ic-confidence-low {
    background: #f7eeee;
    border-color: #e2bcbc;
    color: #7b2424;
}

/* V37 - Typologie des héros et héroïnes */
.interface-contes .ic-heroes-section .ic-callout {
    margin-top: 0.75rem;
}

.interface-contes .ic-toolbar-heroes {
    align-items: end;
}

.interface-contes .ic-hero-type-intro {
    margin-bottom: 0.85rem;
}

.interface-contes .ic-hero-type-intro p {
    margin-bottom: 0.45rem;
}

.interface-contes .ic-table-heroes th:nth-child(1),
.interface-contes .ic-table-heroes td:nth-child(1) {
    width: 7rem;
    white-space: nowrap;
}

.interface-contes .ic-table-heroes th:nth-child(3),
.interface-contes .ic-table-heroes td:nth-child(3) {
    width: 9rem;
}

.interface-contes .ic-table-heroes th:nth-child(6),
.interface-contes .ic-table-heroes td:nth-child(6) {
    width: 8rem;
    text-align: center;
}

.interface-contes .ic-hero-profile-main h3 {
    margin-top: 0;
}

.interface-contes .ic-table-keyvals th {
    width: 13rem;
}

@media (max-width: 760px) {
    .interface-contes .ic-table-heroes th:nth-child(4),
    .interface-contes .ic-table-heroes td:nth-child(4),
    .interface-contes .ic-table-heroes th:nth-child(5),
    .interface-contes .ic-table-heroes td:nth-child(5) {
        display: none;
    }
}

/* =========================================================
   V38 - Analyse narrative Propp / Greimas
   ========================================================= */
.interface-contes .ic-narrative-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 1rem;
    align-items: start;
}

.interface-contes .ic-narrative-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.85rem;
    background: #fff;
}

.interface-contes .ic-narrative-card h3 {
    margin-top: 0;
}

.interface-contes .ic-table-propp th:first-child,
.interface-contes .ic-table-propp td:first-child {
    width: 18%;
    white-space: normal;
}

.interface-contes .ic-table-propp th:nth-child(2),
.interface-contes .ic-table-propp td:nth-child(2) {
    width: 16%;
}

.interface-contes .ic-table-greimas th {
    width: 22%;
}

.interface-contes .ic-chip {
    display: inline-block;
    margin: 0.1rem 0.18rem 0.1rem 0;
    padding: 0.15rem 0.4rem;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    background: #f7f7f7;
    font-size: 0.78rem;
    line-height: 1.25;
}

.interface-contes .ic-table-narrative-index td:nth-child(3) {
    min-width: 260px;
}

@media (max-width: 900px) {
    .interface-contes .ic-narrative-grid {
        grid-template-columns: 1fr;
    }
}

/* V39 - Processus narratifs */
.interface-contes .ic-process-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.interface-contes .ic-table-process th,
.interface-contes .ic-table-process-steps th {
    width: 28%;
    vertical-align: top;
}

.interface-contes .ic-table-process-index td,
.interface-contes .ic-table-process-index th {
    vertical-align: top;
}

.interface-contes .ic-process-steps-card {
    margin-top: 1rem;
}

.interface-contes .ic-table-process-steps td:first-child {
    white-space: nowrap;
}

/* V42 - typologie transversale des processus narratifs */
.ic-taxonomy-card,
.ic-taxonomy-overview {
    margin-top: 1rem;
}

.ic-taxonomy-accordions .ic-accordion-content {
    padding-top: 0.75rem;
}

.ic-taxonomy-item-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.ic-taxonomy-item {
    border: 1px solid var(--ic-border, #d8d3c8);
    border-radius: 0.75rem;
    padding: 0.85rem;
    background: #fff;
}

.ic-taxonomy-item h4 {
    margin: 0 0 0.35rem 0;
    font-size: 1rem;
}

.ic-taxonomy-item p {
    margin: 0.35rem 0;
}

.ic-taxonomy-examples {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: center;
}

.ic-taxonomy-link {
    white-space: normal;
    text-align: left;
}

.ic-chip-taxonomy {
    margin: 0.12rem 0.18rem 0.12rem 0;
}


/* V43 - Lecture stylistique Max Lüthi */
.ic-luthi-card,
.ic-luthi-overview {
    border-left: 4px solid #777;
}

.ic-table-luthi th {
    width: 28%;
}

.ic-luthi-example h4 {
    margin-bottom: 0.35rem;
}


/* V45 - Signes de reconnaissance, lieux de conjonction et biologie du conte */
.ic-recognition-card,
.ic-recognition-overview {
    border-left: 4px solid #9a7b45;
}

.ic-marker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
    margin-top: 0.75rem;
}

.ic-narrative-marker-block {
    border: 1px solid var(--ic-border, #d8d3c8);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: #fbfaf7;
}

.ic-narrative-marker-block h4 {
    margin: 0 0 0.45rem 0;
    font-size: 0.98rem;
}

.ic-marker-row {
    margin: 0.45rem 0;
}

.ic-marker-row strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.86rem;
}

.ic-special-theory-dimension h4 {
    margin: 0.5rem 0 0.25rem 0;
}

.ic-special-taxonomy-item h5 {
    margin: 0 0 0.35rem 0;
    font-size: 0.96rem;
}


/* V46 - Fonctions de Propp, repérage pédagogique */
.ic-propp-card,
.ic-propp-overview {
    border-left: 4px solid #6f6f6f;
}

.ic-propp-group {
    margin: 0.85rem 0 1.15rem 0;
}

.ic-propp-group h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.ic-propp-function-item h4 {
    margin: 0 0 0.35rem 0;
    font-size: 0.96rem;
}

.ic-propp-code {
    display: inline-block;
    min-width: 1.5rem;
    font-weight: 700;
}

.ic-table-propp th,
.ic-table-propp td {
    vertical-align: top;
}

.ic-table-propp th:first-child,
.ic-table-propp td:first-child {
    width: 28%;
}

.ic-table-propp th:nth-child(2),
.ic-table-propp td:nth-child(2) {
    width: 14%;
}

/* V48 - recherche globale explicable */
.ic-match-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: baseline;
    margin: 0.35rem 0 0.45rem;
    font-size: 0.92em;
}
.ic-card-indirect {
    background: #fafafa;
}

/* V49 - extraits contextualisés dans la recherche globale */

.ic-global-details {
    margin-top: 1rem;
    border: 1px solid var(--ic-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--ic-soft-bg);
}

.ic-global-details > summary {
    color: var(--ic-text);
    font-weight: 650;
    cursor: pointer;
}

.ic-global-core-results {
    margin-top: 0.85rem;
}


/* V61 - éléments d’appui pour la lecture Lüthi */
.interface-contes .ic-luthi-evidence {
    margin-top: 0.35rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e1d8c9;
    border-radius: 0.65rem;
    background: #fffdf8;
}
.interface-contes .ic-luthi-evidence p {
    margin: 0.15rem 0;
}

/* V62 - EDC d'appui pour typologie transversale et liens EDC */
.interface-contes .ic-taxonomy-evidence-accordion {
    margin-top: 0.75rem;
}
.interface-contes .ic-table-taxonomy-evidence th,
.interface-contes .ic-table-taxonomy-evidence td {
    vertical-align: top;
}
.interface-contes .ic-evidence-support {
    margin-top: 0.35rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--ic-border);
    border-radius: 0.65rem;
    background: var(--ic-soft-bg);
}
.interface-contes .ic-evidence-support p {
    margin: 0.15rem 0;
}

/* V63 - EDC d’appui dans les repères narratologiques */
.interface-contes .ic-marker-evidence {
    margin-top: 0.4rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #e1d8c9;
    border-radius: 0.6rem;
    background: #fffdf8;
    font-size: 0.88rem;
}
.interface-contes .ic-marker-evidence-title {
    display: block;
    font-weight: 650;
    margin-bottom: 0.25rem;
}
.interface-contes .ic-marker-evidence-line {
    margin: 0.2rem 0;
}
.interface-contes .ic-marker-evidence-item {
    display: inline-block;
    margin: 0.12rem 0.35rem 0.12rem 0;
}
.interface-contes .ic-marker-evidence-desc {
    color: var(--ic-text, #222);
}


/* V66 - matrice CONJ+/CONJ-/DISJ+/DISJ- */
.ic-operation-badge {
    font-weight: 700;
    letter-spacing: .02em;
}
.ic-table-conjdisj-ops th {
    width: 9rem;
}
.ic-conjdisj-priority-card .ic-callout {
    margin: .75rem 0;
}

/* V67 - Statut héroïque et poétique d’apparition */
.interface-contes .ic-hero-status-poetics {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.interface-contes .ic-hero-status-poetics > h3 {
    margin-top: 0;
}

.interface-contes .ic-hero-status-card,
.interface-contes .ic-hero-poetics-card {
    margin-top: 0.9rem;
}


/* V67.3 - Structures ternaires dans la poétique du conte */
.interface-contes .ic-ternary-poetics-card .ic-table-ternary-sequence th {
    width: 24%;
}

.interface-contes .ic-ternary-poetics-card .ic-note {
    margin-top: 0.75rem;
}

/* V67.4 - Quêtes et symboles remarquables */
.interface-contes .ic-quest-card,
.interface-contes .ic-symbolic-poetics-card {
    margin-top: 0.9rem;
}

.interface-contes .ic-symbolic-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.interface-contes .ic-symbolic-item {
    border: 1px solid var(--ic-border);
    border-radius: 0.8rem;
    padding: 0.75rem 0.85rem;
    background: var(--ic-soft-bg);
}

.interface-contes .ic-symbolic-item h4 {
    margin: 0 0 0.35rem;
}

/* V69 - Rappel actantiel Tenèze */
.ic-callout-tenez-actants {
    margin-top: 0.75rem;
}
.ic-table-tenez-actants th {
    width: 11rem;
}

/* V70 - Critères Tenèze issus de « Du conte merveilleux comme genre » */
.ic-callout-tenez-criteria {
    margin-top: 1rem;
}
.ic-tenez-criteria-list {
    margin-top: 0.75rem;
}
.ic-tenez-criterion summary {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}
.ic-table-tenez-criteria th {
    width: 8rem;
}
.ic-badge-strong {
    font-weight: 700;
}
.ic-badge-medium {
    font-weight: 600;
}
.ic-badge-light {
    opacity: 0.82;
}


/* V71 - Poétiques du corpus de versions */
.interface-contes .ic-corpus-poetics-card {
    border-left: 4px solid #7a5f3d;
    background: #fffdf8;
}

.interface-contes .ic-corpus-poetic-core {
    font-size: 1.02rem;
    line-height: 1.65;
}

.interface-contes .ic-table-corpus-poetics td,
.interface-contes .ic-table-corpus-poetics th {
    vertical-align: top;
}

.interface-contes .ic-compact-list {
    margin: 0.4rem 0 1rem 1.2rem;
    padding: 0;
}

.interface-contes .ic-inner-details {
    margin-top: 1rem;
    border: 1px solid #e3dacd;
    border-radius: 0.7rem;
    padding: 0.7rem 0.9rem;
    background: #fff;
}

.interface-contes .ic-inner-details summary {
    cursor: pointer;
    font-weight: 700;
}

.interface-contes .ic-markdown-body {
    margin-top: 0.8rem;
    line-height: 1.6;
}

.interface-contes .ic-markdown-body h3,
.interface-contes .ic-markdown-body h4,
.interface-contes .ic-markdown-body h5 {
    margin-top: 1rem;
    margin-bottom: 0.45rem;
}

.interface-contes .ic-markdown-body p {
    margin: 0.35rem 0 0.65rem;
}

.interface-contes .ic-md-table-line {
    margin: 0.1rem 0;
    padding: 0.2rem 0.4rem;
    white-space: pre-wrap;
    background: #faf7f0;
    border-radius: 0.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86rem;
}

.interface-contes .ic-corpus-poetics-card-small p {
    margin-bottom: 0.55rem;
}


/* V72 - Éléments à fort potentiel symbolique */
.interface-contes .ic-table-symbolic-potential td,
.interface-contes .ic-table-symbolic-potential th {
    vertical-align: top;
}

.interface-contes .ic-table-symbolic-potential td:first-child {
    min-width: 10rem;
}

.interface-contes .ic-confidence {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #eee7dc;
    font-size: 0.88rem;
    font-weight: 700;
}

.interface-contes .ic-confidence-strong {
    background: #e2f0df;
}

.interface-contes .ic-confidence-medium {
    background: #f2ead6;
}

.interface-contes .ic-confidence-low {
    background: #f2dddd;
}

.interface-contes .ic-storyteller-scenario {
    display: grid;
    gap: 1rem;
}

.interface-contes .ic-storyteller-potential-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.interface-contes .ic-potential-item {
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    padding: 0.75rem;
    background: #fafafa;
}

.interface-contes .ic-potential-item h4 {
    margin: 0 0 0.35rem 0;
    font-size: 0.98rem;
}

.interface-contes .ic-potential-item p {
    margin: 0;
}

.interface-contes .ic-storyteller-orientation p {
    margin: 0.45rem 0;
}

.interface-contes .ic-table-storyteller {
    min-width: 1180px;
}

.interface-contes .ic-table-storyteller th,
.interface-contes .ic-table-storyteller td {
    vertical-align: top;
}

.interface-contes .ic-table-storyteller th:nth-child(1),
.interface-contes .ic-table-storyteller td:nth-child(1) {
    width: 4.5rem;
    text-align: center;
}

.interface-contes .ic-table-storyteller th:nth-child(2),
.interface-contes .ic-table-storyteller td:nth-child(2) {
    width: 15%;
}

.interface-contes .ic-table-storyteller th:nth-child(3),
.interface-contes .ic-table-storyteller td:nth-child(3) {
    width: 22%;
}

.interface-contes .ic-table-storyteller th:nth-child(4),
.interface-contes .ic-table-storyteller td:nth-child(4),
.interface-contes .ic-table-storyteller th:nth-child(5),
.interface-contes .ic-table-storyteller td:nth-child(5) {
    width: 18%;
}

.interface-contes .ic-table-storyteller th:nth-child(6),
.interface-contes .ic-table-storyteller td:nth-child(6) {
    width: 15%;
}

.interface-contes .ic-table-storyteller th:nth-child(7),
.interface-contes .ic-table-storyteller td:nth-child(7) {
    width: 14%;
}

.interface-contes .ic-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

@media (max-width: 900px) {
    .interface-contes .ic-storyteller-potential-grid {
        grid-template-columns: 1fr;
    }
}

.interface-contes .ic-storyteller-scene-list {
    display: grid;
    gap: 0.85rem;
}

.interface-contes .ic-storyteller-scene-card {
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.interface-contes .ic-storyteller-scene-card p {
    margin: 0.45rem 0;
}

.interface-contes .ic-storyteller-scene-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
    margin-bottom: 0.45rem;
}

.interface-contes .ic-storyteller-scene-head h4 {
    margin: 0;
}

.interface-contes .ic-storyteller-scene-head .ic-muted {
    margin: 0.2rem 0 0 0;
}

.interface-contes .ic-storyteller-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: #f0f0f0;
    font-weight: 700;
}

.interface-contes .ic-storyteller-motifs {
    margin-top: 0.6rem;
    align-items: center;
}

/* V75.3 - Motifs merveilleux structurants */
.interface-contes .ic-marvelous-structural-card {
    border-left: 4px solid #6b7280;
}

.interface-contes .ic-table-marvelous-structural th {
    width: 28%;
    min-width: 12rem;
}

.interface-contes .ic-table-marvelous-structural td p {
    margin: 0.35rem 0 0;
}


/* V75-4 - pondération discrète des EDC d'appui */
.ic-table-tenez-criteria .ic-muted,
.ic-table-marvelous-structural .ic-muted {
    display: inline-block;
    margin-left: .35rem;
}


/* V75.6 - Études transversales de la poétique du conte merveilleux */
.interface-contes .ic-transversal-callout {
    margin-top: 0.75rem;
}

.interface-contes .ic-transversal-grid .ic-card {
    border-left: 4px solid #4b5563;
}

.interface-contes .ic-otherworld-laws-callout {
    border-left: 4px solid #111827;
}

.interface-contes .ic-otherworld-laws-callout h3 {
    margin-top: 0;
}

.interface-contes .ic-transversal-entry-card .ic-surtitre,
.interface-contes .ic-transversal-entry-section .ic-surtitre {
    letter-spacing: 0.03em;
}

.interface-contes .ic-table-transversal-samples th:first-child,
.interface-contes .ic-table-transversal-samples td:first-child {
    width: 12rem;
}

.interface-contes .ic-table-transversal-samples th:last-child,
.interface-contes .ic-table-transversal-samples td:last-child {
    width: 6rem;
    text-align: right;
}

.interface-contes .ic-table-transversal-coverage th:first-child,
.interface-contes .ic-table-transversal-coverage td:first-child {
    width: 12rem;
}

.interface-contes .ic-transversal-detail-grid .ic-card {
    min-width: 0;
}


/* v75-8 - Filtres cliquables par forme principale dans les études transversales */
.ic-form-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.25rem 0 0.5rem;
}
.ic-form-filter-btn.is-active {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px currentColor;
}
.ic-form-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    padding: 0 0.35em;
    margin-left: 0.25em;
    border-radius: 999px;
    background: rgba(0,0,0,0.08);
    font-size: 0.85em;
}
.ic-form-filter-note {
    margin-top: 0.35rem;
}


/* v75-12 - Vrai menu déroulant à deux étages pour les études transversales */
.interface-contes .ic-transversal-poetics-section .ic-transversal-search-toolbar {
    display: grid;
    grid-template-columns: minmax(18rem, 1.15fr) minmax(22rem, 1fr);
    gap: 0.8rem;
    align-items: start;
}
.interface-contes .ic-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}
.interface-contes .ic-transversal-family-menu {
    position: relative;
    display: inline-block;
    min-width: 19rem;
    max-width: 100%;
    z-index: 100;
}
.interface-contes .ic-transversal-menu-trigger,
.interface-contes .ic-menu-reset,
.interface-contes .ic-transversal-menu-family-btn,
.interface-contes .ic-transversal-submenu-btn {
    font: inherit;
    text-align: left;
    border: 1px solid #cfd7df;
    background: #fff;
    color: inherit;
    cursor: pointer;
}
.interface-contes .ic-transversal-menu-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 2.45rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.45rem;
    background: #fff;
}
.interface-contes .ic-transversal-menu-trigger::after {
    content: "▾";
    margin-left: 0.75rem;
    font-size: 0.85em;
    line-height: 1;
}
.interface-contes .ic-transversal-menu-root,
.interface-contes .ic-transversal-submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    border: 1px solid #cfd7df;
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.interface-contes .ic-transversal-menu-root {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    min-width: 19rem;
    max-width: 24rem;
    max-height: 28rem;
    overflow: visible;
}
.interface-contes .ic-transversal-family-menu:hover > .ic-transversal-menu-root,
.interface-contes .ic-transversal-family-menu:focus-within > .ic-transversal-menu-root {
    display: block;
}
.interface-contes .ic-transversal-menu-family,
.interface-contes .ic-transversal-menu-reset-item {
    position: relative;
}
.interface-contes .ic-transversal-menu-reset-item + .ic-transversal-menu-family,
.interface-contes .ic-transversal-menu-family + .ic-transversal-menu-family,
.interface-contes .ic-transversal-submenu li + li {
    margin-top: 0.25rem;
}
.interface-contes .ic-menu-reset,
.interface-contes .ic-transversal-menu-family-btn,
.interface-contes .ic-transversal-submenu-btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.2rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.4rem;
    border-color: transparent;
    background: transparent;
}
.interface-contes .ic-transversal-menu-family-btn {
    justify-content: space-between;
}
.interface-contes .ic-transversal-menu-family-btn::after {
    content: "›";
    margin-left: 0.75rem;
    font-weight: 700;
    line-height: 1;
}
.interface-contes .ic-transversal-submenu {
    position: absolute;
    top: -0.35rem;
    left: calc(100% + 0.2rem);
    min-width: 20rem;
    max-width: 28rem;
    max-height: 28rem;
    overflow: auto;
}
.interface-contes .ic-transversal-menu-family:hover > .ic-transversal-submenu,
.interface-contes .ic-transversal-menu-family:focus-within > .ic-transversal-submenu {
    display: block;
}

.interface-contes .ic-transversal-family-menu.is-menu-closed > .ic-transversal-menu-root,
.interface-contes .ic-transversal-family-menu.is-menu-closed .ic-transversal-submenu {
    display: none !important;
}
.interface-contes .ic-transversal-menu-trigger:hover,
.interface-contes .ic-transversal-menu-trigger:focus,
.interface-contes .ic-menu-reset:hover,
.interface-contes .ic-menu-reset:focus,
.interface-contes .ic-transversal-menu-family-btn:hover,
.interface-contes .ic-transversal-menu-family-btn:focus,
.interface-contes .ic-transversal-submenu-btn:hover,
.interface-contes .ic-transversal-submenu-btn:focus {
    background: #eef2f7;
    outline: none;
}
.interface-contes .ic-menu-reset.is-active,
.interface-contes .ic-transversal-submenu-btn.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
    font-weight: 700;
}
.interface-contes .ic-transversal-menu-family-btn.is-active {
    background: #eef2f7;
    border-color: transparent;
    font-weight: 700;
}
.interface-contes .ic-menu-selection {
    margin: 0.35rem 0 0;
}
@media (max-width: 900px) {
    .interface-contes .ic-transversal-poetics-section .ic-transversal-search-toolbar {
        grid-template-columns: 1fr;
    }
    .interface-contes .ic-transversal-family-menu {
        display: block;
        min-width: 0;
        width: 100%;
    }
    .interface-contes .ic-transversal-menu-root {
        min-width: 100%;
        max-width: none;
    }
    .interface-contes .ic-transversal-submenu {
        left: 1rem;
        right: auto;
        min-width: calc(100% - 1rem);
        max-width: calc(100vw - 3rem);
    }
}


.ic-unindexed-form {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border: 1px dashed #c9c9c9;
    border-radius: 999px;
    background: #fafafa;
    color: #666;
    white-space: nowrap;
}

/* V75-37 - clarification narratologique CONJ+/CONJ-/DISJ-/DISJ+ */
.interface-contes .ic-conjdisj-mini-map {
    margin: 0.7rem 0 0.9rem;
}
.interface-contes .ic-narrative-op-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.interface-contes .ic-narrative-op-summary {
    margin: 0.08rem 0;
}
.interface-contes .ic-conjdisj-provisional-card {
    border-left: 4px solid rgba(80, 80, 80, 0.28);
}
.interface-contes .ic-conjdisj-provisional-card .ic-operation-badge {
    margin-bottom: 0.2rem;
}

/* V75-45 - Famille et foyer */
.ic-family-dysfunction-card .ic-callout,
.ic-family-dysfunctions-section .ic-callout {
    margin-bottom: 1rem;
}

.ic-table-family-dysfunctions td,
.ic-table-family-dysfunctions th {
    vertical-align: top;
}

.ic-chip-strong {
    font-weight: 700;
}


/* V75-48 - Page thématique Familles en crise : éviter les extraits tronqués */
.interface-contes .ic-table-transversal-family-crisis {
    min-width: 980px;
}
.interface-contes .ic-table-transversal-family-crisis th,
.interface-contes .ic-table-transversal-family-crisis td {
    white-space: normal;
    overflow-wrap: anywhere;
}
.interface-contes .ic-table-transversal-family-crisis th:nth-child(1),
.interface-contes .ic-table-transversal-family-crisis td:nth-child(1) {
    width: 14%;
}
.interface-contes .ic-table-transversal-family-crisis th:nth-child(2),
.interface-contes .ic-table-transversal-family-crisis td:nth-child(2) {
    width: 24%;
}
.interface-contes .ic-table-transversal-family-crisis th:nth-child(3),
.interface-contes .ic-table-transversal-family-crisis td:nth-child(3) {
    width: 34%;
}
.interface-contes .ic-table-transversal-family-crisis th:nth-child(4),
.interface-contes .ic-table-transversal-family-crisis td:nth-child(4) {
    width: 20%;
}
.interface-contes .ic-table-transversal-family-crisis th:nth-child(5),
.interface-contes .ic-table-transversal-family-crisis td:nth-child(5) {
    width: 8%;
}


/* V75-50 - Menu des études transversales : sous-menus contenus dans le cadre blanc */
.interface-contes .ic-transversal-menu-root {
    width: min(42rem, calc(100vw - 4rem));
    max-width: min(42rem, calc(100vw - 4rem));
    max-height: min(70vh, 36rem);
    overflow-y: auto;
    overflow-x: hidden;
}
.interface-contes .ic-transversal-submenu {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin: 0.25rem 0 0.35rem 0.65rem;
    padding: 0.25rem 0 0.25rem 0.45rem;
    border: 0;
    border-left: 2px solid #d7dde5;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
.interface-contes .ic-transversal-submenu-btn,
.interface-contes .ic-transversal-menu-family-btn,
.interface-contes .ic-menu-reset {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
.interface-contes .ic-submenu-all-family {
    color: #111827;
    font-weight: 700;
    background: #f8fafc;
}
.interface-contes .ic-submenu-all-family.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}
@media (max-width: 900px) {
    .interface-contes .ic-transversal-menu-root {
        width: min(100%, calc(100vw - 2rem));
        max-width: min(100%, calc(100vw - 2rem));
    }
    .interface-contes .ic-transversal-submenu {
        left: auto;
        right: auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}


/* V75-51 - Menu des études transversales : sous-menus latéraux contenus dans le cadre */
.interface-contes .ic-transversal-menu-root {
    box-sizing: border-box;
    width: min(46rem, calc(100vw - 4rem));
    max-width: min(46rem, calc(100vw - 4rem));
    max-height: min(70vh, 36rem);
    padding: 0.35rem 23rem 0.35rem 0.35rem;
    overflow-y: auto;
    overflow-x: hidden;
}
.interface-contes .ic-transversal-menu-reset-item,
.interface-contes .ic-transversal-menu-family {
    width: 20rem;
    max-width: 20rem;
    position: relative;
}
.interface-contes .ic-transversal-menu-reset-item > .ic-menu-reset,
.interface-contes .ic-transversal-menu-family > .ic-transversal-menu-family-btn {
    width: 100%;
}
.interface-contes .ic-transversal-submenu {
    position: absolute;
    top: -0.35rem;
    left: calc(100% + 0.75rem);
    width: 21.5rem;
    min-width: 0;
    max-width: 21.5rem;
    max-height: min(62vh, 31rem);
    margin: 0;
    padding: 0.35rem;
    border: 1px solid #cfd7df;
    border-radius: 0.55rem;
    border-left: 1px solid #cfd7df;
    box-shadow: none;
    background: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2;
}
.interface-contes .ic-transversal-menu-family:hover > .ic-transversal-submenu,
.interface-contes .ic-transversal-menu-family:focus-within > .ic-transversal-submenu {
    display: block;
}
@media (max-width: 900px) {
    .interface-contes .ic-transversal-menu-root {
        width: min(100%, calc(100vw - 2rem));
        max-width: min(100%, calc(100vw - 2rem));
        padding-right: 0.35rem;
        overflow-x: visible;
    }
    .interface-contes .ic-transversal-menu-reset-item,
    .interface-contes .ic-transversal-menu-family {
        width: 100%;
        max-width: none;
    }
    .interface-contes .ic-transversal-submenu {
        position: static;
        width: 100%;
        max-width: none;
        max-height: 18rem;
        margin: 0.25rem 0 0.35rem 0;
        border-left: 1px solid #cfd7df;
    }
}


/* V75.62 - liens automatiques depuis la table des matières du catalogue */
.ic-toc-conte-link {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.ic-toc-conte-link:hover,
.ic-toc-conte-link:focus {
    text-decoration-thickness: 0.12em;
}

/* V75-70 - Menu transversal famille/entrée : ouverture au clic, sans dépendance au survol */
.interface-contes .ic-transversal-family-menu > .ic-transversal-menu-root {
    display: none !important;
}
.interface-contes .ic-transversal-family-menu.is-menu-open > .ic-transversal-menu-root {
    display: block !important;
}
.interface-contes .ic-transversal-menu-family > .ic-transversal-submenu {
    display: none !important;
}
.interface-contes .ic-transversal-menu-family.is-submenu-open > .ic-transversal-submenu {
    display: block !important;
}
.interface-contes .ic-transversal-menu-trigger[aria-expanded="true"]::after,
.interface-contes .ic-transversal-menu-family-btn[aria-expanded="true"]::after {
    transform: rotate(90deg);
}
.interface-contes .ic-transversal-menu-trigger::after,
.interface-contes .ic-transversal-menu-family-btn::after {
    transition: transform 0.12s ease-in-out;
}
.interface-contes .ic-transversal-menu-root,
.interface-contes .ic-transversal-submenu {
    touch-action: manipulation;
}
@media (max-width: 900px) {
    .interface-contes .ic-transversal-family-menu.is-menu-open > .ic-transversal-menu-root {
        position: absolute;
        left: 0;
        right: auto;
        width: min(100%, calc(100vw - 2rem));
        max-width: min(100%, calc(100vw - 2rem));
    }
    .interface-contes .ic-transversal-menu-family.is-submenu-open > .ic-transversal-submenu {
        position: static;
        width: 100%;
        max-width: none;
        margin-top: 0.25rem;
    }
}

/* V75-71 - Études transversales : remplacement du sous-menu fragile par une liste native stable */
.interface-contes .ic-transversal-native-select {
    box-sizing: border-box;
    width: min(34rem, 100%);
    min-height: 2.45rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cfd7df;
    border-radius: 0.45rem;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.3;
}
.interface-contes .ic-transversal-native-select:focus {
    outline: 2px solid rgba(30, 64, 175, 0.25);
    outline-offset: 2px;
    border-color: #94a3b8;
}
.interface-contes .ic-transversal-native-select optgroup {
    font-weight: 700;
}
.interface-contes .ic-transversal-native-select option {
    font-weight: 400;
}
@media (max-width: 900px) {
    .interface-contes .ic-transversal-native-select {
        width: 100%;
    }
}


/* V75-87 - bibliographie externe éditable */
.ic-external-bibliography-host .ic-pre,
.ic-external-bibliography-host pre {
    max-height: none;
    overflow: visible;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.55;
}

.ic-external-bibliography-host details {
    margin-bottom: 1rem;
}

.ic-external-bibliography-host summary {
    cursor: pointer;
    font-weight: 700;
}

/* V75-89 - Recherche exploitable dans la bibliographie du catalogue */
.interface-contes .ic-biblio-search-results {
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    background: #fff;
}

.interface-contes .ic-biblio-search-summary {
    margin-bottom: .75rem;
}

.interface-contes .ic-biblio-search-list {
    margin: 0;
    padding-left: 1.35rem;
}

.interface-contes .ic-biblio-search-result {
    margin: .85rem 0;
    padding: .75rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.interface-contes .ic-biblio-search-result-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .25rem;
}

.interface-contes .ic-biblio-search-result p {
    margin: .35rem 0 0;
}

.interface-contes .ic-biblio-search-hit {
    background: #fff8d6;
    border-radius: 4px;
}

.interface-contes .ic-biblio-active-hit {
    outline: 2px solid #111827;
    outline-offset: 3px;
}


/* V75-99 - EDC : seules les véritables lignes de section sont en gras. */
.ic-table-conte-edc tr:not(.ic-edc-flat-section) td,
.ic-table-version-edc tr:not(.ic-edc-flat-section) td {
    font-weight: 400;
}
.ic-table-conte-edc tr.ic-edc-flat-section td:nth-child(1),
.ic-table-conte-edc tr.ic-edc-flat-section td:nth-child(2) {
    font-weight: 700;
}


.ic-table-edc-catalogue-lines td:first-child {
    white-space: normal;
    line-height: 1.45;
}

.ic-edc-catalogue-line-btn {
    text-align: left;
    font-family: inherit;
    font-weight: 400;
    line-height: 1.45;
}

.ic-edc-catalogue-title-row .ic-edc-catalogue-line-btn {
    font-weight: 700;
}

/* V75-116 - EDC sans lien utile : affichage linéaire du catalogue. */
.interface-contes .ic-edc-catalogue-list {
    display: grid;
    gap: 0;
    border: 1px solid var(--ic-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.interface-contes .ic-edc-catalogue-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--ic-border);
}

.interface-contes .ic-edc-catalogue-row:last-child {
    border-bottom: 0;
}

.interface-contes .ic-edc-catalogue-text {
    min-width: 0;
    line-height: 1.45;
}

.interface-contes .ic-edc-catalogue-title-row {
    background: #f8f6ef;
}

.interface-contes .ic-edc-catalogue-title-row .ic-edc-static-line,
.interface-contes .ic-edc-catalogue-title-row .ic-edc-catalogue-line-btn {
    font-weight: 700;
}

.interface-contes .ic-edc-static-line {
    color: var(--ic-text);
    text-decoration: none;
    cursor: default;
}

.interface-contes .ic-edc-code-static {
    display: inline-block;
    min-width: 4.2rem;
}

.interface-contes .ic-edc-catalogue-versions {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .interface-contes .ic-edc-catalogue-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .interface-contes .ic-edc-catalogue-versions {
        white-space: normal;
    }
}
