/* Premium Bakery UI v5 — pastel, airy, fully responsive */
:root{
  --bg:#fbfaff;
  --panel:#ffffff;
  --text:#111827;
  --sub:#6b7280;
  --border:#e5e7eb;
  --shadow:0 10px 30px rgba(17,24,39,.08);
  --accent:#ec4899;     /* pink */
  --accent-2:#38bdf8;   /* sky */
  --accent-3:#f59e0b;   /* amber */
  --good:#22c55e;
  --warn:#f59e0b;
  --info:#2563eb;
  --danger:#ef4444;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,sans-serif;background:linear-gradient(180deg,#fff 0,#f8f7fc 60%,#fff);color:var(--text)}
header{display:flex;align-items:center;gap:1rem;justify-content:space-between;padding:1rem 1.25rem;background:#ffffffcc;backdrop-filter:saturate(140%) blur(6px);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:30}
h1{font-size:1.65rem;margin:0;letter-spacing:.2px}
nav a{color:var(--info);text-decoration:none;margin-right:1rem;font-weight:700}
nav a:hover{text-decoration:underline}

/* Plein écran partout avec padding latéral */
main{
  padding:1.2rem 0.8rem;
  max-width:none;
  margin:0;
  width:100%;
}

section{background:var(--panel);border:1px solid var(--border);border-radius:18px;padding:1rem 1.1rem;margin-bottom:1rem;box-shadow:var(--shadow)}
h2{font-size:1.12rem;margin:0 0 .75rem 0;color:#0f172a}
label{display:flex;flex-direction:column;gap:.38rem;margin:.55rem 0}
input,select,textarea,button{background:#fff;color:var(--text);border:1px solid var(--border);border-radius:14px;padding:.65rem;transition:box-shadow .15s ease, transform .02s ease}
input[type="file"]{padding:.4rem;background:transparent}
input:focus,select:focus,textarea:focus{outline:0;box-shadow:0 0 0 4px #dbeafe;border-color:#93c5fd}
button{cursor:pointer}
.form-actions{display:flex;align-items:center;gap:1rem;margin-top:.6rem}
.inline{display:inline-flex;gap:.6rem;align-items:center}
.table{width:100%;border-collapse:collapse;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#fff;box-shadow:var(--shadow)}
.table th,.table td{border-bottom:1px solid var(--border);padding:.7rem;text-align:left}
.table th{background:#f3f4f6;font-weight:700}

.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .6rem;border-radius:999px;border:1px solid var(--border);background:#f8fafc;font-size:.78rem}
.chip{display:inline-flex;align-items:center;gap:.35rem;padding:.22rem .56rem;border-radius:999px;font-size:.75rem;border:1px solid var(--border);background:#f9fafb}
.chip i{font-style:normal;opacity:.8}

/* Status color chips */
.chip.confirmee{background:#eff6ff;border-color:#bfdbfe;color:#1e3a8a}
.chip.en_production{background:#ecfeff;border-color:#a5f3fc;color:#0c4a6e}
.chip.decor{background:#fff7ed;border-color:#fed7aa;color:#7c2d12}
.chip.prete{background:#ecfdf5;border-color:#a7f3d0;color:#065f46}
.chip.livree{background:#f0fdf4;border-color:#bbf7d0;color:#14532d}

.btn{border-radius:12px;padding:.55rem .9rem;border:1px solid var(--border);background:#fff;cursor:pointer;font-weight:700;box-shadow:0 1px 0 rgba(0,0,0,.02)}
.btn:hover{transform:translateY(-1px)}
.btn-prim{background:var(--info);color:#fff;border-color:transparent}
.btn-good{background:var(--good);color:#fff;border-color:transparent}
.btn-warn{background:var(--warn);color:#fff;border-color:transparent}
.btn-ghost{background:#fff}
.btn-danger{background:var(--danger);color:#fff;border-color:transparent}

.toolbar{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center;margin:0 0 1rem 0}
.toolbar .search{flex:1;min-width:200px}
.statusbar{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.55rem}
.meta .tags{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:.25rem}

/* Kanban responsive full width */
.kanban{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px,1fr));
  gap:1rem;
  align-items:start;
  width:100%;
}
.col{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  padding:.9rem;
  box-shadow:var(--shadow);
}
.col h3{display:flex;align-items:center;justify-content:space-between;margin:.25rem .3rem .7rem;font-size:1.02rem;color:#0f172a}
.col h3 .count{font-weight:800;color:#0f172a;background:#f3f4f6;border:1px solid var(--border);border-radius:999px;padding:.12rem .45rem;font-size:.8rem}
.list{display:flex;flex-direction:column;gap:.6rem;min-height:60px}
.card{display:flex;gap:.9rem;background:#fff;border:1px solid var(--border);border-radius:16px;padding:.8rem;box-shadow:var(--shadow);transition:transform .06s ease}
.card:hover{transform:translateY(-2px)}
.card .photo{width:80px;height:80px;border-radius:12px;overflow:hidden;background:#f3f4f6;display:flex;align-items:center;justify-content:center;border:1px solid var(--border)}
.card img{width:100%;height:100%;object-fit:cover}
.placeholder{opacity:.5;font-size:1.3rem}
.line{font-size:.96rem}
.muted{color:var(--sub)}
.toast{position:fixed;left:50%;transform:translateX(-50%) translateY(8px);bottom:16px;background:#111827;color:#fff;padding:.7rem .9rem;border-radius:12px;box-shadow:var(--shadow);opacity:0;transition:all .2s ease;z-index:50}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width: 1220px){
  main{padding:.9rem .8rem}
}
@media (max-width: 640px){
  h1{font-size:1.35rem}
  .card{padding:.7rem}
  .card .photo{width:72px;height:72px}
  .toolbar .search{min-width:160px}

  /* Mobile : 1 colonne */
  .kanban {
    display:block;
  }
  .col {
    flex:none;
    width:100%;
    max-width:100%;
  }
}
.alert{padding:.5rem .7rem;border-radius:12px;background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12;box-shadow:0 1px 0 rgba(0,0,0,.02)}
.calc-row{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}

/* Badges personnalisés */
.chip-urgent { background:#ef4444; color:white; }
.chip-vip { background:#fbbf24; color:#111; font-weight:bold; }
.chip-allergen { background:#8b5cf6; color:white; }

/* ===== Page de connexion ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(180deg, #fdf2f8 0, #f8f7fc 60%, #fff);
  padding: 1rem;
}

.login-card {
  background: #fff;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.login-card label {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--text);
  display: block;
}

.login-card input {
  width: 100%;
  padding: .65rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: .95rem;
}

.login-card input:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px #dbeafe;
}

.login-card button {
  width: 100%;
  background: var(--info);
  color: #fff;
  border: none;
  padding: .7rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}

.login-card button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}
/* ===== Améliorations Kanban v2 ===== */

/* Bandeau statut en haut de la carte */
.card-header {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 10px 10px 0 0;
  margin: -0.8rem -0.8rem 0.6rem -0.8rem;
  color: #fff;
}

.card-header.confirmee { background:#3b82f6; }   /* bleu */
.card-header.en_production { background:#06b6d4; } /* cyan */
.card-header.decor { background:#f59e0b; }       /* orange */
.card-header.prete { background:#22c55e; }       /* vert */
.card-header.livree { background:#16a34a; }      /* vert foncé */

/* Drag effet */
.card.dragging {
  opacity: 0.85;
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,.15);
}

/* Badges icônes */
.badge-icon {
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  padding:.2rem .55rem;
  border-radius:999px;
  font-size:.75rem;
  font-weight:600;
  color:#fff;
}
.badge-urgent { background:#ef4444; }
.badge-vip { background:#fbbf24; color:#111; }
.badge-allergen { background:#8b5cf6; }

.current-day {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: .3rem;
  margin-bottom: .8rem;
  color: var(--info);
}

/* — Image Modal — */
.img-modal { border: none; padding: 0; background: transparent; max-width: 96vw; }
.img-modal::backdrop { background: rgba(17,24,39,.72); backdrop-filter: blur(2px); }
.img-modal__img { display:block; max-width:95vw; max-height:85vh; margin:0 auto; 
  object-fit:contain; border-radius:12px; box-shadow: var(--shadow); }
.img-modal__close {
  position: fixed; top: 1rem; right: 1rem; z-index: 2;
  border: 0; border-radius: 999px; width: 44px; height: 44px;
  font-size: 28px; line-height: 1; background: #fff; color: #111; cursor: pointer;
  box-shadow: var(--shadow);
}
.img-modal__toolbar { text-align:center; margin-top:.6rem; }
.img-modal__toolbar a { margin: 0 .5rem; color: var(--info); text-decoration: underline; }

.order-thumb-link { display:block; border-radius:8px; overflow:hidden; }
.order-thumb { width:100%; height:auto; display:block; object-fit:cover; }

