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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
}

.container {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: 100vh;
}

.column {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    margin-bottom: 20px;
    color: #333;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn.primary {
    background-color: #007bff;
    color: white;
}

.btn.secondary {
    background-color: #6c757d;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.segment-group {
    margin-bottom: 10px;
}

.timer-display {
    font-size: 48px;
    font-family: monospace;
    text-align: center;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
}

.current-time {
    font-size: 48px;
}

.best-time {
    font-size: 24px;
    color: #28a745;
    margin-top: 5px;
    opacity: 0.8;
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

#speedrun-list {
    margin-bottom: 20px;
}

.speedrun-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
}

.speedrun-item:hover {
    background-color: #f8f9fa;
}

.speedrun-item.active {
    border-color: #007bff;
    background-color: #e7f1ff;
}

#current-segment {
    text-align: center;
    font-size: 18px;
    margin-top: 20px;
    color: #666;
}

.speedruns-list {
    margin-bottom: 30px;
}

.speedrun-item h3 {
    margin: 0;
}

.speedrun-item button {
    padding: 5px 15px;
}

.speedrun-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.speedrun-actions {
    display: flex;
    gap: 5px;
}

.speedrun-actions button {
    padding: 5px 10px;
    font-size: 12px;
}

.segments-list {
    margin-top: 10px;
    padding-left: 15px;
}

.segment-item {
    padding: 5px 0;
    color: #666;
}

/* Ajoutez Font Awesome pour les icônes */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

#segments-progress {
    margin-top: 20px;
}

.segment {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.segment.current {
    border-color: #007bff;
    background-color: #e7f1ff;
}

.segment.completed {
    border-color: #28a745;
    background-color: #d4edda;
}

.segment-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.segment-pb {
    font-size: 12px;
    color: #28a745;
}

.segment-name {
    font-weight: bold;
}

.segment-time {
    font-family: monospace;
    transition: color 0.3s ease;
}

.time-better {
    color: #28a745 !important; /* Vert */
}

.time-worse {
    color: #dc3545 !important; /* Rouge */
}

.best-time {
    font-size: 24px;
    color: #28a745;
    margin-top: 5px;
    opacity: 0.8;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.collapse-btn {
    display: none; /* Caché par défaut, visible sur mobile */
    padding: 5px 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.collapse-btn i {
    transition: transform 0.3s ease;
}

.column.collapsed .collapse-btn i {
    transform: rotate(180deg);
}

.column.collapsed .column-content {
    display: none;
}

/* Media queries pour mobile */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .column {
        width: 100%;
        margin-bottom: 15px;
    }

    .collapse-btn {
        display: block;
    }

    .column-header {
        padding: 10px;
        background-color: #f8f9fa;
        border-radius: 4px;
        margin: -20px -20px 20px -20px;
    }

    .column.collapsed {
        height: 76px;
        flex: 0;
    }
}

/* Layout History Page */
.layout-history {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.layout-history header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.runs-list {
    display: grid;
    gap: 20px;
}

.run-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.run-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.run-date {
    color: #666;
    font-size: 14px;
}

.run-time {
    font-size: 24px;
    font-family: monospace;
    color: #007bff;
}

.segments-details {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.segment-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.segment-row .time {
    font-family: monospace;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
} 