/* =========================================================
   Time Timer – Styles v1.3.0
   ========================================================= */

.tt-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 12px 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Panneau paramètres ── */
.tt-settings-wrap { width: 100%; max-width: 480px; }

.tt-settings-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border: 0.5px solid #c8c8c8;
    border-radius: 8px;
    background: #f0f0ef;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #333333;
    transition: background 0.15s;
}
.tt-settings-toggle:hover  { background: #e5e5e4; color: #333333; }
.tt-settings-toggle:focus  { background: #f0f0ef; color: #333333; outline: none; }
.tt-settings-toggle:active { background: #e0e0de; color: #333333; }

.tt-chevron {
    display: inline-block;
    font-size: 10px;
    opacity: 0.45;
    transition: transform 0.22s;
}
.tt-chevron.open { transform: rotate(180deg); }

.tt-settings-content { overflow: hidden; max-height: 0; transition: max-height 0.25s ease; }
.tt-settings-content.open { max-height: 360px; }

.tt-settings-inner {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 11px 14px;
    border: 0.5px solid #c8c8c8;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #f7f7f6;
}

.tt-srow   { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tt-slabel { font-size: 11px; color: #666666; min-width: 62px; flex-shrink: 0; }
.tt-divider { height: 0.5px; background: #d8d8d6; }

/* ── Pills ── */
.tt-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    border: 0.5px solid rgba(128,128,128,0.35);
    background: transparent;
    color: #333333;
    font-family: inherit;
    transition: all 0.15s;
    line-height: 1.4;
}
.tt-pill:hover { background: rgba(128,128,128,0.1); }

.tt-pill.a-dur   { background: #E8443A; border-color: #E8443A; color: #fff; }
.tt-pill.a-snd   { background: #E1F5EE; border-color: #1D9E75; color: #0F6E56; }
.tt-pill.a-thm   { background: #222;    border-color: #222;    color: #fff; }
.tt-pill.a-agile { background: #216265; border-color: #216265; color: #fff; }
.tt-pill.a-clr   { background: #534AB7; border-color: #534AB7; color: #fff; }

/* ── Toggle son ── */
.tt-tog {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666666;
    cursor: pointer;
}
.tt-tog input[type="checkbox"] { accent-color: #1D9E75; width: 13px; height: 13px; cursor: pointer; }

/* ── Upload image locale ── */
.tt-img-row { align-items: center; }

.tt-file-input { display: none; }

.tt-img-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    border: 0.5px solid rgba(128,128,128,0.35);
    background: transparent;
    color: #333333;
    font-family: inherit;
    transition: all 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}
.tt-img-label:hover { background: rgba(128,128,128,0.1); }
.tt-img-label--loaded { background: #216265; border-color: #216265; color: #fff; }

.tt-img-thumb-wrap {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 0.5px solid #c8c8c8;
    flex-shrink: 0;
}
.tt-img-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }

.tt-img-name {
    font-size: 11px;
    color: rgba(128,128,128,0.8);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt-img-clear {
    display: none;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    border: 0.5px solid #c8c8c8;
    background: transparent;
    color: rgba(128,128,128,0.7);
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
}
.tt-img-clear:hover { background: rgba(128,128,128,0.1); color: inherit; }

/* ── Zone cadran ── */
.tt-dial-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.tt-dial-wrap { position: relative; }
.tt-dial-wrap canvas { display: block; border-radius: 50%; }

/* ── Overlay saisie ── */
.tt-input-overlay {
    display: none;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 14px;
    padding: 14px 20px;
    text-align: center;
    z-index: 10;
}
.tt-time-row { display: flex; align-items: center; gap: 8px; justify-content: center; }
.tt-time-row input {
    width: 54px; font-size: 26px; text-align: center;
    border: none; outline: none; background: transparent;
    padding: 2px 0; font-family: inherit;
    -webkit-appearance: none; -moz-appearance: textfield; appearance: none;
}
.tt-time-row input::-webkit-inner-spin-button,
.tt-time-row input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tt-input-hint { font-size: 11px; margin-top: 8px; }

/* ── Légende multicolore ── */
.tt-legend      { display: none; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.tt-legend.show { display: flex; }
.tt-legend-item { display: flex; align-items: center; gap: 5px; }
.tt-ldot        { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tt-ltxt        { font-size: 11px; color: rgba(128,128,128,0.7); }

/* ── Boutons principaux ── */
.tt-btn-row { display: flex; gap: 10px; }

.tt-ctrl {
    padding: 9px 24px; border-radius: 8px; font-size: 14px;
    cursor: pointer; border: 0.5px solid rgba(128,128,128,0.35);
    background: transparent; color: inherit; font-family: inherit;
    transition: all 0.15s;
}
.tt-ctrl:hover  { background: rgba(128,128,128,0.1); }
.tt-ctrl:active { transform: scale(0.97); }

.tt-start        { border-color: #1D9E75; color: #0F6E56; }
.tt-start:hover  { background: #E1F5EE; }
.tt-start.running       { border-color: #BA7517; color: #854F0B; }
.tt-start.running:hover { background: #FAEEDA; }
