@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

body {

    margin:0;
    padding:0;
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    background-color: #f7f7f9;
    width: 100svw;
    overflow-x: hidden;
}

a {
    
    color:inherit;

}

input {

    width: 100%;
    padding:10px;
    box-sizing: border-box;
    border: none;
    font-family: inherit;
    font-size:16px;
    border-radius:5px;
    border:1px solid #ccc;
    
}

input:focus {

    outline: none;

}

button {

    background-color: #0f172a;
    color:white;
    border:none;
    font-family: inherit;
    padding:10px;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
    font-size:18px;

}

select {

    width: 100%;
    padding:10px;
    box-sizing: border-box;
    border: none;
    font-family: inherit;
    font-size:16px;
    border-radius:5px;
    border:1px solid #ccc;

} 

textarea {

    width: 100%;
    padding:15px;
    box-sizing: border-box;
    border: none;
    font-family: inherit;
    font-size:18px;
    border: 1px solid #ccc;
    border-radius:5px;

}

textarea:focus {

    outline: none;

}

a {

    text-decoration: none;
    color: inherit;
}

nav {

    position: sticky;
    top: 0;
    width: 100%;
    border-bottom:1px solid #CCC;
    background-color: #f2efea;
}

.inner-nav {

    width: min(100%, 1600px);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-sizing: border-box;

}

.nav-ul {

    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;

}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}


main {

    width: min(100%, 1600px);
    margin: 0 auto;
    box-sizing: border-box;
    margin-top:30px;
    padding-left:20px;
    padding-right:20px;
    box-sizing: border-box;
    min-height:100svh;

}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* === Sidebar === */
.sidebar {
    min-width: 300px;
    background: #0f172a; /* bleu nuit */
    color: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.08);
    position: sticky; top: 0; height: 100vh; /* reste visible */
}
.sidebar-header {
    display: flex; align-items:center; gap:12px;
    padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-header img { width:40px; height:auto; }
.sidebar-header h1 { font-size: 20px; margin:0; font-weight:600; }

.sidebar-user {
    padding: 14px 18px; font-size: 14px; color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display:flex; align-items:center; justify-content:space-between; gap:8px;
    flex-wrap: wrap;
}
.sidebar-user a.logout {
    color:#fff; text-decoration:none; opacity:.9;
    display:flex; align-items:center; gap:8px;
    font-size:14px; border:1px solid rgba(255,255,255,.12);
    padding:6px 10px; border-radius:8px;
}
.sidebar-user a.logout:hover { background:rgba(255,255,255,.08); }

.nav-list {
    list-style:none; margin: 8px 0 16px; padding: 8px;
    display:flex; flex-direction: column; gap: 4px;
    overflow:auto;
}
.nav-list a {
    display:block; padding:10px 12px; border-radius:10px;
    text-decoration:none; color:#e2e8f0; font-size:15px;
}
.nav-list a:hover { background: rgba(255,255,255,.06); }
.nav-list a.active { background: #1d2a55; color:#fff; }

/* === Contenu principal === */
.content {
    flex: 1;
    min-width: 0; /* évite overflow */
}
.content-header {
    display:flex; align-items:center; justify-content:space-between;
    padding: 16px 20px; background: #fff; border-bottom:1px solid #e5e7eb;
    position: sticky; top: 0; z-index: 5;
}
.content-header h1 { font-size: 20px; margin:0; font-weight:600; }

.content-inner {
    padding: 20px;
    padding-right:40px; /* ton contenu commence ici */
}

/* === Mobile: sidebar repliable === */
.sidebar-toggle {
    display:none;
    background:#0f172a; color:#fff; border:none; border-radius:8px;
    padding:8px 12px; font-size:14px;
}
@media (max-width: 980px) {
    .sidebar {
    position: fixed; left:0; top:0; bottom:0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 50;
    }
    .sidebar.open { transform: translateX(0); }
    .backdrop {
    content:""; position: fixed; inset:0; background: rgba(0,0,0,.3);
    display:none; z-index: 40;
    }
    .backdrop.show { display:block; }
    .content-header .sidebar-toggle { display:inline-flex; align-items:center; gap:8px; }
    .content { margin-left: 0; } /* sur mobile, pas de marge latérale */
}

/* === Cards === */

.card-wrapper {

    display: flex;
    gap:20px;
    flex-wrap: wrap;

}

.card {

    background-color: white;
    padding:20px;
    border-radius:10px;
    box-sizing: border-box;
    
}

.card-full { width: 100%; }
.card-half { width: calc(50% - 10px); }
.card-third { width: calc(33.3333% - 13.3333px); }
.card-quarter { width: calc(25% - 15px); }

.card h3 {

    margin-top:0;
    margin-bottom:20px;
    font-weight: 500;
    font-size: 18px;

}

/* === Tables === */

.table {

    width: 100%;
    border-collapse: collapse;
    background: #fff;
    overflow: hidden;

}

.table thead {

    background-color: #0f172a;
    color: white;
    text-align: left;

}

.table th, .table td {

    padding: 12px 15px;
    border-bottom: 1px solid #ddd;

}

.table tr:last-child td {

    border-bottom:none;

}

.table > tr:nth-child(even) td {

    background-color: #f9f9f9;

}

.table tbody tr:hover {

    background-color: #f1f5f9;

}

/* === Forms === */

.form-inline {

    display: flex;
    gap:10px;
    align-items: center;
    width: 100%;

}

.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;margin-right:6px;}
.badge-success{background:#dcfce7;color:#166534;}
.badge-warn{background:#fef3c7;color:#92400e;}
.badge-error{background:#fee2e2;color:#991b1b;}
.badge-muted{background:#e5e7eb;color:#374151;}
.table th,.table td{white-space:nowrap;}
.table td[style*="white-space:normal"]{white-space:normal !important;}

/* === Import Page === */

.drop-zone {
  border: 2px dashed #3b82f6;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #6b7280;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.drop-zone.dragover { background:#eff6ff; border-color:#2563eb; }
.pairs-container {
  margin-top:20px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:16px;
}
.pair {
  border:1px solid #e5e7eb;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  display:flex;
  flex-direction:column;
}
.pair-header { padding:6px 10px; font-weight:600; font-size:14px; background:#f9fafb; border-bottom:1px solid #e5e7eb; }
.pair-images { display:flex; gap:8px; padding:8px; justify-content:center; align-items:center; }
.pair-images img { max-width:140px; max-height:140px; object-fit:contain; border:1px solid #ddd; border-radius:6px; }

/* Notifs */


  /* Conteneur en position absolute, centré horizontalement */
  #notif-root {
    position: absolute;     /* demandé */
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: max-content;
    max-width: min(92vw, 640px);
    pointer-events: none;   /* clics passent à travers sauf sur les toasts */
  }

  .toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
    background: #111827;    /* par défaut: sombre */
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
    border: 1px solid rgba(255,255,255,.08);
    max-width: 100%;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, filter .2s ease;
  }
  .toast.show {
    opacity: 1;
    transform: translateY(0);
  }
  .toast:hover { filter: brightness(1.05); }

  .toast .icon { font-size: 16px; opacity: .9; }
  .toast .msg { white-space: pre-wrap; word-break: break-word; }
  .toast .close {
    margin-left: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: .75;
  }
  .toast .close:hover { opacity: 1; }

  /* Variantes */
  .toast--success { background:#065f46; border-color:#10b981; }
  .toast--error   { background:#7f1d1d; border-color:#f87171; }
  .toast--warn    { background:#78350f; border-color:#fbbf24; }
  .toast--info    { background:#1e3a8a; border-color:#60a5fa; }

  /* Barre de durée (optionnelle) */
  .toast .bar {
    grid-column: 1 / -1;
    height: 3px;
    background: rgba(255,255,255,.25);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
  }
  .toast .bar > i {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left;
    background: rgba(255,255,255,.9);
    animation: toastProgress linear forwards;
  }
  @keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
  }