/* style.css - Feuille de style globale BoissyBioEnergie */

/* Reset & base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(120deg, #f5e9da 0%, #e0f7fa 100%) !important;
    color: #222;
    padding: 2rem;
    min-height: 100vh;
}

/* Navigation */
nav {
    background-color: #263544;
    padding: 1rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

nav a:hover,
nav a.active {
    background-color: #00796b;
    color: #fff;
}

/* Container */
.container {
    max-width: 960px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #263544;
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

select, input[type="text"], input[type="password"], input[type="datetime-local"] {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

button, input[type="submit"] {
    background-color: #00796b;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

button:hover, input[type="submit"]:hover {
    background-color: #004d40;
}

/* Listes et filtres */
.filter-section {
    margin: 1rem 0;
}

ul.user-list {
    list-style: none;
    padding: 0;
}

ul.user-list li {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #f1f3f6;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.return-button {
    margin-top: 2rem;
    background: #004d40;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.return-button:hover {
    background: #00332d;
}

/* Hide admin-only elements by default */
.admin-only {
    display: none;
}

/* Show with JS if user is admin */
body.admin .admin-only {
    display: inline-block;
}

/* Tableau rendements */
.container-rendements {
    margin-top: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(38,53,68,0.07);
    padding: 2.5rem 2rem 2rem 2rem;
    max-width: 1100px;
}

.icon-leaf {
    font-size: 1.5em;
    vertical-align: middle;
    color: #00796b;
    margin-right: 0.3em;
}

.intro {
    color: #555;
    margin-bottom: 2rem;
    font-size: 1.1em;
}

.table-ms {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: #f9fbfd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(38,53,68,0.04);
}
.table-ms th, .table-ms td {
    padding: 1rem 0.7rem;
    text-align: center;
}
.table-ms th {
    background: #263544;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #00796b;
}
.table-ms tr:nth-child(even) {
    background: #eaf6f3;
}
.table-ms tr:nth-child(odd) {
    background: #f5f7fa;
}
.table-ms td {
    color: #263544;
    font-size: 1.08em;
}
.table-ms tr:hover {
    background: #b2dfdb;
    transition: background 0.2s;
}

/* Nouveaux styles pour badges et titres de tableau */
.champ-badge {
    display: inline-block;
    background: linear-gradient(90deg, #00796b 60%, #43cea2 100%);
    color: #fff;
    font-weight: 600;
    padding: 0.35em 1em;
    border-radius: 20px;
    font-size: 1em;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 6px rgba(67,206,162,0.10);
}
.titre-tableau {
    margin-bottom: 0.7em;
    color: #00796b;
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: 0.02em;
}

@media (max-width: 700px) {
    .container-rendements { padding: 1rem; }
    .table-ms th, .table-ms td { padding: 0.5rem 0.2rem; font-size: 0.95em; }
}

/* Media queries pour la page ensembles */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    nav {
        padding: 0.8rem;
        gap: 1rem;
        flex-direction: column;
    }
    
    nav a {
        padding: 0.6rem 1rem;
        text-align: center;
        min-width: 120px;
    }
    
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    form {
        gap: 0.8rem;
    }
    
    select, input[type="text"], input[type="password"], input[type="datetime-local"] {
        padding: 0.8rem;
        font-size: 16px; /* Évite le zoom sur mobile */
    }
    
    button, input[type="submit"] {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.6rem;
        gap: 0.5rem;
    }
    
    nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .container {
        margin: 0.5rem;
        padding: 1rem;
        border-radius: 6px;
    }
    
    h1, h2, h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    select, input[type="text"], input[type="password"], input[type="datetime-local"] {
        padding: 0.9rem;
    }
    
    button, input[type="submit"] {
        padding: 1rem 1.2rem;
        font-weight: normal;
    }
}
