
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
  /* Valeurs par défaut (Midi) */
  --bg-desktop: linear-gradient(#60a5fa, #93c5fd);
  --text-color: white;
}

body {
    margin: 0px;
    transition: background 2s ease-in-out; /* Transition douce de 2 secondes ! */
    min-height: 100vh;
    background: var(--bg-desktop);
    color: var(--text-color);
}
body.dark {
    background-color: #333;
}

p, h2, h3 {
    font-family: Arial, Verdana;
    margin: 0px;
}

h2, h3 {
    margin-bottom: 10px;
}

#container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

#sky-astre {
    opacity: 0;
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    filter: blur(2px); /* Un petit effet de halo */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 2s ease-in-out; /* Pour un mouvement fluide */
    z-index: -1; /* Pour qu'il reste derrière tes cartes */
}

.tile {
    display: inline-block;
    padding: 10px;
}

.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Pour Safari */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 0px 10px 0 rgba(0, 0, 0, 0.1);
    display: block;
    margin-bottom: 10px;
    padding: 20px 30px;
    overflow: hidden;
    transition: 
        background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        transform 0.2s ease; /* Petit effet de clic si tu veux */
}

.card:hover {
    transform: translateY(-5px);
}

.card.red {
    background-color: #fdd;
    border: 0;
    box-shadow: none;
}

.card.red p {
    color: #755;
}

.card.blue {
    background-color: #ddf;
    border: 0;
    box-shadow: none;
}

.card.blue p {
    color: #557;
}

.options {
    margin-left: auto;
    width: fit-content;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.options > div {
    margin-left: 5px;
}

.circle {
    width: 20px;
    height: 20px;
    background-color: #eef;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease-out;
}

.circle.red {
    background-color: #fee;
}

.circle:active {
    transform: scale(0.9);
}

.circle.light {
    background-color: #eee;
    border: 1px solid #ddd;
}

.circle.dark {
    background-color: #333;
    border: 0px solid #555;
}

/* Time */
.time {
    /* background-color: #eef;
    border: 0px solid #dde; */
    container-type: inline-size; /* On dit que cette div est une référence de taille */
    width: 100%;
}

.time p {
    color: var(--text-color);
    font-weight: 600;
    font-size: 25cqw; /* cqw = Container Query Width */
    text-align: center;
    margin: 30px 0px;
}

#bottom-options {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bottom-options > div {
    margin-left: 5px;
}

#settings-icon {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

#bottom-options:hover #settings-icon {
    opacity: 1;
}

#settings-icon.active {
    opacity: 1;
    transform: rotate(90deg);
}

/* Astre theme */
.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    z-index: -2; /* Derrière l'astre et les cartes */
    animation: twinkle var(--duration) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

#theme-toggle {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

#theme-toggle:active {
    transform: scale(0.8);
}

#theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.4);
}

/* Grap */
.graph {
    width: 100%;
    height: auto;
    margin-top: 15px;
    filter: drop-shadow(0px 0px 4px rgba(255, 255, 255, 0.3));
    overflow: visible;
}

#activity-line {
    transition: all 1s ease-in-out; /* Animation fluide lors du changement de données */
}

#tooltip {
    pointer-events: none;
    transition: left 0.1s ease-out, top 0.1s ease-out;
}

.hidden {
    opacity: 0;
    pointer-events: none; /* Empêche de cliquer sur le bouton invisible */
    transition: opacity 0.3s ease;
}
