/* ============================================================
   styles.css — feuille de style commune aux pages du site
   Appelée par formulaire.html et tempssaisis.html.
   ============================================================ */

/* ---------- Règles communes ---------- */
:root {
    --couleur-principale: #2d6cdf;
    --couleur-principale-survol: #1f56bd;
    --couleur-texte: #222;
    --couleur-texte-clair: #777;
    --couleur-bord: #ccc;
    --couleur-fond: #f4f6fa;
    --couleur-carte: #fff;
    --rayon: 6px;
}

body {
    font-family: Arial, sans-serif;
    color: var(--couleur-texte);
    background: var(--couleur-fond);
    margin: 0;
    padding: 30px 20px;
}

h1 { font-size: 1.4em; margin-top: 0; }
h2 { font-size: 1.1em; }

.carte {
    background: var(--couleur-carte);
    border: 1px solid var(--couleur-bord);
    border-radius: var(--rayon);
    padding: 20px;
    margin-top: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

button {
    background: var(--couleur-principale);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    padding: 8px 18px;
}

button:hover { background: var(--couleur-principale-survol); }

button.principal { padding: 12px 30px; font-size: 1em; margin-top: 26px; }

.aucune-donnee { color: var(--couleur-texte-clair); font-style: italic; }

/* ---------- Page formulaire.html ---------- */
.page-formulaire { max-width: 480px; margin: 50px auto; }

.page-formulaire h1 { font-size: 1.3em; }

label { display: block; margin-top: 18px; font-weight: bold; }

input, select {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid var(--couleur-bord);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    background: var(--couleur-carte);
}

input[readonly] { cursor: pointer; background: #fafafa; }

.obligatoire { color: #a4271b; font-size: 0.85em; display: none; }

/* Calendrier dynamique */
#calendrier {
    display: none;
    position: absolute;
    z-index: 10;
    background: var(--couleur-carte);
    border: 1px solid var(--couleur-bord);
    border-radius: var(--rayon);
    padding: 10px;
    width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#calendrier table { width: 100%; border-collapse: collapse; text-align: center; }
#calendrier th, #calendrier td { padding: 5px 0; font-size: 0.9em; }

#calendrier td button {
    width: 100%;
    padding: 5px 0;
    border: 1px solid transparent;
    background: none;
    color: var(--couleur-texte);
    border-radius: 4px;
}

#calendrier td button:hover { background: #e8f0fe; }
#calendrier .aujourdhui { background: var(--couleur-principale); color: #fff; border-radius: 4px; }

#calendrier .entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#calendrier .entete button { border: none; background: #eee; color: var(--couleur-texte); border-radius: 4px; padding: 4px 10px; }
#calendrier .entete button:hover { background: #ddd; }
#calendrier .entete span { font-weight: bold; }

/* ---------- Page tempssaisis.html (dashboard) ---------- */
.page-dashboard { max-width: 900px; margin: 0 auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
th, td { border: 1px solid #dde2ec; padding: 8px 10px; text-align: left; }
th { background: var(--couleur-principale); color: #fff; }
tr:nth-child(even) td { background: #f7f9fd; }
td.nomb { text-align: right; }

.actualiser { margin-bottom: 0; }

/* Histogramme : une barre par machine */
.histogramme {
    display: flex;
    align-items: flex-end;
    gap: 40px;
    height: 220px;
    padding: 10px 10px 0;
    border-bottom: 2px solid #889;
}

.barre-groupe { display: flex; flex-direction: column; align-items: center; width: 110px; }

.barre {
    width: 64px;
    background: var(--couleur-principale);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.3s;
}

.valeur { font-weight: bold; margin-bottom: 4px; font-size: 0.9em; }
.etiquette { margin-top: 6px; font-size: 0.82em; text-align: center; word-break: break-word; }