@charset "UTF-8";

/*
	CFDT-SG - nouvelle version : un dossier (www/webpages.php)
	Avec pages/fiche.css (documents, partage, étiquettes de bloc).
	en-tête (« Une question… » à droite) - deux colonnes (contenu et partage | colonne qui reste visible) - contenu fidèle à l'éditeur - sommaire - documents - autres dossiers (colonne) - colonne vide - commentaires
*/

/* ---------- en-tête ---------- */
.dossier-head { padding: 30px 0 30px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.dossier-head-in { display: flex; align-items: center; justify-content: space-between; gap: 56px; }
.dossier-head h1 { max-width: 760px; margin-top: 8px; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.dossier-sub { max-width: 680px; margin-top: 10px; color: var(--ink-2); font-size: 1.12rem; }
.dossier-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; color: var(--mute); font-size: .84rem; }
.dossier-meta span { display: inline-flex; align-items: center; gap: 6px; }
.dossier-cover { margin: 0 0 28px; }
@media (max-width: 1060px) { .dossier-head-in { flex-direction: column; align-items: stretch; gap: 20px; } .dossier-ask { flex-basis: auto; width: auto; } }

/* ---------- deux colonnes ---------- */
.dossier-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); gap: 56px; align-items: start; padding-top: 40px; padding-bottom: 64px; }
@media (max-width: 1060px) { .dossier-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* ---------- contenu : la mise en page de l'éditeur est gardée (couleurs, fonds, tableaux), sans débordement ---------- */
.dossier-main { min-width: 0; }
.dossier-body { min-width: 0; color: var(--ink-2); font-size: 1.02rem; line-height: 1.65; overflow-wrap: break-word; }
.dossier-body :where(p, div, section, table, img, figure, iframe, video) { max-width: 100% !important; }
.dossier-body img { height: auto; }
.dossier-body table { border-collapse: collapse; }
.dossier-body :where(table[style*="width"], td[style*="width"]) { max-width: 100%; }
.dossier-body :where(h1, h2, h3, h4) { scroll-margin-top: calc(var(--header-h) + 24px); color: var(--ink); line-height: 1.25; }
.dossier-body > :first-child { margin-top: 0; }
.dossier-body a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 3px; }
.dossier-body ul, .dossier-body ol { padding-left: 1.4em; }
.dossier-scroll { max-width: 100%; overflow-x: auto; }

/* ---------- colonne : reste visible ---------- */
.dossier-side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 1060px) { .dossier-side { position: static; } }
.dossier-box { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.dossier-box .fiche-docs { grid-template-columns: minmax(0, 1fr); }

.dossier-toc { padding: 18px 18px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.dossier-toc ol { position: relative; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.dossier-toc ol::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 0; width: 2px; border-radius: 2px; background: var(--line); }
.dossier-toc li { counter-increment: toc; }
.dossier-toc a { position: relative; display: flex; gap: 10px; padding: 7px 0 7px 16px; color: var(--ink-2); font-size: .86rem; line-height: 1.35; transition: color .2s; }
.dossier-toc a::before { content: counter(toc, decimal-leading-zero); flex: none; color: var(--mute); font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.6; }
.dossier-toc a::after { content: ""; position: absolute; top: 6px; bottom: 6px; left: 0; width: 2px; border-radius: 2px; background: transparent; transition: background .2s; }
.dossier-toc a:hover { color: var(--ink); }
.dossier-toc a.is-current { color: var(--ink); font-weight: 600; }
.dossier-toc a.is-current::before { color: var(--orange); }
.dossier-toc a.is-current::after { background: var(--orange); }

/* « Une question sur ce sujet ? » : à droite de l'intitulé, compact (ne grandit pas l'en-tête) */
.dossier-ask { display: flex; flex: 0 0 var(--aside); flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; width: var(--aside); padding: 16px 18px; border-radius: 16px; background: var(--orange-soft); }
.dossier-ask-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #FFF; color: var(--orange); }
.dossier-ask h2 { color: var(--ink); font-size: 1rem; line-height: 1.3; }
.dossier-ask p { margin-top: 2px; color: var(--ink-2); font-size: .84rem; }
.dossier-ask > div:not(.dossier-ask-btns) { flex: 1; min-width: 0; }
.dossier-ask-btns { display: flex; flex: 1 1 100%; gap: 6px; }
.dossier-ask-btns .btn { flex: 1 1 auto; justify-content: center; }
.dossier-ask .btn { min-height: 36px; padding: 0 12px; font-size: .8rem; white-space: nowrap; }
.dossier-ask .btn.is-quiet { background: #FFF; }

/* ---------- autres dossiers (colonne) ---------- */
.dossier-others ul { margin: 0; padding: 0; list-style: none; }
.dossier-others li + li { border-top: 1px solid var(--line); }
.dossier-others a { display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px; }
.dossier-other-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--orange-soft); color: var(--orange); }
.dossier-others b { display: block; color: var(--ink); font-size: .88rem; font-weight: 600; line-height: 1.3; transition: color .2s; }
.dossier-others small { display: block; overflow: hidden; color: var(--mute); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.dossier-others a > span:last-child { min-width: 0; }
.dossier-others a:hover b { color: var(--orange-dark); }

/* ---------- colonne vide : contenu en pleine largeur, 900 px au plus ---------- */
.dossier-grid.is-full { grid-template-columns: minmax(0, 1fr); }	/* sans colonne : toute la largeur du site (15/11/2026) */
.dossier-grid.is-full .dossier-side { display: none; }

/* ---------- commentaires (15/11/2026 : cartes, réponse unique de l'équipe, formulaire ouvert à la demande, coordonnées facultatives) ---------- */
.dossier-meta-com { display: inline-flex; align-items: center; gap: 6px; color: var(--orange-dark); font-weight: 600; text-decoration: none; }
.dossier-meta-com:hover { text-decoration: underline; text-underline-offset: 3px; }
.dossier-comments { padding-top: 8px; padding-bottom: 64px; scroll-margin-top: calc(var(--header-h) + 24px); }
/* 15/11/2026 : toute la largeur du site, comme le dossier ; « Réagir à ce dossier » toujours à droite (commentaires affichés ou non) */
.dc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-top: 28px; background-image: var(--rule); background-repeat: no-repeat; background-size: 100% 1px; }
.dc-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.dc-head h2 .ic { color: var(--orange); }
.dc-sub { margin-top: 4px; color: var(--mute); font-size: .92rem; }
.dc-head > div { flex: 1 1 auto; min-width: 0; }
.dc-open { flex: none; margin-left: auto; }
.dc-open[hidden] { display: none; }
@media (max-width: 640px) { .dc-head { flex-direction: column; align-items: stretch; } .dc-open { margin-left: 0; } }
.comments { display: flex; flex-direction: column; gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.comment[hidden] { display: none; }
.comment-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.comment-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.comment-top b { color: var(--ink); font-size: .95rem; }
.comment-top time { color: var(--mute); font-size: .8rem; }
.comment-av { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-soft); color: var(--ink-2); font-size: .85rem; font-weight: 700; }
.comment-av.is-team { background: var(--orange); color: #FFF; }
.comment p { margin-top: 8px; color: var(--ink-2); overflow-wrap: anywhere; }
.comment-reply { position: relative; margin: 8px 0 0 28px; padding: 14px 18px; border-left: 3px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0; background: var(--orange-soft); }
.comment-reply::before { content: ""; position: absolute; top: -8px; left: -17px; width: 14px; height: 22px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-bottom-left-radius: 8px; }
.comment-reply .comment-top b { color: var(--orange-dark); }
.comments-more { margin-top: 14px; }
.comment-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.comment-form[hidden] { display: none; }
.comment-label { display: flex; justify-content: space-between; gap: 10px; color: var(--ink); font-weight: 600; }
.comment-count { color: var(--mute); font-weight: 400; font-size: .8rem; }
.comment-form textarea, .comment-check input, .comment-fields input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; resize: vertical; }
.comment-form textarea:focus, .comment-check input:focus, .comment-fields input:focus { border-color: var(--ink); outline: none; }
.comment-who { margin: 0; padding: 0; border: 0; }
.comment-who legend { padding: 0; color: var(--ink); font-weight: 600; }
.comment-who legend small { margin-left: 6px; color: var(--mute); font-weight: 400; font-size: .82rem; }
.comment-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.comment-fields label { display: flex; flex-direction: column; gap: 4px; }
.comment-fields span { color: var(--ink-2); font-size: .84rem; }
.comment-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; color: var(--mute); font-size: .82rem; }
.comment-note .ic { flex: none; margin-top: 3px; }
.comment-hp { position: absolute !important; left: -9999px; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.comment-msg { flex-basis: 100%; color: var(--mute); font-size: .88rem; }
.comment-msg:empty { display: none; }
.comment-msg.is-ok { color: var(--ok); } .comment-msg.is-ko { color: var(--ko); }
.comment-rules { color: var(--mute); font-size: .82rem; }
.comment-rules summary { color: var(--ink-2); font-weight: 600; cursor: pointer; }
.comment-rules p, .comment-rules ul { margin-top: 8px; }
@media (max-width: 640px) { .comment-fields { grid-template-columns: minmax(0, 1fr); } .comment-reply { margin-left: 14px; } .comment-reply::before { display: none; } }

/* écran moyen (encart sous le titre, 2026-11) : l'encart « Une question » ne garde pas sa largeur de colonne en hauteur ;
   sur une ligne : l'icône et le texte à gauche, les boutons à droite */
@media (max-width: 1060px) {
	.dossier-ask { flex: none; width: auto; align-items: center; flex-wrap: nowrap; }
	.dossier-ask-btns { flex: 0 0 auto; }
}
@media (max-width: 640px) {
	.dossier-ask { flex-wrap: wrap; }
	.dossier-ask-btns { flex: 1 1 100%; }
}

/* commentaire transmis (15/11/2026) */
.comment-done { display: flex; align-items: flex-start; gap: 16px; margin-top: 22px; padding: 22px; border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--ok) 6%, #FFF); }
.comment-done[hidden] { display: none; }
.comment-done:focus { outline: none; }
.comment-done-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, #FFF); color: var(--ok); }
.comment-done h3 { font-size: 1.08rem; color: var(--ink); }
.comment-done p { margin: 4px 0 12px; color: var(--ink-2); }
