/* ===== Reset léger & base ===== */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f7fb;
    color: #222;
}

/* ===== Layout principal ===== */
main {
    flex: 1;
    padding: 24px;
}

/* ===== Header ===== */
.site-header {
    background: linear-gradient(135deg, #004b8d, #0077c8);
    color: #fff;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.site-title {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.5px;
}

/* Menu de navigation principal */
.main-nav {
    display: flex;
    gap: 10px;
    margin: 0 20px;
}

.main-nav a {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border-radius: 18px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Zone droite (Paramètres + Déconnexion) */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Bouton Paramètres (icône) */
.settings-button img {
    width: 26px;
    height: 26px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

/* Bouton Déconnexion */
.logout-button {
    display: inline-block;
    background-color: #e63946;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 13px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.logout-button:hover {
    background-color: #c71c30;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ===== Titres & sections ===== */
h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
    color: #1f3b57;
}

h3 {
    margin-top: 24px;
    margin-bottom: 10px;
    font-size: 17px;
    color: #1f3b57;
}

/* ===== Formulaires (login, paramètres, clients, etc.) ===== */
.login-form,
.user-form {
    max-width: 450px;
    background-color: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-top: 12px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Champs uniformes (inputs + select) */
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #cbd3e1;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #0077c8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 119, 200, 0.2);
}

/* Boutons principaux */
.btn-primary {
    background-color: #0077c8;
    color: #fff;
    border: none;
    padding: 8px 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background-color: #005fa1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Messages */
.error-message {
    color: #c71c30;
    font-size: 14px;
    margin-top: 8px;
}

.info-message {
    color: #2a7a2a;
    font-size: 14px;
    margin-bottom: 12px;
}

/* ===== Tableaux (utilisateurs, clients, etc.) ===== */
.users-table,
.clients-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.users-table th,
.users-table td,
.clients-table th,
.clients-table td {
    border: 1px solid #e1e5f0;
    padding: 8px 10px;
    font-size: 14px;
    text-align: left;
}

.users-table th,
.clients-table th {
    background-color: #eef2fb;
    font-weight: 600;
    color: #33415c;
}

/* Email dans le tableau clients */
.client-email a {
    word-break: break-all;
}

/* Actions sur une seule ligne */
.client-actions {
    white-space: nowrap;
}

/* ===== Petits boutons (Google Map, Modifier, Installations, Supprimer) ===== */
.btn-small {
    display: inline-block;
    padding: 4px 9px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 14px;
    background-color: #0077c8;
    color: #fff;
    margin-right: 4px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-small:hover {
    background-color: #005fa1;
    transform: translateY(-1px);
}

/* Variante secondaire */
.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* Bouton danger */
.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #b21f2d;
}

/* ===== Footer ===== */
.site-footer {
    margin-top: auto;
    text-align: center;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #555;
    border-top: 1px solid #dde2ee;
    font-size: 13px;
}

/* Bouton paramètres (icône roue) */
.btn-settings {
    font-size: 20px;
    color: #fff;
    line-height: 1;
}

.btn-settings:hover {
    color: #fff;
}

/* ===== Devis (tableau) ===== */
.devis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.devis-table th,
.devis-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    vertical-align: top;
}

.devis-table th {
    background: #f0f0f0;
    text-align: left;
}

.devis-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-devis {
    font-size: 0.75rem;
    padding: 3px 6px;
}
