/* ================================
   VARIABLES CSS
================================ */

:root{
    --bg:#f6f7fb;
    --card:#ffffff;
    --txt:#1f2937;
    --headline:#6b7280;
    --b:#e5e7eb;
    --primary:#2563eb;
    --primary-700:#1d4ed8;
}


/* ================================
   BASE / STRUCTURE
================================ */

html,body{
    margin:0;
    background:var(--bg);
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
    color:var(--txt)
}

.container{
    max-width:940px;
    margin:16px auto;
    padding:0 12px;
}

.card{
    background:var(--card);
    border:1px solid var(--b);
    padding:20px;
}

h1{
    font-weight:700;
    text-align:center;
    margin:6px 0 18px
}


/* ================================
   LAYOUT (GRID / ROW)
================================ */

.row{
    display:grid;
    grid-template-columns:80px 200px 200px 200px 80px 80px 120px;
}

/* Alignement des cellules sauf top-bar */
.row:not(.top-bar) > * {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Cas particulier top-bar */
.row.top-bar > * {
    display: block;
}

.row.top-bar {
    margin-top: 30px;
    margin-bottom: 30px;
    margin-left: 15px;
}


/* ================================
   TEXTE / ELEMENTS VISUELS
================================ */

.headline{
    color:var(--headline);
    font-size:14px
}

.hr{
    height:1px;
    background:var(--b);
    margin:10px 0 12px;
}

.strong{
    font-weight:700
}

.note{
    margin-top:8px;
    color:var(--headline);
    font-size:13px
}


/* ================================
   CHIPS (indicateurs visuels)
================================ */

.chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:40px;
    padding:4px 8px;
    border-radius:810px;
    font-weight:700;
    font-size:12px
}

.chip.green{
    background:#dcfce7;
    color:#065f46
}

.chip.red{
    background:#fce6dc;
    color:#5c2014
}

.chip.gray{
    background:#e5e7eb;
    color:#374151
}


/* ================================
   INPUTS (contrôles utilisateur)
================================ */

input.num{
    width:100%;
    max-width:120px;
    text-align:center;
    padding:7px 8px;
    border:1px solid #d1d5db;
    border-radius:8px;
    background:white
}


/* ================================
   ACTIONS / BOUTONS / LIENS
================================ */

.btn-primary{
    background:var(--primary);
    color:white;
    border:1px solid var(--primary-700);
    padding:8px 16px;
    border-radius:10px;
    cursor:pointer;
    font-weight:700
}

.submit{
    margin-left:auto
}

.link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    margin-left:25px;
    height: 100%;
    display: inline-flex;
    align-items: center;
}


/* ================================
   FOOTER / ACTION BAR
================================ */

.footer{
    display:flex;
    gap:24px;
    align-items:center;
    margin-top:14px
}


/* ================================
   TOP BAR / FILTRE (contrôle UI)
================================ */

.row.top-bar .filter {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.row.top-bar label {
    font-weight: 600;
    font-size: 1.2rem;
    color: #2c3e50;
}

.row.top-bar select {
    padding: 6px 10px;
    font-size: 0.9rem;
    border-radius: 4px;
    border: 1px solid #c0c6cc;
    min-width: 200px;
}