/* ===================================
    DevStudios — Pages Expertises (dsx-)
    Complète industry.css (tools/build-expertises.py)
====================================== */

/* ---------- Hero : illustration + logos ---------- */
.dsx-visual {
    position: relative;
    padding: 0 0 36px;
}
.dsx-visual__frame {
    margin: 0;
    border-radius: 28px;
    padding: 14px;
    background: linear-gradient(160deg, #FFFFFF 0%, var(--paper-2) 100%);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: rotate(-1.2deg);
    transition: transform 0.6s var(--dsi-ease);
}
.dsx-visual:hover .dsx-visual__frame { transform: rotate(0deg) translateY(-4px); }
.dsx-visual__frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
}
.dsx-visual__logos {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 10px;
    list-style: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(12, 7, 18, 0.35);
    white-space: nowrap;
}
.dsx-visual__logos .dsx-logo span:last-child { display: none; }
.dsx-visual__logos .dsx-logo {
    width: 46px;
    height: 46px;
    padding: 0;
    justify-content: center;
}
.dsx-visual__logos .dsx-logo--txt {
    width: auto;
    padding: 0 12px;
}
.dsx-visual__logos .dsx-logo--txt span:last-child { display: inline; }
.dsx-visual__logos .dsx-logo--txt .dsx-logo__mark { display: none; }

/* ---------- Logos ---------- */
.dsx-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dsx-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid var(--dsi-line);
    font-family: var(--alt-font);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s var(--dsi-ease);
}
.dsx-logo img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    transition: transform 0.35s var(--dsi-ease);
}
.dsx-logo:hover {
    border-color: rgba(228, 72, 97, 0.35);
    box-shadow: 0 12px 28px -12px rgba(25, 17, 54, 0.25);
    transform: translateY(-2px);
}
.dsx-logo:hover img { transform: scale(1.08); }
.dsx-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--brand-gradient);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 800;
}

/* ---------- Stack ---------- */
.dsx-stack-section {
    background:
        radial-gradient(ellipse 60% 50% at 100% 0%, rgba(228, 72, 97, 0.08), transparent 60%),
        #FFFFFF;
}
.dsx-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.dsx-stack__group {
    padding: 26px 26px 28px;
    border-radius: 22px;
    background: var(--paper);
    border: 1px solid rgba(25, 17, 54, 0.05);
}
.dsx-stack__group h3 {
    margin: 0 0 16px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coral);
}
.dsx-stack__note {
    margin-top: 22px !important;
    font-size: 0.8rem;
    color: var(--dsi-muted);
}

/* ---------- Modules / périmètre ---------- */
.dsx-modules {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.dsx-module {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 22px;
    border-radius: 20px;
    background: var(--paper);
    border: 1px solid transparent;
    transition: border-color 0.35s ease, background-color 0.35s ease, transform 0.45s var(--dsi-ease);
}
.dsx-module:hover {
    background: #FFFFFF;
    border-color: rgba(228, 72, 97, 0.25);
    transform: translateY(-4px);
}
.dsx-module h3 {
    margin: 0 0 6px;
    font-size: 1.02rem;
    font-weight: 700;
}
.dsx-module p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---------- Le détail du détail ---------- */
.dsx-detail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.dsx-detail__item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 24px 26px;
    border-radius: 22px;
    background: #FFFFFF;
    box-shadow: 0 10px 30px rgba(25, 17, 54, 0.05);
    overflow: hidden;
}
.dsx-detail__item::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--brand-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--dsi-ease);
}
.dsx-detail__item:hover::before { transform: scaleX(1); }
.dsx-detail__num {
    font-family: var(--alt-font);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--coral);
    margin-bottom: 10px;
}
.dsx-detail__item h3 {
    margin: 0 0 16px;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.3;
}
.dsx-detail__item .dsi-checks { margin-top: 0; }
.dsi-section:not(.dsi-section--paper) .dsx-detail__item {
    background: var(--paper);
    box-shadow: none;
}

/* ---------- Méthode (5 étapes) ---------- */
.dsx-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dsx-flow li { display: flex; flex-direction: column; }
.dsx-flow__out {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: auto 0 0;
    padding: 16px 0 0;
    list-style: none;
}
.dsx-flow__out li {
    padding: 3px 10px !important;
    border-radius: 999px;
    background: rgba(228, 72, 97, 0.1) !important;
    box-shadow: none !important;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--crimson);
}
.dsx-flow__out li::after { display: none; }
.dsx-flow__out li { counter-increment: none; }

/* ---------- Livrables / cas d'usage ---------- */
.dsx-deliv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dsx-deliv article { background: var(--paper); box-shadow: none; }
.dsx-cases { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 40px; }

@media (max-width: 1199px) {
    .dsx-detail, .dsx-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dsx-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dsx-flow li::after { display: none; }
}
@media (max-width: 991px) {
    .dsx-visual { max-width: 560px; margin: 0 auto; }
    .dsx-stack, .dsx-deliv, .dsx-cases { grid-template-columns: 1fr; }
    .dsx-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .dsx-detail, .dsx-modules, .dsx-flow { grid-template-columns: 1fr; }
    .dsx-visual__logos { gap: 4px; padding: 8px; }
    .dsx-visual__logos .dsx-logo { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    .dsx-visual__frame, .dsx-logo, .dsx-logo img, .dsx-module, .dsx-detail__item::before { transition: none; }
    .dsx-visual__frame { transform: none; }
}
