:root {
    --bg-color: #121212;
    --accent: #3498db;
    --success: #2ecc71;
    --error: #e74c3c;
}

body {
    background-color: var(--bg-color);
    color: white;
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    touch-action: manipulation;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

/* Groupement des boutons */
.actions {
    display: flex;
    gap: 8px; /* Espace entre les deux boutons */
}

/* Style de base identique pour les deux boutons */
.btn-action {
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

/* Couleur pour 15min Focus (Gris pro pour ressembler au style s'abonner) */
.focus-btn {
    background: #3a3a3a;
}
.focus-btn:hover { background: #4a4a4a; }

/* Couleur pour S'abonner (Orange) */
.rss-btn {
    background: #e67e22;
}
.rss-btn:hover { background: #d35400; }

/* Score et WPM */
#global-score {
    font-weight: bold;
    color: #3498db;
    font-size: 14px;
}

/* --- STATS 2 LIGNES --- */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 10px;
    justify-content: center;
    background: #1a1a1a;
}

.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% / 14);
    min-width: 20px;
}

.bar {
    width: 10px;
    height: 35px;
    background: #333;
    display: flex;
    align-items: flex-end;
}

.fill { width: 100%; transition: height 0.3s; }

/* --- CLAVIER QWERTY MOBILE --- */
#virtual-keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
    background: #000;
}

.kb-row { display: flex; justify-content: center; gap: 4px; }

.key-btn {
    flex: 1;
    max-width: 45px;
    height: 50px;
    background: #333;
    border: none;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    font-size: 18px;
}

.key-btn:active { background: #666; }
.space-bar { max-width: 70%; background: var(--accent); }

.rss-btn {
    background: #e67e22;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

/* Message de notification */
#notification-bar {
    display: none;
    background: var(--success);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Style de l'icône dans l'entête */
.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

/* --- DISPLAY --- */
.display-area { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 80px; }