/* ========================================
   Démo Git - Styles
   Présentation interactive du workflow Git
   ======================================== */

:root {
    --color-untracked: #2ecc71;
    --color-modified: #f39c12;
    --color-staged: #27ae60;
    --color-committed: #27ae60;
    --color-branch: #9b59b6;
    --color-remote: #3498db;
    --color-bg: #1a1a2e;
    --color-card: #16213e;
    --color-text: #eaeaea;
    --color-accent: #0f3460;
}

main a
{
    color: white;
    text-decoration: underline;
}

.slides-container ul
{
    margin-left: 1.5rem;
}

aside ul
{
    list-style-type: disc;
    margin-left: 1rem;
}

.notes-aside ul li
{
    margin-bottom: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
header {
    background: var(--color-accent);
    padding: 0.8rem 1.5rem;
    text-align: center;
    border-bottom: 3px solid var(--color-committed);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-text {
    flex: 1;
}

.header-text h1 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.header-text p {
    opacity: 0.8;
    font-size: 0.85rem;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

/* Flowchart navigation */
.flowchart-container {
    background: var(--color-card);
    padding: 1rem 1.5rem;
    overflow-x: auto;
}

.flowchart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: max-content;
    margin: 0 auto;
}

.flow-step {
    cursor: pointer;
    transition: all 0.3s ease;
}

.flow-step:hover .flow-node {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.flow-step.active .flow-node {
    background: linear-gradient(135deg, var(--color-committed), var(--color-branch));
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.4);
}

.flow-node {
    background: #333;
    color: #ccc;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.flow-step.active .flow-node {
    border-color: var(--color-committed);
}

.flow-arrow {
    color: #666;
    font-size: 1.2rem;
    font-weight: bold;
    user-select: none;
}

/* Grouped steps */
.flow-group {
    display: flex;
    align-items: center;
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid var(--color-remote);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    position: relative;
}

.setup-group {
    background: rgba(155, 89, 182, 0.1);
    border-color: var(--color-branch);
}

.group-label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1 !important;
}

.group-label small {
    opacity: 0.8;
    font-weight: normal;
}

/* Responsive flowchart */
@media (max-width: 768px) {
    .flowchart-container {
        padding: 0.8rem 1rem;
    }
    
    .flow-node {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .flow-arrow {
        font-size: 1rem;
    }
    
    .group-label {
        font-size: 0.6rem;
        top: -24px;
        padding: 0.15rem 0.6rem;
    }
}

/* Main content */
main {
    flex: 1;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
}

.content-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
}

.slides-container {
    flex: 1;
    max-width: 1000px;
}

/* Notes aside */
.notes-aside {
    width: 320px;
    background: var(--color-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--color-accent);
    position: sticky;
    top: 1rem;
    height: fit-content;
}

.notes-aside h3 {
    margin-bottom: 1rem;
    color: var(--color-accent);
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}
/*
.notes-aside h3::before {
    content: "💡";
}
*/
.note-item {
    display: none;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--color-remote);
}

.note-item.active {
    display: block;
}

.note-item p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.9em;
}

/* Slides container */
.slides-container {
    width: 100%;
    max-width: 1000px;
    position: relative;
}

.slide {
    display: none;
    animation: fadeIn 0.5s ease;
}

.slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Slide content */
.slide-header {
    margin-bottom: 1rem;
}

.slide-number {
    display: inline-block;
    background: var(--color-branch);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    margin-right: 0.8rem;
}

.slide-title {
    display: inline;
    font-size: 1.3rem;
}

.slide-description {
    background: var(--color-card);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-staged);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Command box */
.command-box {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.command-box .label {
    color: var(--color-staged);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.command-box code {
    display: block;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.1rem;
    color: #58a6ff;
    padding: 0.5rem;
    background: #161b22;
    border-radius: 4px;
}

/* Visual area */
.visual-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .visual-area {
        grid-template-columns: 1fr;
    }
}

/* File tree */
.file-tree {
    background: var(--color-card);
    border-radius: 8px;
    padding: 0.8rem;
}

.file-tree h4 {
    margin-bottom: 1rem;
    color: var(--color-staged);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-tree h4::before {
    content: "📁";
}

.tree-item {
    padding: 0.3rem 0;
    padding-left: 1rem;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tree-item.folder {
    color: var(--color-staged);
    font-weight: bold;
}

.tree-item.folder::before {
    content: "📂";
}

/*
.tree-item.file::before {
    content: "📄";
}

.tree-item.file.html::before {
    content: "🌐";
}

.tree-item.file.css::before {
    content: "🎨";
}

.tree-item.file.img::before {
    content: "🖼️";
}
*/
.tree-item .status {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-left: auto;
}

.status.untracked {
    background: var(--color-untracked);
    color: white;
}

.status.staged {
    background: var(--color-staged);
    color: black;
}

.status.committed {
    background: var(--color-committed);
    color: white;
}

.status.modified {
    background: #e67e22;
    color: white;
}

/* Git status panel */
.git-status {
    background: var(--color-card);
    border-radius: 8px;
    padding: 0.8rem;
}

.git-status h4 {
    margin-bottom: 1rem;
    color: var(--color-branch);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/*
.git-status h4::before {
    content: "🔄";
}
*/
.status-section {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.2);
}

.status-section.working {
    border-left: 3px solid var(--color-untracked);
}

.status-section.staging {
    border-left: 3px solid var(--color-staged);
}

.status-section.repository {
    border-left: 3px solid var(--color-committed);
}

.status-section h5 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.status-section .files {
    font-family: monospace;
    font-size: 0.9rem;
}

.status-section .files div {
    padding: 0.2rem 0;
}

/* Git graph */
.git-graph {
    background: var(--color-card);
    border-radius: 8px;
    padding: 0.8rem;
    grid-column: 1 / -1;
}

.git-graph h4 {
    margin-bottom: 1rem;
    color: var(--color-committed);
}

/*
.git-graph h4::before {
    content: "📊 ";
}
*/
.commit-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    font-family: monospace;
}

.commit-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-committed);
    flex-shrink: 0;
    position: relative;
}

.commit-dot.branch {
    background: var(--color-branch);
}

.commit-dot.merge {
    background: linear-gradient(135deg, var(--color-committed) 50%, var(--color-branch) 50%);
}

.commit-dot::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 30px;
    background: #444;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
}

.commit-line:last-child .commit-dot::after {
    display: none;
}

.commit-hash {
    color: var(--color-staged);
    font-size: 0.85rem;
}

.commit-message {
    color: var(--color-text);
}

.commit-branch {
    background: var(--color-branch);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Diff view */
.diff-view {
    background: #0d1117;
    border-radius: 8px;
    padding: 0.8rem;
    font-family: monospace;
    font-size: 0.85rem;
    grid-column: 1 / -1;
}

.diff-view h4 {
    color: var(--color-staged);
    margin-bottom: 1rem;
}

.diff-line {
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

.diff-line.added {
    background: rgba(46, 160, 67, 0.2);
    color: #3fb950;
}

.diff-line.removed {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
}

.diff-line.context {
    color: #8b949e;
}

/* Note box */
.note-box {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid var(--color-remote);
    border-radius: 8px;
    padding: 0.8rem;
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

/*
.note-box::before {
    content: "💡";
    font-size: 1.2rem;
}*/

.note-box p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Navigation buttons */
.header-nav button,
nav button {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-prev {
    background: #444;
    color: white;
}

.btn-prev:hover:not(:disabled) {
    background: #555;
}

.btn-next {
    background: var(--color-committed);
    color: white;
}

.btn-next:hover:not(:disabled) {
    background: #2ecc71;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-nav {
        align-self: flex-end;
    }
    
    .header-nav button {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .content-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .notes-aside {
        width: 100%;
        position: static;
        order: -1; /* Afficher l'aside au-dessus du contenu sur mobile */
    }
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem;
    background: rgba(0,0,0,0.3);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.untracked { background: var(--color-untracked); }
.legend-dot.modified { background: var(--color-modified); }
.legend-dot.staged { background: var(--color-staged); }
.legend-dot.committed { background: var(--color-committed); }
.legend-dot.branch { background: var(--color-branch); }

/* ========================================
   Classes utilitaires pour éviter les styles inline
   ======================================== */

/* Indentation des fichiers dans l'arborescence */
.indent-1 { padding-left: 2rem; }
.indent-2 { padding-left: 3rem; }

/* Texte pour fichiers non modifiés/non commités */
.file-unchanged {
    opacity: 0.6;
    font-size: 0.8rem;
    font-style: italic;
}

/* Texte de description */
.text-small { font-size: 0.9rem; }
.text-smaller { font-size: 0.8rem; }
.text-muted { opacity: 0.7; }
.text-faded { opacity: 0.5; }
.text-italic { font-style: italic; }
.text-white { color: white; }
.text-dark { color: #24292e; }

/* Boîtes d'information */
.info-box {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.info-box-config {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-left: 4px solid #f39c12;
}

.info-box-tip {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #0366d6;
}

.info-box-note {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.info-box-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.info-box p {
    margin: 0;
    font-size: 0.9rem;
}

/* Sections visuelles spéciales */
.section-github {
    background: linear-gradient(135deg, #24292e 0%, #0366d6 100%);
}

.section-local {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Grille pleine largeur */
.full-width {
    grid-column: 1 / -1;
}

/* Marges */
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }

/* Couleurs spéciales */
.color-branch { color: #9b59b6; }
.color-warning { color: #f39c12; }

/* Badge de sous-titre dans les titres */
.subtitle-badge {
    font-size: 0.7em;
    opacity: 0.7;
    font-weight: normal;
}

/* Résumé final - workflow steps */
.workflow-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 1rem;
}

.workflow-step {
    background: rgba(0,0,0,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Note explicative */
.note-info {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Couleur de succès (vert) */
.color-success {
    color: #27ae60;
    font-weight: bold;
}

/* Titre de la boîte félicitations */
.success-title {
    margin-bottom: 1rem;
}

/* Texte d'intro du workflow */
.success-intro {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Note de conclusion */
.success-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Note secondaire dans les notes aside */
.note-secondary {
    font-size: 0.85em;
    opacity: 0.8;
    margin-top: 0.5rem;
}
