/* Styles de la rubrique Plans de vaisseaux — assistant de création :
   silhouette projetée, capacités du plan, fiche de zoom d'un composant.
   Palette et rayons viennent de design-system.css. */

/* ═══ Silhouette du vaisseau dans la projection ═══ */
.bp-ship-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 156px;
    padding: var(--space-3);
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: var(--radius-md);
    background:
        radial-gradient(60% 70% at 50% 45%, rgba(0, 229, 255, 0.10), transparent 70%),
        rgba(255, 255, 255, 0.02);
}
/* La taille de l'image suit le gabarit : la transition rend le passage d'une
   taille à l'autre visible quand on ajoute ou retire des composants. */
.bp-ship-figure .game-icon {
    transition: width 0.35s ease, height 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.35));
}
.bp-ship-figure--empty .game-icon {
    opacity: 0.35;
    filter: grayscale(1);
}
.bp-ship-figure-caption {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-accent-cyan);
}
.bp-ship-figure--empty .bp-ship-figure-caption {
    color: var(--color-text-muted);
}

/* ═══ Capacités du plan ═══ */
.bp-cap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: var(--space-2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
}
.bp-cap-title {
    margin-bottom: 2px;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.bp-cap-title--sub {
    margin-top: 6px;
}
.bp-cap-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.bp-cap-row-label {
    color: var(--color-text-muted);
}
.bp-cap-row-value {
    font-family: var(--font-mono);
    font-weight: 700;
    text-align: right;
    color: var(--color-text-bright);
}
.bp-cap-row-value--muted {
    font-weight: 400;
    color: var(--color-text-muted);
}
.bp-cap-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.74rem;
}
.bp-cap-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--color-accent-purple);
}
.bp-cap-item-value {
    font-family: var(--font-mono);
    white-space: nowrap;
    color: var(--color-text-primary);
}

/* ═══ Zoom sur un composant ═══ */
/* L'icône du catalogue est un bouton : la loupe en coin annonce le zoom. */
.bp-comp-zoom {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    padding: 2px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-accent-cyan);
    cursor: zoom-in;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.bp-comp-zoom:hover,
.bp-comp-zoom:focus-visible {
    border-color: rgba(0, 229, 255, 0.4);
    background: rgba(0, 229, 255, 0.08);
    outline: none;
}
.bp-comp-zoom-glyph {
    position: absolute;
    right: -4px;
    bottom: -4px;
    padding: 1px;
    border-radius: 50%;
    background: var(--color-bg-primary);
}
/* Ligne de la composition : le nom ouvre la fiche. */
.bp-comp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.bp-comp-link--engine {
    color: var(--color-accent-green);
}
.bp-comp-link:hover:not(:disabled),
.bp-comp-link:focus-visible {
    color: var(--color-accent-cyan);
    text-decoration: underline;
    outline: none;
}
.bp-comp-link:disabled {
    cursor: default;
}
.bp-zoom {
    display: grid;
    grid-template-columns: 172px minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
}
.bp-zoom-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--space-4);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: var(--radius-md);
    background:
        radial-gradient(70% 70% at 50% 40%, rgba(0, 229, 255, 0.12), transparent 70%),
        rgba(255, 255, 255, 0.02);
}
.bp-zoom-figure .game-icon {
    filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.35));
}
.bp-zoom-code {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--color-text-muted);
}
.bp-zoom-type {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent-cyan);
}
.bp-zoom-qty {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent-green);
}
.bp-zoom-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
}
.bp-zoom-counter-value {
    min-width: 28px;
    font-family: var(--font-mono);
    font-weight: 700;
    text-align: center;
}
@media (max-width: 640px) {
    .bp-zoom {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ═══ Zoom sur la silhouette ═══ */
/* La figure de la projection est un bouton : mêmes styles, plus l'état
   survolé et la loupe en coin. */
button.bp-ship-figure {
    position: relative;
    width: 100%;
    font: inherit;
    color: inherit;
    cursor: zoom-in;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
button.bp-ship-figure:hover,
button.bp-ship-figure:focus-visible {
    border-color: rgba(0, 229, 255, 0.4);
    outline: none;
}
.bp-ship-figure-glyph {
    position: absolute;
    right: 8px;
    bottom: 8px;
    color: var(--color-accent-cyan);
    opacity: 0.6;
}
button.bp-ship-figure:hover .bp-ship-figure-glyph {
    opacity: 1;
}
.bp-ship-zoom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
}
.bp-ship-zoom-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.bp-ship-zoom-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: var(--space-4);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: var(--radius-md);
    background:
        radial-gradient(70% 70% at 50% 45%, rgba(0, 229, 255, 0.14), transparent 70%),
        rgba(255, 255, 255, 0.02);
}
.bp-ship-zoom-figure .game-icon {
    filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.4));
}
.bp-ship-zoom-figure--empty .game-icon {
    opacity: 0.35;
    filter: grayscale(1);
}
.bp-ship-zoom-facts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-size: 0.8rem;
}
.bp-ship-zoom-fact {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.bp-ship-zoom-fact dt {
    color: var(--color-text-muted);
}
.bp-ship-zoom-fact dd {
    margin: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    text-align: right;
    color: var(--color-text-bright);
}
.bp-ship-zoom-empty {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
/* Échelle des dix tailles : la ligne du plan est mise en avant. */
.bp-ship-ladder {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bp-ship-ladder-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}
.bp-ship-ladder-row .game-icon {
    flex-shrink: 0;
}
.bp-ship-ladder-row--current {
    border-color: rgba(0, 229, 255, 0.4);
    background: rgba(0, 229, 255, 0.08);
}
.bp-ship-ladder-text {
    min-width: 0;
    flex: 1 1 auto;
}
.bp-ship-ladder-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-bright);
}
.bp-ship-ladder-tag {
    margin-left: 4px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--color-accent-cyan);
}
.bp-ship-ladder-meta {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}
.bp-ship-ladder-badge {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.15);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent-cyan);
}
@media (max-width: 640px) {
    .bp-ship-zoom {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ═══ Composition (assistant et cadre « plan en cours ») ═══ */
.bp-composition {
    display: flex;
    flex-direction: column;
}
.bp-composition-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.75rem;
    line-height: 1.7;
}
.bp-composition-slots {
    font-family: var(--font-mono);
    white-space: nowrap;
    color: var(--color-text-muted);
}
.bp-composition-empty {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ═══ Cadre « plan en cours de conception » ═══ */
.plan-order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.plan-order-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.plan-order-section {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.78rem;
}
.plan-order-section-title {
    margin-bottom: 2px;
    font-weight: 700;
    color: var(--color-accent-cyan);
}
/* Le bloc capacités reprend le séparateur de la projection ; dans une
   section il n'a pas besoin du trait supérieur. */
.plan-order-section .bp-cap {
    padding-top: 0;
    border-top: 0;
}
.plan-order-card {
    width: 100%;
    padding: var(--space-5);
    border: 1px solid rgba(0, 229, 255, 0.25);
}
.plan-order-card--compact {
    padding: 14px;
}
.plan-order-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}
.plan-order-kicker {
    margin-bottom: 5px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent-cyan);
}
.plan-order-title {
    margin: 0;
    font-size: 1.3rem;
}
.plan-order-card--compact .plan-order-title {
    font-size: 1rem;
}
.plan-order-title-brand {
    font-weight: 400;
    color: var(--color-text-muted);
}
.plan-order-meta {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.plan-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.plan-order-stat {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.plan-order-stat-label {
    color: var(--color-text-muted);
}
.plan-order-stat-value {
    font-family: var(--font-mono);
    text-align: right;
    color: var(--color-text-primary);
}
.plan-order-stat-value--green { color: var(--color-accent-green); }
.plan-order-stat-value--red   { color: var(--color-accent-red); }
.plan-order-stat-value--amber { color: var(--color-accent-amber); }
.plan-order-stat-value--cyan  { color: var(--color-accent-cyan); }
.plan-order-goods {
    margin-top: 3px;
    padding-top: 7px;
    border-top: 1px solid var(--color-border);
}
.plan-order-goods-title {
    margin-bottom: 4px;
    color: var(--color-text-muted);
}
.plan-order-muted {
    color: var(--color-text-muted);
}
.plan-order-confirm-text {
    margin: 0;
}
/* Le titre de section suffit : le bloc capacités n'a pas à répéter le sien. */
.plan-order-section .bp-cap > .bp-cap-title:first-child {
    display: none;
}
