/* ==========================================================================
   BIMsmarter.eu - liens-sources.css (refonte "Calques", octobre 2026)
   Pages de reference : /liens, /sources-and-normes-bim, /mentions-sources.
   Priorite a la lisibilite : registres a filets, fiches a double cadre,
   cartouche de l'editeur. S'appuie sur site.css ; aucune couleur hors charte.
   ========================================================================== */

/* ---------- Utilitaires (memes regles que outils.css) ---------- */
.section-alt table { background: var(--bg); }

.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; }
@media (min-width: 900px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.cols-2 > p { max-width: 62ch; }

@media (min-width: 960px) {
  .faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 56px; align-items: start; }
  .faq-grid > h2 { position: sticky; top: calc(var(--bar) + 24px); margin-top: 0; }
}

.tldr.wide { max-width: 92ch; margin-bottom: 48px; }
.sec-head:last-child { margin-bottom: 0; }

/* Pictogrammes d'origine conserves dans le source, masques (sobriete) */
.emo { display: none; }

/* Titres saisis en capitales ou en casse de titre : affiches en casse de phrase */
.sc { text-transform: lowercase; }
.sc::first-letter { text-transform: uppercase; }

/* Petit tiret bleu des listes de fiche */
.dashed li, .pillar li, .src-cols li { position: relative; margin: 0; padding-left: 20px; }
.dashed li::before, .pillar li::before, .src-cols li::before {
  content: ""; position: absolute; left: 1px; top: 0.78em; width: 9px; height: 1.5px; background: var(--accent);
}

/* ==========================================================================
   /liens : le registre des acteurs
   ========================================================================== */
.registry { border-top: 1.5px solid var(--navy); }
.reg-group {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 56px;
  padding: 28px 0 30px; border-bottom: 1px solid var(--rule-strong);
}
.reg-group:last-child { border-bottom: 1.5px solid var(--navy); }
.reg-group > h2 { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); max-width: 16ch; }
@media (min-width: 960px) {
  .reg-group { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .reg-group > h2 { position: sticky; top: calc(var(--bar) + 24px); align-self: start; }
}
.reg-row { padding: 14px 0 16px; border-top: 1px solid var(--rule); }
.reg-row:first-child { border-top: 0; padding-top: 4px; }
.reg-row h3 { margin: 0 0 4px; font-size: 1.0625rem; line-height: 1.35; }
.reg-row h3 a { color: var(--navy); text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; }
.reg-row h3 a:hover { color: var(--accent-dark); }
.reg-row p { margin: 0; color: var(--text-muted); max-width: 68ch; }
@media (min-width: 720px) {
  .reg-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); column-gap: 24px; }
}
.reg-note { margin: 32px 0 0; max-width: 80ch; }

/* Tableau des telechargements (fond navy), en fiches sur mobile */
.table-wrap .dl-table { min-width: 0; }
.dl-table td:first-child { font-weight: 500; width: 36%; }
.after-table { margin-top: 32px; }
.after-table p { margin-bottom: 0.8em; }
@media (max-width: 719px) {
  .dl-table thead { display: none; }
  .dl-table, .dl-table tbody, .dl-table tr, .dl-table td { display: block; width: auto !important; }
  .dl-table tr { padding: 14px 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
  .dl-table tbody tr:last-child { border-bottom: 0; }
  .dl-table td { padding: 0; border: 0; }
  .dl-table td + td { margin-top: 8px; }
  .dl-table td[data-l]::before { content: attr(data-l); display: block; font-size: 0.75rem; font-weight: 500; color: var(--on-navy-muted); }
}

/* ==========================================================================
   /sources-and-normes-bim
   ========================================================================== */
.duo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo-sheet { position: relative; padding: 32px 30px 30px; border: 1px solid var(--rule-strong); background: var(--bg); }
.duo-sheet::before { content: ""; position: absolute; inset: 8px; border: 1.5px solid var(--navy); pointer-events: none; }
.duo-sheet > * { position: relative; }
.duo-sheet h2 { margin: 0 0 16px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); max-width: 20ch; }
.duo-sheet p { margin: 0; }

/* Quatre piliers : une grille de cases a filets navy */
.pillars {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5px;
  background: var(--navy); border: 1.5px solid var(--navy);
}
@media (min-width: 900px) { .pillars { grid-template-columns: 1fr 1fr; } }
.pillar { background: var(--bg); padding: 26px 24px 26px; }
.pillar h3 { margin: 0; font-size: 1.125rem; max-width: 36ch; }
.pillar-sub { margin: 6px 0 18px; font-family: var(--font); font-weight: 400; font-size: 1.125rem; line-height: 1.4; color: var(--text-muted); }
.pillar ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.notice { margin-top: 40px; padding: 22px 24px; border-left: 3px solid var(--accent); background: var(--bg-alt); }
.notice h3 { margin: 0 0 8px; font-size: 1.0625rem; }
.notice p { margin: 0; color: var(--text-muted); max-width: 92ch; }

/* ==========================================================================
   /mentions-sources
   ========================================================================== */
.cadre-title { margin-top: 0; max-width: 34ch; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem); }

/* Cartouche de l'editeur */
.titleblock {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5px; margin: 24px 0 0;
  background: var(--navy); border: 1.5px solid var(--navy);
}
@media (min-width: 900px) { .titleblock { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.titleblock > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 14px; background: var(--bg); }
.titleblock dt { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }
.titleblock dd { margin: 0; font-weight: 500; color: var(--navy); overflow-wrap: anywhere; }
@media (max-width: 479px) {
  .titleblock { grid-template-columns: minmax(0, 1fr); }
  .titleblock > div { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; }
  .titleblock dt { flex: none; }
  .titleblock dd { text-align: right; }
}

.objectif { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 56px; }
@media (min-width: 900px) { .objectif { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; } }
.objectif h2 { margin-top: 0; }
.objectif-k { font-weight: 600; color: var(--navy); }

/* Fiches des sources : double cadre, trois colonnes */
.src-sheet { position: relative; margin-top: 28px; padding: 10px; border: 1px solid var(--rule-strong); background: var(--bg); }
.src-sheet::before { content: ""; position: absolute; inset: 9px; border: 1.5px solid var(--navy); pointer-events: none; }
.src-sheet > * { position: relative; }
.src-head {
  padding: 22px 22px 18px; border-bottom: 1.5px solid var(--navy);
  background:
    linear-gradient(rgba(14, 44, 80, 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(14, 44, 80, 0.07) 1px, transparent 1px) 0 0 / 24px 24px;
  background-color: #F7FAFC;
}
.src-head h3 { margin: 0 0 8px; font-family: var(--font); font-weight: 700; font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem); line-height: 1.2; max-width: 40ch; }
.src-head p { margin: 0; font-size: 0.9375rem; overflow-wrap: anywhere; }
.src-cols { display: grid; grid-template-columns: minmax(0, 1fr); }
.src-cols > div { padding: 20px 22px 22px; border-top: 1px solid var(--rule); }
.src-cols > div:first-child { border-top: 0; }
@media (min-width: 900px) {
  .src-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .src-cols > div { border-top: 0; border-left: 1px solid var(--rule); }
  .src-cols > div:first-child { border-left: 0; }
}
.src-k { margin: 0 0 10px; font-size: 0.875rem; color: var(--navy); }
.src-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.9375rem; overflow-wrap: anywhere; }
.src-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; padding: 16px 22px 20px; border-top: 1.5px solid var(--navy); font-size: 0.9375rem; }
.src-foot .src-k { margin: 0; }
.src-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; overflow-wrap: anywhere; }
.src-foot li { margin: 0; }

/* Mise a jour */
.maj { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 56px; }
@media (min-width: 1000px) { .maj { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.maj h3 { margin-top: 0; }
.maj td:nth-child(2) { white-space: nowrap; }
.maj .table-wrap table { min-width: 520px; }
.changelog { margin-top: 20px; }

/* Signaler une discordance (fond navy) */
.signal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 56px; }
@media (min-width: 900px) { .signal { grid-template-columns: 1fr 1fr; } }
.signal .ticks { margin-bottom: 24px; }
.signal-k { margin-bottom: 8px; }
.section-navy .signal-k strong, .section-navy .signal-mail strong, .section-navy .signal-engage strong { color: #fff; }
.dash-list { list-style: none; padding: 0; margin: 0 0 24px; border-top: 1px solid rgba(255, 255, 255, 0.3); }
.dash-list li { margin: 0; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.signal-engage { margin: 0; padding: 14px 16px; border: 1px solid var(--accent); }

/* Ressources complementaires */
.res-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 40px; }
@media (min-width: 900px) { .res-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.res-cols > div { padding-top: 16px; border-top: 1.5px solid var(--navy); }
.res-cols h3 { margin: 0 0 12px; font-size: 1.0625rem; }
.res-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.9375rem; color: var(--text-muted); }
.res-cols li { margin: 0; }
