/* ==========================================================================
   Outils rangés par univers : page Outils (recherche, barre et tuiles des univers, cartes compactes),
   pages d'univers (/outils/<univers>/) et, sur la page d'un outil, « étape suivante » et « Vos questions ».
   ========================================================================== */
:root { --ot-bar-h: 3.4rem; }

/* ---------- page Outils : en-tête et recherche ---------- */
.ot-hero { padding-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.ot-hero h1 { max-width: 18em; }
.ot-hero .phero-points { margin-top: 1rem; }
.ot-find { position: relative; max-width: 40rem; margin-top: 1.4rem; }
.ot-find .i { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); width: 1.25rem; height: 1.25rem; color: var(--muted); pointer-events: none; }
.ot-find .input { width: 100%; min-height: 3.6rem; padding: .9rem 3.2rem .9rem 3.2rem; font-size: 1.05rem; border-radius: 999px; background: var(--field); border: 1.5px solid var(--line-2); box-shadow: 0 10px 40px -18px rgba(0, 0, 0, .8); }
.ot-find .input:focus { border-color: var(--orange-2); outline: none; box-shadow: 0 0 0 4px var(--orange-soft); }
.ot-kbd { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); padding: .1rem .5rem; border: 1px solid var(--line-2); border-radius: 6px; font: 600 .8rem var(--ff-mono, monospace); color: var(--muted); }
.ot-find .input:focus ~ .ot-kbd, .ot-find .input:not(:placeholder-shown) ~ .ot-kbd { display: none; }
.ot-status { min-height: 1.3em; margin: .6rem 0 0 1.2rem; font-size: .9rem; color: var(--ink-3); }

/* ---------- barre des univers (collante) ---------- */
.ot-bar { position: sticky; top: var(--hdr-h); z-index: 30; margin: 0 calc(-1 * var(--gut)) 1.4rem; padding: .45rem var(--gut); background: rgba(7, 9, 18, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.ot-bar-in { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.ot-bar-in::-webkit-scrollbar { display: none; }
.ot-bar a { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font: 600 .88rem var(--ff); white-space: nowrap; scroll-snap-align: start; transition: background .15s, border-color .15s, color .15s; }
.ot-bar a .i { width: 1rem; height: 1rem; color: var(--muted); }
.ot-bar a:hover { border-color: var(--line-2); background: var(--paper-2); color: var(--ink); }
.ot-bar a[aria-current] { background: var(--ink); color: var(--night); border-color: var(--ink); }
.ot-bar a[aria-current] .i { color: var(--orange); }

/* ---------- blocs ---------- */
.ot-block { scroll-margin-top: calc(var(--hdr-h) + var(--ot-bar-h) + 1rem); }
.ot-block + .ot-block { margin-top: clamp(2.2rem, 4vw, 3.2rem); }
.ot-block[hidden], .oc[hidden], .ot-extra[hidden], .ot-bar[hidden] { display: none; }
.ot-h { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 0 0 1rem; letter-spacing: -.02em; }

/* tuiles des univers : la porte d'entrée */
.ot-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .8rem; }
.ot-tile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic nom" "ic n" "b b"; column-gap: .8rem; row-gap: .15rem; padding: 1rem 1.1rem; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; transition: transform .18s ease, border-color .18s, background .18s; }
.ot-tile:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--deep-2); }
.ot-tile:focus-visible { outline: 2px solid var(--orange-2); outline-offset: 2px; }
.ot-tile-ic { grid-area: ic; width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; background: var(--orange-soft); color: #ff9a6f; }
.ot-tile-ic .i { width: 1.25rem; height: 1.25rem; }
.ot-tile strong { grid-area: nom; align-self: end; font: 700 1rem/1.2 var(--ff-head); }
.ot-n { grid-area: n; font-size: .8rem; color: var(--blue-2); font-weight: 600; }
.ot-b { grid-area: b; margin-top: .55rem; font-size: .86rem; line-height: 1.45; color: var(--muted); }

/* section d'un univers */
.ot-sec-h { display: flex; align-items: flex-start; gap: .9rem; margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.ot-sec-h > div { flex: 1; min-width: 0; }
.ot-sec-h h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin: 0 0 .2rem; letter-spacing: -.02em; }
.ot-sec-h p { margin: 0; color: var(--muted); font-size: .94rem; max-width: 46rem; }
.ot-sec-ic { flex: none; width: 2.8rem; height: 2.8rem; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.ot-sec-ic .i { width: 1.35rem; height: 1.35rem; }
#u-top .ot-sec-ic { background: var(--orange-soft); color: #ff9a6f; }
.ot-count { display: inline-block; vertical-align: middle; margin-left: .3rem; padding: .1rem .5rem; border-radius: 999px; background: var(--paper-3); font: 600 .78rem var(--ff); color: var(--ink-3); letter-spacing: 0; }
.ot-more { flex: none; align-self: center; display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none; font: 600 .86rem var(--ff); white-space: nowrap; }
.ot-more:hover { border-color: var(--ink); color: var(--ink); }
.ot-more .i { width: .95rem; height: .95rem; }

/* cartes compactes d'outils */
.ot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: .6rem; }
.oc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; padding: .8rem .9rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(16, 20, 38, .55); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.oc:hover { border-color: var(--line-2); background: var(--deep-2); transform: translateY(-1px); }
.oc:focus-visible { outline: 2px solid var(--orange-2); outline-offset: 2px; }
.oc-ic { width: 2.2rem; height: 2.2rem; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--blue-2); }
.oc-ic .i { width: 1.1rem; height: 1.1rem; }
.oc-t { display: grid; gap: .15rem; min-width: 0; }
.oc-t strong { font: 700 .97rem/1.25 var(--ff-head); }
.oc-t span { font-size: .84rem; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ot-none { margin: 1rem 0 2rem; padding: 1.2rem 1.3rem; border: 1px dashed var(--line-2); border-radius: var(--r-m); }
.ot-none p { margin: 0; color: var(--ink-3); }
.ot-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2.4rem, 5vw, 3.6rem); }
.ot-extra .tile-sim { margin: 0; }
/* ancienne page à outil intégré (outils.html#<outil>) : n'apparaît que si un outil s'y ouvre */
.ot-legacy:has(#tool-stage[hidden]) { display: none; }
.page-tools .tools-wrap { padding-top: 0; }

/* ---------- page d'un outil : étape suivante ---------- */
.nx-sec { padding-top: clamp(1rem, 2vw, 1.6rem); }
.nx-sec h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin: 0 0 1rem; }
.nx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: .8rem; }
.nx-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border-radius: var(--r-m); border: 1px solid var(--line-2); background: linear-gradient(135deg, rgba(255, 90, 31, .09), rgba(58, 72, 246, .07)), var(--card); color: var(--ink); text-decoration: none; transition: transform .18s ease, border-color .18s; }
.nx-card:hover { transform: translateY(-2px); border-color: var(--orange-2); }
.nx-card:focus-visible { outline: 2px solid var(--orange-2); outline-offset: 2px; }
.nx-card .icon-tile { margin: 0; width: 2.6rem; height: 2.6rem; }
.nx-txt { display: grid; gap: .2rem; min-width: 0; }
.nx-txt strong { font: 700 1.02rem/1.25 var(--ff-head); }
.nx-txt span { font-size: .85rem; line-height: 1.4; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nx-go { width: 1.1rem; height: 1.1rem; color: var(--orange-2); transition: transform .18s; }
.nx-card:hover .nx-go { transform: translateX(3px); }

/* ---------- page d'un outil : vos questions ---------- */
.vq-sec h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
.vq-som { margin: 1rem 0 1.6rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); }
.vq-som summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .9rem 1.1rem; font: 600 1rem var(--ff-head); }
.vq-som summary::-webkit-details-marker { display: none; }
.vq-som summary .pm { margin-left: auto; transition: transform .2s; display: grid; }
.vq-som[open] summary .pm { transform: rotate(180deg); }
.vq-som summary .i { width: 1.1rem; height: 1.1rem; color: var(--blue-2); }
.vq-som ol { margin: 0; padding: 0 1.2rem 1rem 2.6rem; display: grid; gap: .35rem; font-size: .92rem; columns: 1; }
.vq-som a { color: var(--ink-3); } .vq-som a:hover { color: var(--ink); }
.vq-list { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.vq h3, .vq p { overflow-wrap: anywhere; }
.vq { padding: 1.1rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--hdr-h) + 1rem); }
.vq h3 { font-size: clamp(1.02rem, 1.7vw, 1.15rem); line-height: 1.35; margin: 0 0 .45rem; }
.vq p { margin: 0; color: var(--ink-3); line-height: 1.65; }
.vq-ancre { margin-left: .3rem; color: var(--muted-2); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; }
.vq:hover .vq-ancre, .vq-ancre:focus-visible { opacity: 1; }
.vq:target { background: linear-gradient(90deg, var(--orange-soft), transparent 70%); border-radius: 10px; padding-left: .8rem; padding-right: .8rem; }

/* ---------- page d'un univers ---------- */
.un-jump { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
#un-outils, #un-guides { scroll-margin-top: calc(var(--hdr-h) + 1rem); }
.un-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.un-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem 1.6rem; margin-top: 1rem; }
.un-g h3 { font-size: 1.02rem; margin: 0 0 .4rem; }
.un-g h3 a { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); text-decoration: none; }
.un-g h3 a:hover { color: var(--orange-2); }
.un-g h3 .i { width: 1.05rem; height: 1.05rem; color: var(--blue-2); }
.un-g ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .9rem; }
.un-g a { color: var(--ink-3); } .un-g li a:hover { color: var(--ink); }

@media (max-width: 960px) {
  .ot-bar { top: calc(var(--hdr-h) - 12px); }
}
@media (max-width: 640px) {
  .ot-sec-h { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .8rem; row-gap: .6rem; }
  .ot-more { grid-column: 2; justify-self: start; }
  .ot-extra { grid-template-columns: 1fr; }
  .ot-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .ot-tile { grid-template-columns: 1fr; grid-template-areas: "ic" "nom" "n"; padding: .85rem; row-gap: .3rem; }
  .ot-tile .ot-b { display: none; }
  .ot-find .input { font-size: 1rem; }
  .ot-kbd { display: none; }
  .nx-card { grid-template-columns: auto minmax(0, 1fr); }
  .nx-go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ot-tile, .oc, .nx-card, .nx-go { transition: none; }
  .ot-tile:hover, .oc:hover, .nx-card:hover { transform: none; }
}

/* ---------- centre d'outils : chaque univers a sa couleur (définie dans tools.css), rangé en rayons ---------- */
.ot-bar-t { display: none; }
.ot-bar a b { font: 600 .72rem var(--ff); color: var(--muted); }
.ot-bar a[class*="uv-"] .i { color: var(--u); }
.ot-bar a[aria-current] b { color: inherit; opacity: .7; }
.ot-tile[class*="uv-"] .ot-tile-ic { background: color-mix(in srgb, var(--u) 18%, transparent); color: var(--u); }
.ot-tile[class*="uv-"]::before { content: ""; position: absolute; left: 1.1rem; right: 1.1rem; top: 0; height: 2px; border-radius: 2px; background: var(--u); opacity: .7; }
.ot-tile[class*="uv-"]:hover { border-color: color-mix(in srgb, var(--u) 50%, transparent); }
.ot-tile[class*="uv-"] .ot-n { color: var(--u2); }
.ot-sec[class*="uv-"] .ot-sec-ic { background: color-mix(in srgb, var(--u) 18%, transparent); color: var(--u); }
.ot-sec[class*="uv-"] .ot-sec-h { border-bottom-color: color-mix(in srgb, var(--u) 35%, transparent); }
.ot-sec[class*="uv-"] .oc-ic { color: var(--u); background: color-mix(in srgb, var(--u) 11%, transparent); }
.ot-sec[class*="uv-"] .oc:hover { border-color: color-mix(in srgb, var(--u) 45%, transparent); }
.ot-rays { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.ot-rays a { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font: 600 .82rem var(--ff); transition: border-color .15s, background .15s; }
.ot-rays a b { font-size: .72rem; color: var(--muted); }
.ot-rays a:hover { border-color: var(--u, var(--line-2)); background: color-mix(in srgb, var(--u, #fff) 10%, transparent); }
.ot-ray { scroll-margin-top: calc(var(--hdr-h) + var(--ot-bar-h, 3.5rem) + 1rem); }
.ot-ray + .ot-ray { margin-top: 1.5rem; }
.ot-ray[hidden] { display: none; }
.ot-ray-h { display: flex; align-items: center; gap: .55rem; margin: 0 0 .7rem; font: 700 1.02rem var(--ff-head); letter-spacing: -.01em; }
.ot-ray-h::before { content: ""; width: .7rem; height: .7rem; border-radius: 3px; background: var(--u, var(--orange)); flex: none; }
.ot-ray-h span { font: 600 .76rem var(--ff); color: var(--muted); }
.oc-plus { display: none; }
.ot-ray.is-open .oc-plus, .ot-cherche .oc-plus { display: grid; }
.ot-cherche .oc-plus[hidden] { display: none; }
.ot-voir { display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem; padding: .5rem .95rem; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--u, #fff) 55%, transparent); background: none; color: var(--ink-2); font: 600 .86rem var(--ff); cursor: pointer; }
.ot-voir:hover { background: color-mix(in srgb, var(--u, #fff) 10%, transparent); color: var(--ink); }
.ot-voir .i { width: .95rem; height: .95rem; transition: transform .2s; }
.ot-ray.is-open .ot-voir .i { transform: rotate(180deg); }
.ot-voir[hidden], .ot-rays[hidden] { display: none; }

/* ordinateur : menu des univers en colonne fixe à gauche, comme un vrai centre d'outils */
@media (min-width: 1100px) {
  .ot-centre { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.4rem; align-items: start; }
  .ot-centre .ot-bar { top: calc(var(--hdr-h) + 1rem); margin: 0; padding: .9rem .6rem; border: 1px solid var(--line); border-radius: var(--r-m); background: rgba(12, 15, 30, .7); max-height: calc(100vh - var(--hdr-h) - 2rem); overflow: auto; scrollbar-width: thin; }
  .ot-bar-t { display: block; margin: 0 .5rem .5rem; font: 700 .72rem var(--ff); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .ot-centre .ot-bar-in { flex-direction: column; overflow: visible; gap: .15rem; }
  .ot-centre .ot-bar a { border: 0; border-radius: 10px; padding: .5rem .6rem; min-height: 0; white-space: normal; font-size: .88rem; }
  .ot-centre .ot-bar a span { flex: 1; }
  .ot-centre .ot-bar a[aria-current] { background: color-mix(in srgb, var(--u, #ff5a1f) 16%, transparent); color: var(--ink); }
  .ot-centre .ot-bar a[aria-current] .i { color: var(--u, var(--orange)); }
  .ot-centre .ot-block { scroll-margin-top: calc(var(--hdr-h) + 1.5rem); }
  .ot-centre .ot-ray { scroll-margin-top: calc(var(--hdr-h) + 1.5rem); }
  .ot-centre .ot-tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
.nw { white-space: nowrap; }
/* pastille « Pro » et vitrine des logiciels pro gratuits */
.oc-pro { display: inline-block; margin-left: .45rem; padding: .05rem .45rem; border-radius: 999px; background: linear-gradient(135deg, #ff5a1f, #ff9a6f); color: #10152a; font: 800 .66rem/1.5 var(--ff); font-style: normal; letter-spacing: .04em; text-transform: uppercase; vertical-align: .15em; }
.ot-pro-sec { padding: 1.2rem; border-radius: var(--r-m); border: 1px solid rgba(255, 90, 31, .35); background: radial-gradient(500px 220px at 100% 0%, rgba(255, 90, 31, .14), transparent 70%), rgba(16, 20, 38, .5); }
.ot-pro-sec .ot-sec-ic { background: var(--orange-soft); color: #ff9a6f; }
