body, html {
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    user-select: none;
}

#app-container {
    width: 100%;
    padding: 20px 0;
    position: relative;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

h1 { margin: 0; font-size: 1.5rem; color: #fff; }

/* --- STRUCTURE D'UNE LIGNE (TRACK) --- */
.track {
    display: grid;
    grid-template-columns: 250px 1fr; 
    border-bottom: 1px solid #2a2a2a;
    background-color: #181818;
    margin-bottom: 2px;
}

/* --- COLONNE GAUCHE : INFOS --- */
.track-left {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #333;
    position: relative;
    background-color: #1a1a1a;
    z-index: 20;
}

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

/* Nom éditable */
.name { 
    font-weight: bold; 
    font-size: 1rem; 
    color: #fff; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    cursor: text;
    border-bottom: 1px dashed transparent;
    transition: border 0.2s;
}
.name:hover {
    border-bottom: 1px dashed #666;
}
/* Input d'édition */
.name-edit-input {
    width: 100%;
    background: #000;
    border: 1px solid #4CAF50;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    padding: 2px;
}

.gmt-badge {
    font-size: 0.75rem;
    color: #888;
    background: #2a2a2a;
    padding: 2px 6px;
    border-radius: 4px;
}

.digital-time {
    font-size: 1.8rem;
    font-weight: bold;
    color: #eee;
    font-variant-numeric: tabular-nums;
}

.remove-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 1.2rem;
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
}
.track:hover .remove-btn { opacity: 1; }
.remove-btn:hover { color: #f44336; }


/* --- COLONNE DROITE : TIMELINE --- */
.track-right {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    overflow: hidden;
    cursor: grab;
}
.track-right:active {
    cursor: grabbing;
}

/* Règle des heures */
.ruler {
    display: flex;
    height: 20px;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.7rem;
    width: 100%;
}
.ruler span {
    flex: 1;
    text-align: left; 
    padding-left: 4px;
    border-left: 1px solid #333; 
    line-height: 10px;
    position: relative;
}

/* Les autres styles de zones, grilles, et curseur restent inchangés */
/* ... (zones-blue, zone-green, main-cursor) ... */

.time-bar {
    height: 40px;
    background-color: #222;
    position: relative;
    width: 100%;
}

.bar-grid {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
}
.bar-grid div {
    flex: 1;
    border-right: 1px solid #333;
}

.zone-blue {
    position: absolute;
    top: 0; bottom: 0;
    background-color: rgba(33, 150, 243, 0.4);
    pointer-events: none;
}

.zone-green {
    position: absolute;
    top: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(76, 175, 80, 0.3),
        rgba(76, 175, 80, 0.3) 10px,
        rgba(76, 175, 80, 0.5) 10px,
        rgba(76, 175, 80, 0.5) 20px
    );
    border-top: 2px solid #4CAF50;
    border-bottom: 2px solid #4CAF50;
    z-index: 10;
    pointer-events: none;
}

.track.status-ok .track-left { border-left: 4px solid #4CAF50; }
.track.status-bad .track-left { border-left: 4px solid #f44336; }

#main-cursor {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #fff;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255,255,255,0.4);
    display: none;
}
#main-cursor::after {
    content: '';
    position: absolute;
    top: 90px;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #fff;
}


/* --- NOUVEAUX STYLES AUTOCOMPLETION --- */
#add-participant-zone {
    padding: 20px 20px 20px 270px;
    position: relative; /* Pour positionner correctement l'autocomplete */
}

#autocomplete-container {
    position: relative;
    width: 300px;
}

#tz-search-input {
    padding: 10px;
    background: #333;
    color: white;
    border: 1px solid #333;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

#autocomplete-results {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 100%; /* Sous l'input */
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #2a2a2a;
    
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 50;
}

#autocomplete-results li {
    padding: 8px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

#autocomplete-results li:hover,
#autocomplete-results li.active { /* Active pour navigation clavier */
    background-color: #444;
}