/* THEOREMS - Outils > Catalogues : habillage du site, identique à celui des outils de RDM (Sections, Poutres, Dalles).
   Les couleurs suivent la présentation sombre ou claire : texte courant, filets var(--thr-trait), accent orange. */
.thr-catalogues { --rs: .4rem; --text2: color-mix(in srgb, currentColor 78%, transparent); --text3: color-mix(in srgb, currentColor 58%, transparent);
  --blue: var(--thr-accent, #FF8A3D); --navy: currentColor; --border: var(--thr-trait); margin: 1.5rem 0 2rem; font-size: .95rem; }
.thr-catalogues a { color: var(--thr-accent, #FF8A3D); }

/* onglets : pastilles, comme le choix des formes et des schémas */
.thr-catalogues .ct-onglets { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; margin: 0 0 1rem; padding: 0; }
.thr-catalogues .te-subtab { font: inherit; font-size: .9rem; padding: .4rem .75rem; border-radius: 2rem; border: 1px solid var(--thr-trait); background: transparent; color: inherit; margin: 0; letter-spacing: 0; }
.thr-catalogues .te-subtab:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-catalogues .te-subtab.active { background: var(--thr-accent, #FF8A3D); border-color: var(--thr-accent, #FF8A3D); color: #10151d; font-weight: 600; }

/* panneaux : cadres fins arrondis, comme les champs des outils */
.thr-catalogues .ct-choix, .thr-catalogues .ct-fiche, .thr-catalogues .ct-calc, .thr-catalogues .ct-comp, .thr-catalogues .ct-avenir {
  border: 1px solid var(--thr-trait); border-radius: .6rem; padding: .8rem 1rem; background: transparent; color: inherit; }
.thr-catalogues .ct-choix label, .thr-catalogues .ct-param label { font-size: .85rem; color: inherit; opacity: .85; }
.thr-catalogues input, .thr-catalogues select, .thr-catalogues textarea { font: inherit; font-size: .9rem; height: auto; padding: .35rem .5rem; border-radius: .4rem;
  border: 1px solid var(--thr-trait); background: color-mix(in srgb, currentColor 5%, transparent); color: inherit; }
.thr-catalogues select option { color: #10151d; }
.thr-catalogues .ct-nb, .thr-catalogues .ct-source, .thr-catalogues .ct-comp-n, .thr-catalogues .ct-3d-aide { color: inherit; opacity: .75; }
.thr-catalogues .ct-liste { border-top: 1px solid var(--thr-trait); }

/* liste des éléments */
.thr-catalogues .ct-item { color: inherit; background: transparent; border-radius: .35rem; font-size: .9rem; }
.thr-catalogues .ct-item small { color: inherit; opacity: .78; }
.thr-catalogues .ct-item:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-catalogues .ct-item.on { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 22%, transparent); color: inherit; font-weight: 700; }
.thr-catalogues .ct-groupe, .thr-catalogues .ct-tab caption, .thr-catalogues .ct-tab-t { color: var(--thr-accent, #FF8A3D); }

/* fiche : titre, tableaux de valeurs comme les résultats des outils */
.thr-catalogues .ct-titre { border-bottom: 1px solid var(--thr-trait); }
.thr-catalogues .ct-titre b { color: inherit; font-family: var(--thr-titres); font-size: 1.2rem; }
.thr-catalogues .ct-titre span { color: inherit; opacity: .75; }
.thr-catalogues .ct-tab { font-variant-numeric: tabular-nums; }
.thr-catalogues .ct-tab th, .thr-catalogues .ct-tab td { color: inherit; border-bottom: 1px solid var(--thr-trait); padding: .3rem .4rem; }
.thr-catalogues .ct-tab th { font-weight: 400; }
.thr-catalogues .ct-tab td { font-weight: 600; }
.thr-catalogues .ct-tab td.u { opacity: .7; font-weight: 400; }
.thr-catalogues .ct-choix .ct-tab tr.on th, .thr-catalogues .ct-choix .ct-tab tr.on td { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 18%, transparent); }
.thr-catalogues .ct-comp-t, .thr-catalogues .ct-comp-tab thead th, .thr-catalogues .ct-comb thead th { color: inherit; border-bottom-color: var(--thr-trait); }
.thr-catalogues .ct-comp-tab td.best, .thr-catalogues .ct-comb tr.best td { color: #3FB950; background: color-mix(in srgb, #3FB950 12%, transparent); }
.thr-catalogues .ct-note { color: inherit; background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 6%, transparent); border-left: 3px solid var(--thr-accent, #FF8A3D); }
.thr-catalogues .ct-nok { color: color-mix(in srgb, #e5484d 70%, currentColor); background: color-mix(in srgb, #e5484d 10%, transparent); border: 1px solid color-mix(in srgb, #e5484d 40%, transparent); }

/* boutons : pastilles (2D / 3D, comparer…) */
.thr-catalogues .ct-vue, .thr-catalogues .ct-btn, .thr-catalogues .ct-comp-vider { font: inherit; font-size: .85rem; padding: .25rem .7rem; border-radius: 2rem;
  border: 1px solid var(--thr-trait); background: transparent; color: inherit; }
.thr-catalogues .ct-vue:hover, .thr-catalogues .ct-btn:hover, .thr-catalogues .ct-comp-vider:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-catalogues .ct-vue.on { background: var(--thr-accent, #FF8A3D); border-color: var(--thr-accent, #FF8A3D); color: #10151d; font-weight: 600; }
.thr-catalogues .ct-comp-x { color: inherit; opacity: .6; }

/* graphiques des résistances (courbes en fonction de la longueur) */
.thr-catalogues .ct-svg { fill: currentColor; }
.thr-catalogues .ct-svg .g { stroke: var(--thr-trait); }
.thr-catalogues .ct-svg .ny { stroke: #5E97E0; } .thr-catalogues .ct-leg .ny { color: color-mix(in srgb, #5E97E0 62%, currentColor); }
.thr-catalogues .ct-svg .nz { stroke: #36B9C8; } .thr-catalogues .ct-leg .nz { color: color-mix(in srgb, #36B9C8 55%, currentColor); }
.thr-catalogues .ct-svg .mb { stroke: var(--thr-accent, #FF8A3D); } .thr-catalogues .ct-leg .mb { color: var(--thr-accent, #FF8A3D); }
.thr-catalogues .ct-svg .lc { stroke: currentColor; opacity: .5; }
.thr-catalogues .ct-leg { color: inherit; }

/* vue 3D : cadre et barre de commandes aux couleurs du site */
.thr-catalogues .ct-3d { border: 1px solid var(--thr-trait); border-radius: .6rem; }
.thr-catalogues .v3d-barre { background: color-mix(in srgb, currentColor 4%, transparent); border-bottom: 1px solid var(--thr-trait); gap: .25rem; padding: .35rem .45rem; }
.thr-catalogues .v3d-barre-sup { background: color-mix(in srgb, var(--bg, #fff) 88%, transparent); }
.thr-catalogues .v3d-barre button { font: inherit; font-size: .78rem; padding: .15rem .5rem; border-radius: 2rem; border: 1px solid var(--thr-trait); background: transparent; color: inherit; }
.thr-catalogues .v3d-barre button:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-catalogues .v3d-barre button.on { background: var(--thr-accent, #FF8A3D); border-color: var(--thr-accent, #FF8A3D); color: #10151d; }
.thr-catalogues .v3d-sep { background: var(--thr-trait); }
.thr-catalogues .v3d-info, .thr-catalogues .v3d-aidebox { background: color-mix(in srgb, var(--bg, #fff) 94%, transparent); color: inherit; border: 1px solid var(--thr-trait); }
.thr-catalogues .v3d-info { color: #e5484d; }

/* liste déroulante des catalogues : téléphone seulement (1.24.27) */
.thr-catalogues .ct-onglets-choix { display: none; }
/* téléphone : une seule colonne, onglets défilants */
@media (max-width: 760px) {
  .thr-catalogues .ct-pro { grid-template-columns: minmax(0, 1fr); }
  .thr-catalogues .ct-calc { grid-column: auto; }
  .thr-catalogues .ct-liste { max-height: 40vh; overflow: auto; }
  .thr-catalogues .ct-onglets { flex-wrap: nowrap; overflow-x: auto; }
  /* 1.24.27 : liste déroulante à la place des onglets ; mode tableau sur une colonne (filtres au-dessus du tableau) */
  .thr-catalogues .ct-onglets-choix { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 1rem; height: 4.35rem; }
  .thr-catalogues .ct-onglets-choix label { font-size: .85rem; font-weight: 600; opacity: .85; height: 1.3rem; line-height: 1.3rem; }
  .thr-catalogues .ct-onglets-choix select { width: 100%; font-size: 1rem; padding: .55rem .7rem; height: 2.75rem; box-sizing: border-box; }
  .thr-catalogues .ct-onglets { display: none; }
  /* 1.25.13 : la liste déroulante est ajoutée par le script ; sa place est réservée avant (le catalogue ne descend plus de 84 px) */
  .thr-catalogues:not(:has(.ct-onglets-choix)) .ct-onglets { display: block; visibility: hidden; height: 4.35rem; margin: 0 0 1rem !important; overflow: hidden; }
  .thr-catalogues .ct-pro.mode-tableau { grid-template-columns: minmax(0, 1fr) !important; }
  .thr-catalogues .ct-pro.mode-tableau .ct-tableau { overflow-x: auto; }
  .thr-catalogues .te-subtab { white-space: nowrap; }
  .thr-catalogues .ct-fiche, .thr-catalogues .ct-calc { min-width: 0; overflow-x: auto; }
}
.thr-catalogues .ct-utiliser { display: none; }
/* dessin coté d'un profilé : section en couleur d'accent, comme dans l'outil Sections */
.thr-catalogues .ct-dessin svg .beton { fill: color-mix(in srgb, var(--thr-accent, #FF8A3D) 30%, transparent); stroke: var(--thr-accent, #FF8A3D); }

/* nuancier des garde-corps (sous la vue 3D) */
.thr-nuancier { border-top: 1px solid var(--thr-trait); padding: .7rem .8rem .6rem; }
.thr-nuancier__tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; margin-bottom: .5rem; }
.thr-nuancier__titre { font-weight: 700; color: var(--thr-accent, #FF8A3D); }
.thr-nuancier__choix { font-weight: 600; font-variant-numeric: tabular-nums; }
.thr-nuancier__barre { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.thr-nuancier__onglet, .thr-nuancier__galva { font: inherit; font-size: .85rem; padding: .25rem .7rem; border-radius: 2rem; border: 1px solid var(--thr-trait); background: transparent; color: inherit; cursor: pointer; }
.thr-nuancier__onglet.on, .thr-nuancier__galva.on { background: var(--thr-accent, #FF8A3D); border-color: var(--thr-accent, #FF8A3D); color: #10151d; font-weight: 600; }
.thr-nuancier__finition { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; }
.thr-nuancier__recherche { flex: 1 1 12rem; min-width: 10rem; }
.thr-nuancier__zone { max-height: 22rem; overflow: auto; padding-right: .2rem; }
.thr-nuancier__famille { margin: .6rem 0 .3rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.thr-nuancier__grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: .35rem; }
.thr-nuancier__teinte { display: grid; grid-template-columns: 1.6rem 1fr; grid-template-rows: auto auto; column-gap: .45rem; align-items: center; text-align: left;
  font: inherit; padding: .3rem .35rem; border-radius: .45rem; border: 1px solid var(--thr-trait); background: transparent; color: inherit; cursor: pointer; }
.thr-nuancier__teinte:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-nuancier__teinte.on { border-color: var(--thr-accent, #FF8A3D); box-shadow: 0 0 0 2px var(--thr-accent, #FF8A3D) inset; }
.thr-nuancier__pastille { grid-row: 1 / 3; width: 1.6rem; height: 1.6rem; border-radius: .3rem; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.thr-nuancier__code { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.thr-nuancier__nom { font-size: .72rem; opacity: .8; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr-nuancier__note, .thr-nuancier__avert { font-size: .8rem; opacity: .75; margin: .2rem 0 .5rem; }
.thr-nuancier__avert { margin: .6rem 0 0; font-style: italic; }
.thr-catalogues .ct-hypotheses { font-size: .85em; opacity: .85; }
/* lien partageable du nuancier, passerelles vers les outils de RDM */
.thr-nuancier__lien { font: inherit; font-size: .8rem; padding: .2rem .65rem; border-radius: 2rem; border: 1px solid var(--thr-trait); background: transparent; color: inherit; cursor: pointer; }
.thr-nuancier__lien:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-cat-liens { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .3rem 0 .6rem; font-size: .88rem; }
.thr-cat-liens__lien { color: var(--thr-accent, #FF8A3D); text-decoration: none; font-weight: 600; }
.thr-cat-liens__lien:hover { text-decoration: underline; }

/* 1.24.14 (Apps v.001.187) : tableaux triables et pagination, bascule tableau / fiche, choix de teinte des vues 3D,
   onglets des aciers anciens, fiche des bétons, nuanciers : mêmes couleurs que le reste du catalogue */
.thr-catalogues .ct-modes { display: flex; gap: .35rem; margin-bottom: .6rem; }
.thr-catalogues .ct-mode, .thr-catalogues .btn-ghost, .thr-catalogues .cb-nav button { font: inherit; font-size: .85rem; padding: .25rem .7rem; border-radius: 2rem;
  border: 1px solid var(--thr-trait); background: transparent; color: inherit; cursor: pointer; }
.thr-catalogues .ct-mode:hover, .thr-catalogues .btn-ghost:hover, .thr-catalogues .cb-nav button:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-catalogues .ct-mode.on, .thr-catalogues .ct-mode.active { background: var(--thr-accent, #FF8A3D); border-color: var(--thr-accent, #FF8A3D); color: #10151d; font-weight: 600; }
.thr-catalogues .te-ttri-wrap { border: 1px solid var(--thr-trait); border-radius: .6rem; background: transparent; }
.thr-catalogues .te-ttri { color: inherit; font-variant-numeric: tabular-nums; }
.thr-catalogues .te-ttri th { background: color-mix(in srgb, currentColor 7%, var(--bg, #fff)); color: inherit; border-bottom: 1px solid var(--thr-trait); }
.thr-catalogues .te-ttri th:hover { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 14%, var(--bg, #fff)); }
.thr-catalogues .te-ttri th.on, .thr-catalogues .te-ttri th.on .tri { color: var(--thr-accent, #FF8A3D); }
.thr-catalogues .te-ttri th .u, .thr-catalogues .te-ttri th .tri { color: inherit; opacity: .85; }   /* 1.25.11 : contraste (A21) */
.thr-catalogues .te-ttri td { border-bottom: 1px solid color-mix(in srgb, var(--thr-trait) 60%, transparent); color: inherit; }
.thr-catalogues .te-ttri tbody tr:nth-child(even) td { background: color-mix(in srgb, currentColor 3%, transparent); }
.thr-catalogues .te-ttri tbody tr:hover td { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 10%, transparent); }
.thr-catalogues .te-ttri tbody tr.on td { background: color-mix(in srgb, var(--thr-accent, #FF8A3D) 22%, transparent); }
.thr-catalogues .te-ttri td.fort { color: inherit; }
.thr-catalogues .te-ttri .nd { color: inherit; opacity: .35; }
.thr-catalogues .te-pag { color: inherit; }
.thr-catalogues .te-pag-b { border: 1px solid var(--thr-trait); background: transparent; color: inherit; border-radius: 2rem; }
.thr-catalogues .te-pag-b.on { background: var(--thr-accent, #FF8A3D); border-color: var(--thr-accent, #FF8A3D); color: #10151d; }
.thr-catalogues .v3d-teinte { font-size: .78rem; padding: .1rem .35rem; max-width: 14rem; }
.thr-catalogues .ca-pas { background: transparent !important; border-color: var(--thr-trait) !important; }
.thr-catalogues .ct-tab th[style], .thr-catalogues .ct-tab td[style] { color: inherit; }

/* 1.25.11 (A21) : focus visible sur le tableau défilant et le cadre de la vue 3D */
.thr-catalogues .te-ttri-wrap:focus-visible, .thr-catalogues .v3d:focus-visible { outline: 2px solid var(--thr-accent, #FF8A3D); outline-offset: 2px; }

/* 1.25.21 : fiche de droite (caractéristiques, composants, calculs) déplacée sous la vue : dessins et 3D sur toute la largeur
   restante ; la fiche se répartit sur deux colonnes quand la place le permet. Téléphone : inchangé (une colonne). */
@media (min-width: 761px) {
  .thr-catalogues .ct-pro { grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); }
  .thr-catalogues .ct-pro > .ct-choix { grid-row: span 2; }
  .thr-catalogues .ct-pro > .ct-calc { grid-column: 2; }
  .thr-catalogues .ct-pro > .ct-calc:empty { display: none; }
}
@media (min-width: 1100px) {
  .thr-catalogues .ct-pro > .ct-calc { columns: 2 22rem; column-gap: 1.75rem; }
  .thr-catalogues .ct-pro > .ct-calc > * { break-inside: avoid; }
  .thr-catalogues .ct-pro > .ct-calc > .ct-tab-t { break-after: avoid; }
}
.thr-catalogues .v3d-barre button[data-a="deplacer"] { white-space: nowrap; }

/* 1.25.31 - Nuanciers : pastilles cliquables (agrandissement) et fenêtre « fond noir / fond blanc » (catalogues-nuancier.js) */
#catalogues .ca-pas[data-thr-teinte] { cursor: zoom-in; transition: transform .12s ease, box-shadow .12s ease; }
#catalogues .ca-pas[data-thr-teinte]:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
#catalogues .ca-pas[data-thr-teinte]:focus-visible { outline: 2px solid var(--thr-accent, #FF8A3D); outline-offset: 2px; }
html.thr-teinte-ouverte { overflow: hidden; }
dialog.thr-teinte { width: min(1100px, 94vw); max-width: none; max-height: 94vh; max-height: 94dvh; margin: auto; padding: 0; border: 0;
  border-radius: 12px; overflow: hidden; background: #1F2430; color: #E8EDF4; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
dialog.thr-teinte::backdrop { background: rgba(8, 12, 20, .78); }
.thr-teinte__tete { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem; padding: .75rem 3.5rem .75rem 1.25rem; position: relative; }
.thr-teinte__titre { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.thr-teinte__titre b { font-variant-numeric: tabular-nums; margin-right: .35rem; }
.thr-teinte__rang { font-size: .8125rem; opacity: .7; font-variant-numeric: tabular-nums; }
.thr-teinte__fermer { position: absolute; top: .5rem; right: .6rem; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%;
  background: transparent; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.thr-teinte__fermer:hover, .thr-teinte__fermer:focus-visible { background: rgba(255, 255, 255, .12); }
.thr-teinte__vues { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: min(62vh, 520px); touch-action: pan-y; user-select: none; }
.thr-teinte__fond { position: relative; display: flex; align-items: center; justify-content: center; }
html:root .thr-teinte__fond--noir { background: #000000; color: #FFFFFF; }
html:root .thr-teinte__fond--blanc { background: #FFFFFF; color: #111111; }
.thr-teinte__aplat { width: 64%; height: 58%; border-radius: 3px; transition: background-color .18s ease; }
.thr-teinte__legende { position: absolute; left: 0; right: 0; bottom: .8rem; text-align: center; font-size: .8125rem; letter-spacing: .02em; }
.thr-teinte__fond--noir .thr-teinte__legende { color: rgba(255, 255, 255, .62); }
.thr-teinte__fond--blanc .thr-teinte__legende { color: rgba(0, 0, 0, .58); }
.thr-teinte__nav { position: absolute; top: 50%; width: 2.9rem; height: 2.9rem; margin-top: -1.45rem; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; background: rgba(110, 118, 130, .55); color: #FFFFFF; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3); backdrop-filter: blur(2px); transition: background .12s ease, transform .12s ease; }
.thr-teinte__nav svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.thr-teinte__nav:hover, .thr-teinte__nav:focus-visible { background: rgba(80, 88, 100, .85); transform: scale(1.06); }
.thr-teinte__nav:focus-visible { outline: 2px solid var(--thr-accent, #FF8A3D); outline-offset: 2px; }
.thr-teinte__nav--prec { left: .9rem; }
.thr-teinte__nav--suiv { right: .9rem; }
.thr-teinte__nav[hidden] { display: none; }
.thr-teinte__pied { margin: 0; padding: .6rem 1.25rem .75rem; font-size: .78rem; opacity: .75; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
  dialog.thr-teinte { width: 100vw; max-height: 100dvh; border-radius: 0; }
  .thr-teinte__vues { height: 56vh; }
  .thr-teinte__aplat { width: 72%; height: 50%; }
  .thr-teinte__nav { width: 2.5rem; height: 2.5rem; margin-top: -1.25rem; }
  .thr-teinte__nav--prec { left: .4rem; }
  .thr-teinte__nav--suiv { right: .4rem; }
}
@media (prefers-reduced-motion: reduce) { .thr-teinte__aplat, #catalogues .ca-pas[data-thr-teinte] { transition: none; } }
