@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url(variables.css);

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    text-align: center;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.8rem;
    margin: 0;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
}

button:hover {
    background-color: #45a049;
}

.timer {
    margin-top: 20px;
}

#time-display {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.settings {
    margin-top: 20px;
    text-align: left;
}

.settings label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

.settings input {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.history {
    margin-top: 20px;
    text-align: left;
}

.history h2 {
    font-size: 1.4rem;
}

#session-history {
    list-style-type: none;
    padding: 0;
}

#session-history li {
    background: var(--primary-color);
    color: white;
    padding: 5px;
    margin-top: 5px;
    border-radius: 4px;
}

/* Mode sombre */
.dark-mode {
    background-color: var(--dark-background);
    color: var(--dark-text);
}

.dark-mode .container {
    background: #333;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

.dark-mode button {
    background-color: #888;
}

.dark-mode #session-history li {
    background: #666;
}

/* Style du bouton Supprimer Historique */
#deleteStorage {
    background-color: #ff4c4c;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

#deleteStorage:hover {
    background-color: #d63434;
}

/* Responsive Design */

@media (max-width: 768px) {
    .container {
        max-width: 90%;
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    button {
        width: 100%;
        padding: 12px 20px;
    }

    .settings input {
        font-size: 0.9rem;
    }

    #time-display {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        max-width: 95%;
        padding: 10px;
    }

    h1 {
        font-size: 1.2rem;
    }

    button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .settings input {
        font-size: 0.85rem;
    }

    #time-display {
        font-size: 1.8rem;
    }

    #deleteStorage {
        width: 100%;
        padding: 12px 15px;
        font-size: 1rem;
    }
}
