/* ==================== MODULE OUTILS (Louise) ====================
   Styles de l'onglet Outils — generateurs de livrables.
   Responsable : Louise Lachavanne
   ================================================================ */

.outils-wrap { padding: 1.5rem 2rem; max-width: 1400px; margin: 0 auto; }

/* Bandeau d'etat du serveur local */
.outils-etat {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.7rem 1rem; border-radius: var(--radius, 8px);
    margin-bottom: 1.2rem; font-size: 0.85rem; border: 1px solid var(--border);
}
.outils-etat.ok    { background: rgba(34,197,94,0.08);  border-color: rgba(34,197,94,0.35); }
.outils-etat.ko    { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.4); }
.outils-etat .pastille { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.outils-etat.ok .pastille { background: var(--success, #22c55e); }
.outils-etat.ko .pastille { background: var(--warning, #fbbf24); }

/* Barre de selection d'operation */
.outils-opbar {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.25rem; margin-bottom: 1.25rem;
    background: rgba(96,165,250,0.06); border: 1px solid rgba(96,165,250,0.2);
    border-left: 4px solid var(--primary); border-radius: var(--radius, 8px);
}
.outils-opbar label { font-size: 1.05rem; font-weight: 700; color: var(--primary-light, #93c5fd); white-space: nowrap; }
.outils-opbar select {
    flex: 1; min-width: 260px; font-size: 1rem; padding: 0.6rem 0.9rem;
    background: var(--bg-elevated, #262a3b); color: var(--text); font-weight: 500;
    border: 1.5px solid rgba(96,165,250,0.35); border-radius: 8px; cursor: pointer; outline: none;
}

/* Grille de cartes */
.outils-groupe-titre {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); font-weight: 700; margin: 1.5rem 0 0.6rem;
}
.outils-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.9rem; }

.outil-carte {
    background: var(--card-bg, #1e2130); border: 1px solid var(--border);
    border-top: 3px solid var(--secondary, #d4a843);
    border-radius: var(--radius, 8px); padding: 1rem 1.1rem;
    display: flex; flex-direction: column; gap: 0.55rem;
}
.outil-carte.indispo { opacity: 0.5; border-top-color: var(--text-muted); }
.outil-titre { font-weight: 700; font-size: 0.98rem; color: var(--text); margin: 0; }
.outil-desc  { font-size: 0.79rem; color: var(--text-muted); line-height: 1.45; flex: 1; margin: 0; }
.outil-meta  { font-size: 0.72rem; color: var(--text-light, #8b8fa3); }
.outil-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.25rem; }

.outil-btn {
    border: none; border-radius: 6px; padding: 0.5rem 0.9rem;
    font-size: 0.83rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.outil-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.outil-btn.simuler  { background: var(--bg-elevated, #262a3b); color: var(--text); border: 1px solid var(--border); }
.outil-btn.simuler:hover:not(:disabled)  { border-color: var(--secondary, #d4a843); color: var(--secondary, #d4a843); }
.outil-btn.lancer   { background: var(--primary, #3b82f6); color: #fff; }
.outil-btn.lancer:hover:not(:disabled)   { filter: brightness(1.12); }

/* Console d'execution */
.outils-console {
    margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius, 8px);
    background: var(--bg-elevated, #14161f); overflow: hidden;
}
.outils-console-tete {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.85rem;
}
.outils-console-tete .titre { flex: 1; font-weight: 600; }
.outils-console-tete .etapes { display: flex; gap: 0.3rem; }
.outils-console-corps {
    max-height: 340px; overflow-y: auto; padding: 0.7rem 1rem;
    font-family: Consolas, "Courier New", monospace; font-size: 0.76rem;
    line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.outils-console-corps .l-etape { color: var(--secondary, #d4a843); font-weight: 700; margin-top: 0.5rem; }
.outils-console-corps .l-err   { color: var(--danger, #ef4444); }
.outils-console-corps .l-ok    { color: var(--success, #22c55e); font-weight: 600; }
.outils-console-corps .l-fin   { color: var(--success, #22c55e); font-weight: 700; margin-top: 0.5rem; }

.outils-spin {
    display: inline-block; width: 13px; height: 13px; flex-shrink: 0;
    border: 2px solid var(--border); border-top-color: var(--secondary, #d4a843);
    border-radius: 50%; animation: outilsSpin 0.6s linear infinite;
}
@keyframes outilsSpin { to { transform: rotate(360deg); } }
