:root {
    --scale: 1;
    --font-family: 'Roboto', sans-serif;
}

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

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0f172a;
    color: #f8fafc;
    font-family: var(--font-family);
}

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-box {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 320px;
}

.auth-box h2 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.auth-box input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.hidden {
    display: none !important;
}

.sidebar {
    width: 360px;
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-select {
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    padding: 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    width: 160px;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.color-picker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.color-picker input {
    border: none;
    background: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-item {
    background: #0f172a;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.event-item input {
    background: #1e293b;
    border: 1px solid #334155;
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
}

.btn-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    color: #ef4444;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.btn {
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn.primary {
    background: #3b82f6;
    color: white;
}

.btn.secondary {
    background: #334155;
    color: white;
}

.btn.success {
    background: #10b981;
    color: white;
}

.status-msg {
    font-size: 0.85rem;
    color: #38bdf8;
    text-align: center;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: #0f172a;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #10b981;
    transition: width 0.15s linear;
}

.error-msg {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Zone de preview */
.preview-container {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-stage {
    width: 100%;
    height: 100%;
    position: relative;
}

.timeline-track {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(0, -50%);
    /* On passe la ligne horizontale de 4px à 6px */
    height: calc(6px * var(--scale));
    will-change: transform, filter;
}

.timeline-track.motion-blur {
    filter: url('#horizontal-motion-blur');
}

.node-wrapper {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
}

.content-box {
    opacity: 0;
    /* On recule un peu plus le texte au départ de l'animation (-20px au lieu de -10px) */
    transform: translateY(calc(-20px * var(--scale)));
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    width: max-content;
    /* Marge augmentée entre le texte et la ligne verticale */
    margin-bottom: calc(16px * var(--scale));
    font-family: var(--font-family);
}

.content-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-box .date {
    font-weight: bold;
    /* Police de la date augmentée de 1.2rem à 2rem */
    font-size: calc(2rem * var(--scale));
}

.content-box .title {
    /* Police du titre augmentée de 1rem à 1.4rem */
    font-size: calc(1.4rem * var(--scale));
    opacity: 0.9;
    /* Petit espacement supplémentaire entre la date et le titre */
    margin-top: calc(4px * var(--scale));
}

.point {
    /* Points grossis de 20px à 28px */
    width: calc(28px * var(--scale));
    height: calc(28px * var(--scale));
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3;
}

.point.active {
    transform: scale(1);
}

.v-line {
    /* Ligne verticale passe de 4px à 6px de large */
    width: calc(6px * var(--scale));
    height: 0px;
    transition: height 0.4s ease-out;
}

.h-line {
    position: absolute;
    bottom: 0;
    /* Ligne horizontale passe de 4px à 6px de haut */
    height: calc(6px * var(--scale));
    width: 0px;
    z-index: 1;
}

body.export-mode .sidebar {
    display: none;
}

body.export-mode .preview-container {
    width: 100vw;
    height: 100vh;
}

/* Style pour le bouton de connexion */
.auth-box button {
    width: 100%;
    padding: 0.85rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #38bdf8, #3b82f6);
    color: #ffffff;
    font-size: 1rem;
    font-weight: bold;
    font-family: var(--font-family);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

/* Effet au survol du bouton */
.auth-box button:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

/* Effet lors du clic */
.auth-box button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}