/* assets/style.css */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f5f5;
    color: #222;
    line-height: 1.6;
}

.container {
    max-width: 80%;
    margin: 0 auto;
    padding: 1.5rem;
}

.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.site-main {
    min-height: 70vh;
}

.site-footer {
    margin-top: 2rem;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.post {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

.post h3 {
    margin-bottom: 0.4rem;
    font-size: 1.2rem;
}

.post-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #fff;
}

.table th, .table td {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.btn {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    background: #1976d2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn:hover {
    opacity: 0.9;
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
}

.btn-danger {
    background: #d32f2f;
}

.main-nav {
    margin-top: 0.8rem;
    margin-bottom: 1.5rem;
}

.main-nav a {
    margin-right: 1rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.main-nav a:hover {
    text-decoration: underline;
}
.doc-line {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 5px;
}

.doc-type {
    font-weight: bold;
    width: 60px;
}

.doc-validity {
    color: #333;
    width: 170px;
}

.doc-status {
    padding: 6px 10px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    white-space: nowrap;
}

.btn.small {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
}

.btn.blue {
    background: #1976d2;
    color: white;
}

.btn.red {
    background: #d32f2f;
    color: white;
}

.btn.green {
    background: #2e7d32;
    color: white;
}

.doc-upload {
    margin: 5px 0 20px 0;
    padding: 10px;
    background: #fff;
}
.lot-block {
    background:#f7f7f7;
    padding:15px;
    margin-bottom:20px;
    border-radius:8px;
}

.table td, .table th {
    padding:8px;
}

/* --- Layout global full height --- */
html, body {
  height: 100%;
}

body {
  margin: 0;
}

/* Wrapper principal */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Zone centrale */
.site-main {
  flex: 1;                 /* prend toute la hauteur disponible */
  display: flex;
}

/* Le container interne reste normal */
.site-main > .container {
  flex: 1;
}

.main-nav a.nav-primary{
  font-weight: 800;
  color: #2563eb;
}

.main-nav a.nav-danger{
  font-weight: 800;
  color: #dc2626;
}



/* =====================================================
   NAV responsive (menu dépliable sur mobile)
   - nécessite le bouton .nav-toggle et .nav-links dans header.php
===================================================== */
.header-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.nav-toggle{
  display:none;
  border:1px solid #e0e0e0;
  background:#fff;
  border-radius:10px;
  padding:8px 10px;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}

.main-nav .nav-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.main-nav a{
  margin-right:0; /* on laisse gap gérer l'espacement */
  padding:6px 10px;
  border-radius:10px;
}

.main-nav a:hover{
  background:#f3f4f6;
  text-decoration:none;
}

@media (max-width:800px){
  /* largeur utile */
  .container{
    max-width:100%;
    padding:12px;
  }

  .nav-toggle{display:inline-flex; align-items:center; justify-content:center;}

  .main-nav{
    position:relative;
    margin-top:10px;
    margin-bottom:10px;
  }

  .main-nav .nav-links{
    display:none;
    flex-direction:column;
    gap:6px;
    background:#fff;
    border:1px solid #e0e0e0;
    border-radius:14px;
    padding:8px;
  }

  .main-nav.is-open .nav-links{
    display:flex;
  }

  .main-nav a{
    width:100%;
    justify-content:flex-start;
    padding:10px 12px;
  }
}
