/* ------------------------
   MODERN APP STYLE
-------------------------*/

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f3f5fb;
    color: #222;
    max-width: 950px;
    margin: 0 auto;
    min-height: 100vh;
}

.header {
    width: 100%;
    background: linear-gradient(90deg, #2563eb 65%, #1e40af 100%);
    color: #fff;
    padding: 22px 28px 18px 32px;
    font-size: 2em;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 34px;
    box-shadow: 0 3px 18px #2563eb23;
    border-radius: 0 0 16px 16px;
}

.app-title {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1.05em;
}

.main-nav {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.main-nav button {
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 1.02em;
    padding: 9px 18px;
    border: none;
    margin-right: 0;
    margin-bottom: 3px;
    transition: background 0.16s, box-shadow 0.16s, transform 0.13s;
    box-shadow: 0 2px 8px #2563eb17;
    cursor: pointer;
}

.main-nav button:hover,
button:focus {
    background: #1e40af;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 20px #2563eb33;
}

#main button[onclick*='logout'] {
    background: #e11d48 !important;
    color: #fff;
    border-radius: 8px;
    font-weight: bold;
    padding: 8px 15px;
    float: right;
    margin-top: -5px;
    margin-left: 16px;
    box-shadow: 0 2px 10px #e11d4822;
    transition: background 0.16s;
}
#main button[onclick*='logout']:hover {
    background: #be123c !important;
}

.section {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px #2563eb19;
    padding: 30px 36px 22px 36px;
    transition: box-shadow 0.18s;
}

h2, h3, h4 {
    color: #2563eb;
    font-weight: 700;
    text-shadow: 0 2px 8px #2563eb0a;
    margin-bottom: 22px;
    margin-top: 0;
    letter-spacing: 0.5px;
}

label {
    display: inline-block;
    width: 162px;
    min-width: 80px;
    font-weight: 500;
    color: #293d63;
    vertical-align: top;
    margin-bottom: 3px;
}

input, select, button {
    margin: 7px 0 15px 0;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #a6b1c2;
    font-size: 1em;
    font-family: inherit;
    outline: none;
    transition: border 0.15s, box-shadow 0.15s;
}

input[type="number"] {
    width: 110px;
}

input:focus, select:focus, button:focus {
    border: 1.6px solid #2563eb;
    box-shadow: 0 1px 6px #2563eb22;
    background: #f2f7ff;
}

input[type="date"] {
    width: 130px;
}

.hidden {
    display: none !important;
}

#output, .output {
    color: #d90429;
    margin-top: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

canvas {
    display: block;
    margin-top: 22px;
    background: #f8fafc;
    border-radius: 8px;
    box-shadow: 0 2px 10px #2563eb13;
}

/* Table / listes de données */
table, .list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    background: #fafdff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.99em;
    box-shadow: 0 1px 5px #2563eb13;
}

th, td {
    padding: 10px 13px;
    text-align: left;
}

th {
    background: #e0e7ff;
    color: #2563eb;
    font-weight: 700;
    border-bottom: 2px solid #2563eb19;
}

tr:nth-child(even) {
    background: #f6f8fb;
}

.edit-btn, .delete-btn {
    font-size: 0.98em;
    padding: 7px 13px;
    border-radius: 7px;
    font-weight: 600;
    border: none;
    margin-right: 7px;
    margin-top: 0;
    box-shadow: 0 2px 8px #2563eb11;
}

.edit-btn {
    background: #fbfb24;
    color: #333;
}
.edit-btn:hover {
    background: #fde047;
}

.delete-btn {
    background: #ef4444;
    color: #fff;
}
.delete-btn:hover {
    background: #dc2626;
}

input[type="submit"], input[type="button"] {
    background: #2563eb;
    color: #fff;
    border-radius: 7px;
    font-weight: bold;
    transition: background 0.16s;
}

input[type="submit"]:hover, input[type="button"]:hover {
    background: #1e40af;
}

/* Responsive - mobile first tweaks */
@media (max-width: 700px) {
    body { max-width: 100vw; padding: 8px; }
    .header { font-size: 1.28em; padding: 13px 8px 12px 12px; }
    .main-nav { flex-direction: column; gap: 6px 0; }
    .main-nav button { min-width: 80vw; font-size: 1.06em; }
    .section { padding: 12px 3vw 9px 3vw; }
    label { width: 90px; font-size: 0.96em; }
    th, td { font-size: 0.95em; padding: 6px 5px; }
    input, select { font-size: 0.96em; width: 92vw !important; max-width: 98vw; }
}

/* Light fade for section hover */
.section:hover {
    box-shadow: 0 8px 24px #2563eb2f;
}

::-webkit-input-placeholder { color: #b4b8be; }
::-moz-placeholder { color: #b4b8be; }
:-ms-input-placeholder { color: #b4b8be; }
::placeholder { color: #b4b8be; }
.table-stock {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 1px 8px #2563eb12;
    overflow: hidden;
}
.table-stock th, .table-stock td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
}
.table-stock th {
    background: #2563eb;
    color: #fff;
}
.table-stock tr:last-child td {
    border-bottom: none;
}
.treso-info {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 16px;
}
.treso-info > div {
    background: #f1f6fe;
    border-radius: 7px;
    padding: 10px 16px;
    font-size: 1.05em;
    min-width: 180px;
    box-shadow: 0 1px 5px #2563eb18;
}
