:root {
    --primary: #2980b9;
    --secondary: #27ae60;
    --danger: #e74c3c;
    --dark: #1e1e1e;
    --light: #f4f4f9;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--light);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Navigation */
nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

nav button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    background: #ddd;
}

nav button.active {
    background: var(--primary);
    color: white;
}

/* Pages */
.page {
    display: none;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page.active {
    display: block;
}

/* Formulaire & Inputs */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

label {
    font-weight: bold;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Boutons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin: 4px 4px 4px 0;
    font-weight: bold;
    transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }

.btn-green  { background: var(--secondary); color: white; }
.btn-blue   { background: var(--primary);   color: white; }
.btn-purple { background: #8e44ad;           color: white; }
.btn-orange { background: #e67e22;           color: white; }
.btn-danger { background: var(--danger);     color: white; }
.btn-grey   { background: #7f8c8d;           color: white; }

/* Menu déroulant générateur */
.dropdown-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin: 15px 0 5px;
    flex-wrap: wrap;
}

.dropdown-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 180px;
}

.dropdown-btn-group {
    flex: 0 0 auto;
}

select {
    padding: 10px 12px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: 'Segoe UI', sans-serif;
}

select:focus  { outline: none; border-color: var(--primary); }
select:disabled { background: #f5f5f5; color: #aaa; cursor: not-allowed; }

/* Ligne boutons Générer + ? */
.btn-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Pastille ? */
.help-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #2980b9;
    background: white;
    color: #2980b9;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.help-btn:hover:not(:disabled) {
    background: #2980b9;
    color: white;
}
.help-btn:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

/* Carte définition */
.info-card {
    background: #f0f7ff;
    border: 2px solid #a8cff0;
    border-radius: 10px;
    margin-top: 14px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2980b9;
    color: white;
    padding: 12px 16px;
}

.info-emoji {
    font-size: 26px;
    line-height: 1;
}

.info-card-titles {
    flex: 1;
}

.info-title {
    font-size: 16px;
    font-weight: bold;
}

.info-subtitle {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.info-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}
.info-close:hover { background: rgba(255,255,255,0.4); }

.info-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-section {
    background: white;
    border-radius: 6px;
    padding: 10px 13px;
    border-left: 4px solid #2980b9;
}

.info-section-label {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #2980b9;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

.info-example-text {
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #1e1e1e;
    background: #f5f5f5;
    padding: 8px 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    margin-top: 4px;
}

.info-tip-text {
    font-size: 13px;
    color: #c0392b;
    margin-top: 4px;
}
.dynamic-fields {
    background: #f0f7ff;
    border: 1px solid #c5dff8;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 12px;
    display: none;
}
.dynamic-fields.visible { display: block; }
.dynamic-fields label { color: #2980b9; }
.dynamic-fields input {
    border-color: #a8cff0;
    margin-bottom: 8px;
}
.dynamic-fields .hint {
    font-size: 12px;
    color: #888;
    margin-top: -4px;
    margin-bottom: 8px;
    font-style: italic;
}

/* Terminal Style */
.terminal-box {
    position: relative;
    margin-top: 20px;
}

.terminal {
    background: var(--dark);
    color: #00ff00;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    min-height: 100px;
    white-space: pre-wrap;
    font-size: 14px;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f39c12;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Barre de recherche */
.search-container {
    margin-bottom: 20px;
}

#errorSearch {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    box-sizing: border-box;
    resize: vertical;
    font-family: 'Segoe UI', sans-serif;
}

/* Carte d'erreur */
.error-card {
    border-left: 5px solid var(--danger);
    background: #fff5f5;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    display: none;
}

.error-card h3 {
    margin-top: 0;
    color: var(--danger);
}

.step {
    background: #eee;
    padding: 8px;
    border-radius: 4px;
    margin: 5px 0;
    font-family: monospace;
    border-left: 3px solid #333;
}

.no-result {
    color: #666;
    font-style: italic;
    display: none;
    margin-top: 15px;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.page-header h2 { margin: 0; }

/* ── LOG BADGE ───────────────────────────────────────────── */
.log-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── JOURNAL ─────────────────────────────────────────────── */
.log-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.log-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.log-empty {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px 14px;
}

.log-icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}

.log-content { flex: 1; }

.log-detail {
    font-size: 14px;
    color: #333;
}

.log-time {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

/* ── MES PROJETS ─────────────────────────────────────────── */
.projects-intro {
    background: #f0f7ff;
    border: 1px solid #c5dff8;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    color: #444;
    margin-bottom: 18px;
    line-height: 1.6;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.proj-empty {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 30px;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

.proj-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 14px 16px;
    gap: 14px;
    flex-wrap: wrap;
    transition: border-color 0.2s;
}

.proj-card:hover { border-color: #a8cff0; }

.proj-card-active {
    border-color: #27ae60;
    background: #f0fff5;
}

.proj-card-info { flex: 1; min-width: 180px; }

.proj-card-name {
    font-weight: bold;
    font-size: 16px;
    color: #222;
    margin-bottom: 3px;
}

.proj-card-name .active-dot { color: #27ae60; }

.proj-card-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.proj-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── EXPORT ──────────────────────────────────────────────── */
.export-section {
    border-top: 2px solid #eee;
    padding-top: 20px;
    margin-top: 10px;
}

.export-section h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.export-section p {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
}

/* ── ÉCRAN DE VERROUILLAGE ───────────────────────────────────── */
.lock-screen {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed #c5dff8;
    border-radius: 12px;
    background: #f0f7ff;
}

.lock-icon {
    font-size: 52px;
    margin-bottom: 10px;
}

.lock-title {
    font-size: 20px;
    font-weight: bold;
    color: #2980b9;
    margin-bottom: 6px;
}

.lock-subtitle {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

.lock-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.lock-input {
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #a8cff0;
    border-radius: 6px;
    width: 260px;
    outline: none;
    transition: border-color 0.2s;
}
.lock-input:focus { border-color: #2980b9; }

.lock-btn {
    padding: 10px 20px !important;
    font-size: 14px !important;
}

.lock-info {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    font-style: italic;
}

/* ── BOUTON CADENAS DANS LA NAV ──────────────────────────────── */
.nav-lock-btn {
    padding: 10px 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    background: #ddd;
    color: #555;
    font-size: 15px;
    transition: background 0.2s;
    margin-left: auto;
}
.nav-lock-btn:hover { background: #e74c3c; color: white; }

/* ── FORCE MOT DE PASSE ──────────────────────────────────────── */
.strength-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 4px;
}

.strength-track {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.35s ease, background-color 0.35s ease;
}

.strength-label {
    font-size: 13px;
    font-weight: bold;
    min-width: 80px;
    text-align: left;
    transition: color 0.3s;
}

/* ── AVERTISSEMENT MOT DE PASSE PERDU ────────────────────────── */
.lock-warning {
    background: #fff8e1;
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 auto 18px;
    max-width: 480px;
    text-align: left;
}

.lock-warning-title {
    font-weight: bold;
    color: #e67e22;
    font-size: 14px;
    margin-bottom: 8px;
}

.lock-warning-body {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

/* ── CHAMP MOT DE PASSE + ŒIL ────────────────────────────────── */
.lock-input-wrap {
    position: relative;
    width: 260px;
}

.lock-input-wrap .lock-input {
    width: 100%;
    padding-right: 40px;
    box-sizing: border-box;
}

.pwd-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.pwd-toggle:hover { opacity: 1; }

/* ── BADGE DÉCOMPTE AUTO-LOCK ─────────────────────────────────── */
.autolock-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.18);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 4px;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.nav-lock-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── TOGGLE STOCKAGE ─────────────────────────────────────────── */
.storage-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.storage-toggle-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Switch iOS style */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 28px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.toggle-switch input:checked + .toggle-slider           { background: #27ae60; }
.toggle-switch input:checked + .toggle-slider::before   { transform: translateX(24px); }

/* Label et badge */
.storage-toggle-label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transition: color 0.3s;
}

.storage-mode-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    background: #27ae60;
    letter-spacing: 0.05em;
    transition: background 0.3s;
}

.storage-info-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 15px;
    transition: border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.storage-info-btn:hover { border-color: #2980b9; background: #eaf4fb; }

/* Carte info stockage */
.storage-info-card {
    background: white;
    border: 2px solid #a8cff0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    animation: slideDown 0.2s ease;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

/* ── SAUVEGARDE PORTABLE ─────────────────────────────────────── */
.portable-section {
    border: 2px solid #a8cff0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.portable-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #1a5276, #2980b9);
    padding: 16px 20px;
    color: white;
}

.portable-icon { font-size: 32px; }

.portable-title {
    font-size: 17px;
    font-weight: bold;
}

.portable-ext {
    font-family: 'Consolas', monospace;
    background: rgba(255,255,255,0.2);
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 13px;
    margin-left: 6px;
}

.portable-subtitle {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 3px;
}

.portable-block {
    padding: 18px 20px;
    background: white;
}

.portable-block-title {
    font-weight: bold;
    font-size: 15px;
    color: #1a5276;
    margin-bottom: 8px;
}

.portable-block-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 14px;
    line-height: 1.6;
}

.portable-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 4px;
}

@media (max-width: 600px) {
    .portable-form { grid-template-columns: 1fr; }
}

.portable-field label {
    font-size: 13px;
    font-weight: bold;
    color: #444;
    display: block;
    margin-bottom: 6px;
}

.portable-warning {
    background: #fff8e1;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 12px;
    color: #7d6608;
    margin-top: 10px;
    line-height: 1.6;
}

.portable-divider {
    height: 2px;
    background: #eaf2f8;
    margin: 0 20px;
}

/* Zone de dépôt fichier */
.file-drop-zone {
    border: 2px dashed #a8cff0;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    background: #f0f7ff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #555;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: #2980b9;
    background: #dceefb;
    color: #1a5276;
}

.file-browse-link {
    color: #2980b9;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.import-file-name {
    margin-top: 8px;
    font-size: 13px;
    color: #27ae60;
    font-weight: bold;
    font-family: 'Consolas', monospace;
    padding: 6px 10px;
    background: #f0fff5;
    border-radius: 4px;
    border: 1px solid #a9dfbf;
}

.import-result {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.6;
}

.import-result.success {
    background: #f0fff5;
    border: 2px solid #27ae60;
    color: #1e8449;
}

.import-result.error {
    background: #fff5f5;
    border: 2px solid #e74c3c;
    color: #c0392b;
}

/* ── ONGLETS INTERNES DÉPANNAGE ──────────────────────────────── */
.trouble-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.trouble-tab {
    padding: 9px 18px;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #888;
    margin-bottom: -2px;
    transition: all 0.2s;
    border-radius: 4px 4px 0 0;
}

.trouble-tab:hover  { color: #2980b9; background: #eaf4fb; }
.trouble-tab.active { color: #2980b9; border-bottom-color: #2980b9; background: none; }

.trouble-panel        { display: none; }
.trouble-panel.active { display: block; }

/* ── INTRO VS CODE ───────────────────────────────────────────── */
.vscode-intro {
    background: #f0f3f4;
    border: 1px solid #d5d8dc;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}

.vscode-intro-title {
    font-weight: bold;
    font-size: 15px;
    color: #1a5276;
    margin-bottom: 8px;
}

.vscode-intro-body { line-height: 1.9; }

.vscode-path {
    display: block;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #555;
    background: #e8ecee;
    padding: 2px 8px;
    border-radius: 3px;
    margin: 3px 0;
}

/* ── COMMANDE D'OUVERTURE ────────────────────────────────────── */
.vscode-cmd-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #555;
}

.vscode-cmd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e1e1e;
    color: #00ff00;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 6px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.vscode-copy-btn {
    background: #f39c12;
    color: white;
    border: none;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
}

.vscode-os-btns {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.vscode-os-btn {
    padding: 5px 12px;
    border: 2px solid #ccc;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    transition: all 0.2s;
}
.vscode-os-btn:hover          { border-color: #2980b9; color: #2980b9; }
.vscode-os-btn.active         { background: #2980b9; color: white; border-color: #2980b9; }

/* ── RÉSULTATS ANALYSE ───────────────────────────────────────── */
.log-analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: bold;
    font-size: 15px;
    color: #1a5276;
}

.log-analysis-item {
    border: 2px solid #e74c3c;
    border-radius: 8px;
    margin-bottom: 14px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.log-analysis-item-header {
    background: #fdf2f2;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.log-analysis-item-header:hover { background: #fce4e4; }

.log-analysis-badge {
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.log-analysis-item-title {
    font-weight: bold;
    font-size: 14px;
    color: #c0392b;
    flex: 1;
}

.log-analysis-item-line {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
    font-family: 'Consolas', monospace;
}

.log-analysis-toggle {
    font-size: 12px;
    color: #aaa;
    flex-shrink: 0;
    margin-top: 2px;
}

.log-analysis-item-body {
    padding: 12px 14px;
    background: white;
    border-top: 1px solid #fce4e4;
}

.log-analysis-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.log-analysis-context {
    background: #1e1e1e;
    color: #e0e0e0;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 120px;
    overflow-y: auto;
}

.log-analysis-context .highlight {
    color: #ff6b6b;
    font-weight: bold;
}

.log-occurrences {
    font-size: 11px;
    color: #e67e22;
    font-weight: bold;
    margin-bottom: 8px;
}

/* ── TABS DÉPANNAGE ──────────────────────────────────────────── */
.trouble-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.trouble-tab {
    padding: 9px 18px;
    border: 2px solid #ddd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: #f5f5f5;
    color: #666;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    bottom: -2px;
}

.trouble-tab:hover { border-color: #2980b9; color: #2980b9; background: #eaf4fb; }
.trouble-tab.active { background: white; color: #2980b9; border-color: #2980b9; border-bottom-color: white; }

.trouble-panel { display: none; }
.trouble-panel.active { display: block; }

.trouble-desc { color: #555; font-size: 14px; margin-bottom: 12px; margin-top: 0; }

/* ── CHEMINS VS CODE ─────────────────────────────────────────── */
.vslog-paths {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.vslog-path-title {
    font-weight: bold;
    font-size: 13px;
    color: #444;
    margin-bottom: 10px;
}

.vslog-path-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 13px;
}

.vslog-os {
    min-width: 90px;
    font-weight: bold;
    color: #555;
}

.vslog-path-row code {
    background: #1e1e1e;
    color: #00ff00;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.vslog-path-note {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* ── STATUT & RÉSULTATS ──────────────────────────────────────── */
.vslog-status {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

.vslog-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.vslog-results-title {
    font-weight: bold;
    font-size: 15px;
    color: #1a5276;
}

.vslog-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Carte de résultat pour chaque erreur trouvée dans le log */
.vslog-match-card {
    border: 2px solid #e8d5b7;
    border-radius: 8px;
    overflow: hidden;
}

.vslog-match-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: #fef9f0;
    padding: 12px 14px;
    flex-wrap: wrap;
}

.vslog-match-title {
    font-weight: bold;
    font-size: 14px;
    color: #784212;
}

.vslog-match-count {
    background: #e67e22;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.vslog-match-body { padding: 12px 14px; background: white; }

.vslog-match-desc { font-size: 13px; color: #555; margin-bottom: 10px; }

.vslog-match-lines {
    background: #1e1e1e;
    color: #ff8c69;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    padding: 8px 12px;
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-all;
}

.vslog-match-steps { margin-top: 8px; }
.vslog-match-steps .step { font-size: 12px; padding: 6px 8px; }

.vslog-no-result {
    background: #f0fff5;
    border: 2px solid #27ae60;
    border-radius: 8px;
    padding: 16px;
    color: #1e8449;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    margin-top: 14px;
}

/* ══════════════════════════════════════════════════════════════════
   UPLOAD WIZARD - Génération de scripts d'upload GitLab
   ══════════════════════════════════════════════════════════════════ */

.upload-wizard-section {
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.15);
}

.upload-wizard {
    margin-top: 20px;
}

.upload-step {
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.upload-step:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.upload-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 14px 18px;
    color: #fff;
}

.upload-step-number {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.upload-step-title {
    font-size: 15px;
    font-weight: bold;
}

.upload-step-content {
    padding: 18px;
}

.upload-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.upload-field-row:last-child {
    margin-bottom: 0;
}

.upload-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-field label {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.upload-input {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.upload-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.upload-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
}

.upload-folder-selector {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.upload-folder-hint {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    max-width: 500px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.upload-file-list {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #f0f3f4;
    border: 2px solid #d5d8dc;
    border-radius: 6px;
    padding: 12px;
    display: none;
}

.upload-file-list.has-files {
    display: block;
}

.upload-file-item {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #d5d8dc;
    border-radius: 4px;
    margin-bottom: 6px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-file-item:last-child {
    margin-bottom: 0;
}

.upload-file-icon {
    font-size: 16px;
}

.upload-file-stats {
    margin-top: 12px;
    padding: 10px 14px;
    background: #eaf4fb;
    border: 2px solid #a8cff0;
    border-radius: 6px;
    font-size: 13px;
    color: #1a5276;
    font-weight: bold;
}

.upload-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.upload-instructions {
    background: #f0f3f4;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.upload-instruction-block {
    margin-bottom: 18px;
}

.upload-instruction-block:last-child {
    margin-bottom: 0;
}

.upload-instruction-title {
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-instruction-block ol {
    margin: 0;
    padding-left: 24px;
}

.upload-instruction-block li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #555;
}

.upload-instruction-block code {
    background: #34495e;
    color: #ecf0f1;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    white-space: nowrap;
}

.upload-preview {
    background: #2c3e50;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.upload-preview-title {
    color: #ecf0f1;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 12px;
}

.upload-preview-code {
    background: #34495e;
    color: #2ecc71;
    padding: 14px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .upload-field-row {
        grid-template-columns: 1fr;
    }
    
    .upload-actions {
        flex-direction: column;
    }
    
    .upload-actions button {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════
   PHP CONVERTER
═══════════════════════════════════════════════ */

/* Popup */
.php-popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.78);
    z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.php-popup {
    background: #1e1e2e; border: 1px solid #3a3a5c; border-radius: 12px;
    width: 100%; max-width: 760px; max-height: 88vh;
    display: flex; flex-direction: column; overflow: hidden;
}
.php-popup-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; border-bottom: 1px solid #3a3a5c;
    font-weight: 600; font-size: 15px; color: #e0e0f0; flex-shrink: 0;
}
.php-popup-body { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 22px; }

.php-info-section {}
.php-info-title {
    font-weight: 700; font-size: 13px; color: #a78bfa;
    margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid #2a2a4a;
}
.php-info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 8px; }
.php-info-card {
    padding: 10px 12px; border-radius: 7px; font-size: 12px;
    line-height: 1.5; border: 1px solid transparent;
}
.php-info-card code { background: #0d1117; padding: 1px 4px; border-radius: 3px; color: #7ec8e3; }
.php-info-card.ok   { background: #1a2e1a; border-color: #27ae60; color: #b5d5b5; }
.php-info-card.warn { background: #2e2a1a; border-color: #e67e22; color: #d5c5a5; }
.php-info-card.bad  { background: #2e1a1a; border-color: #e74c3c; color: #d5a5a5; }
.php-info-card b    { display: block; margin-bottom: 4px; }
.php-info-card.ok b   { color: #2ecc71; }
.php-info-card.warn b { color: #f39c12; }
.php-info-card.bad b  { color: #e74c3c; }

.php-info-desc { font-size: 13px; color: #bbb; line-height: 1.6; }
.php-info-desc code { background: #0d1117; padding: 1px 5px; border-radius: 3px; color: #7ec8e3; }
.php-info-list { margin: 0; padding-left: 18px; color: #bbb; font-size: 13px; line-height: 1.8; }
.php-info-list code { background: #0d1117; padding: 1px 4px; border-radius: 3px; color: #7ec8e3; }

/* Editors grid */
.php-editors-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px; margin-bottom: 4px;
}
.php-editor-block   { display: flex; flex-direction: column; gap: 5px; }
.php-editor-label   { font-size: 13px; font-weight: 700; color: #64b5f6; }
.php-editor-optional { font-size: 11px; font-weight: 400; color: #666; }
.php-editor-hint    { font-size: 11px; color: #666; margin-bottom: 2px; }
.php-textarea {
    width: 100%; min-height: 190px; box-sizing: border-box;
    background: #0d1117; color: #a0c4ff;
    font-family: 'Courier New', monospace; font-size: 12px;
    border: 1px solid #2a3a5a; border-radius: 8px;
    padding: 12px; resize: vertical; outline: none; line-height: 1.5;
}
.php-textarea:focus { border-color: #4a90d9; }

/* Upload zone */
.php-upload-zone { padding: 4px 0; }
.php-upload-info {
    margin-top: 10px; padding: 10px 14px;
    background: #1a2e1a; border: 1px solid #27ae60;
    border-radius: 6px; color: #2ecc71; font-size: 13px;
}

/* Options */
.php-options-box {
    background: #16213e; border: 1px solid #2a3a5a;
    border-radius: 10px; padding: 18px; margin-top: 16px;
}
.php-options-title {
    font-weight: 700; font-size: 14px; color: #64b5f6;
    margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #2a3a5a;
}
.php-options-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}
.php-option-col { display: flex; flex-direction: column; gap: 8px; }
.php-option-col-title {
    font-size: 12px; font-weight: 700; color: #a78bfa;
    text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px;
}
.php-opt-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; background: #0d1117; border-radius: 7px;
    border: 1px solid #2a3a5a; cursor: pointer; transition: border-color .2s;
}
.php-opt-item:hover { border-color: #4a90d9; }
.php-opt-item input[type="checkbox"] { margin-top: 2px; accent-color: #4a90d9; width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.php-opt-name { font-size: 13px; font-weight: 600; color: #e0e0f0; margin-bottom: 2px; }
.php-opt-name code { background: #1a1a2e; padding: 1px 4px; border-radius: 3px; color: #7ec8e3; font-size: 11px; }
.php-opt-desc { font-size: 11px; color: #777; line-height: 1.4; }
.php-opt-desc code { background: #1a1a2e; padding: 1px 4px; border-radius: 3px; color: #7ec8e3; }

/* Extra pages */
.php-extra-hint { font-size: 12px; color: #777; margin-bottom: 8px; }
.php-pages-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.php-page-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px; background: #0d1117; border-radius: 5px;
    border: 1px solid #2a3a5a; font-size: 13px;
}
.php-page-item-name { font-family: monospace; color: #7ec8e3; }
.php-page-item-del  { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 15px; padding: 0 3px; }
.php-add-page-row   { display: flex; gap: 8px; align-items: center; }

/* Results */
.php-results-box {
    background: #16213e; border: 1px solid #2a3a5a; border-radius: 10px; padding: 18px;
}
.php-results-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.php-results-title { font-weight: 700; font-size: 14px; color: #64b5f6; }
.php-file-tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 0; }
.php-file-tab {
    padding: 8px 16px; font-size: 13px; font-weight: 600;
    background: #0d1117; border: 1px solid #2a3a5a; color: #777;
    cursor: pointer; transition: all .2s; border-bottom: none;
}
.php-file-tab:first-child { border-radius: 6px 0 0 0; }
.php-file-tab:last-child  { border-radius: 0 6px 0 0; }
.php-file-tab.active { background: #1a2a4a; color: #64b5f6; }
.php-file-tab:hover:not(.active) { color: #aaa; }

.php-summary-box {
    margin-top: 14px; padding: 12px 16px;
    background: #1a2e1a; border: 1px solid #27ae60;
    border-radius: 8px; color: #aaa; font-size: 13px;
}
.php-summary-title { font-weight: 700; color: #2ecc71; margin-bottom: 8px; font-size: 14px; }
.php-summary-item  { padding: 2px 0; line-height: 1.6; }
.php-summary-item code { background: #0d1117; padding: 1px 5px; border-radius: 3px; color: #7ec8e3; }
