body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(to bottom, #F5F5F7, #E5E5E7);
    color: #1D1D1F;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1920px;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

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

h1 {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

.admin-link, .back-link {
    color: #007AFF;
    text-decoration: none;
    font-size: 16px;
}

.calendars-grid {
    display: grid;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

.calendar-column {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px;
    position: relative;
    overflow-y: auto; /* Scroll vertical */
    height: 100%;
}

h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 10px;
    text-align: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
    padding: 10px 0;
}

.timeline {
    height: 1440px; /* 24h * 60px */
    position: relative;
    border-left: 1px solid #C6C6C8;
    min-height: 1440px; /* Pour scroll si fenêtre petite */
}

.hour {
    position: absolute;
    left: 10px;
    width: calc(100% - 20px);
    font-size: 12px;
    color: #8E8E93;
}

.hour::before {
    content: '';
    position: absolute;
    left: -6px;
    width: 12px;
    height: 1px;
    background: #C6C6C8;
    top: 50%;
}

.event {
    position: absolute;
    left: 40px;
    right: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.event:hover {
    transform: scale(1.02);
}

.event-time {
    font-size: 12px;
    opacity: 0.8;
}

.event-summary {
    font-weight: 500;
}

.event-location {
    font-size: 12px;
    opacity: 0.9;
}

.current-time {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #FF3B30;
    z-index: 10;
}

.current-time::before {
    content: '';
    position: absolute;
    left: 34px;
    width: 8px;
    height: 8px;
    background: #FF3B30;
    border-radius: 50%;
    top: -3px;
}

/* Admin styles */
.add-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"], input[type="password"] {
    padding: 10px;
    border: 1px solid #C6C6C8;
    border-radius: 8px;
    font-size: 16px;
}

button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #005BB5;
}

.calendar-list {
    list-style: none;
    padding: 0;
}

.calendar-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    gap: 15px;
}

.calendar-info {
    flex: 1;
    min-width: 0;           /* Très important pour le ellipsis */
    overflow: hidden;
}

.url-text {
    display: block;
    font-size: 13px;
    color: #6E6E73;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}

.calendar-list li strong {
    font-weight: 500;
    color: #1D1D1F;
}

.remove-btn {
    background: #FF3B30;
}

.remove-btn:hover {
    background: #D10000;
}

/* Responsive */
@media (max-width: 768px) {
    .calendars-grid {
        grid-template-columns: 1fr !important;
    }
    .calendar-column {
        height: auto;
    }
}