/* ====== Espace admin ====== */
body.admin { background: linear-gradient(180deg, #f9dbe4, #fbeef2 40%, #fdf6f3); background-attachment: fixed; }
.a-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px; background: linear-gradient(90deg, var(--burgundy-dark), var(--wine)); color: #fff;
  box-shadow: 0 4px 16px rgba(60, 0, 20, .25);
}
.a-header h1 { font: 400 2rem var(--font-title); margin: 0; }
.a-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.a-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 20px 80px; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { font: 600 .95rem var(--font-ui); border: none; padding: 10px 18px; border-radius: 999px; cursor: pointer; background: #fff; color: var(--burgundy); box-shadow: 0 2px 8px rgba(120, 10, 40, .1); }
.tabs button.on { background: var(--burgundy); color: #fff; }
.panel { display: none; }
.panel.on { display: block; animation: v-fade .3s; }
.hint { color: #7a4a58; font-size: .9rem; margin: -6px 0 18px; }

/* Grille des jours */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.dcard {
  position: relative; text-align: left; border: none; cursor: pointer; font-family: var(--font-ui);
  background: #fff; border-radius: 16px; padding: 14px; min-height: 150px;
  box-shadow: 0 4px 14px rgba(120, 10, 40, .1); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 6px; border-top: 6px solid var(--pink-soft);
}
@media (hover: hover) { .dcard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(120, 10, 40, .18); } }
.dcard.filled { border-top-color: var(--burgundy); }
.dcard .n { font: 700 1.9rem var(--font-num); color: var(--burgundy); line-height: 1; }
.dcard .t { font-weight: 600; font-size: .92rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard .t.empty { color: #b48a96; font-weight: 400; font-style: italic; }
.dcard .badges { display: flex; flex-wrap: wrap; gap: 4px; font-size: .78rem; }
.dcard .badges span { background: #fbeef2; padding: 2px 8px; border-radius: 999px; }
.dcard .fx { font-size: 1.1rem; letter-spacing: 2px; }
.dcard .st { margin-top: auto; font-size: .76rem; color: #8a5a68; }
.dcard .st.ok { color: #2e7d4f; font-weight: 600; }

/* Tiroir d'édition */
.drawer-bg { position: fixed; inset: 0; background: rgba(40, 4, 16, .45); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-bg.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 101; width: min(720px, 100%);
  background: #fffaf8; box-shadow: -10px 0 40px rgba(40, 4, 16, .3);
  transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .9, .3, 1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer .d-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #f1d7df; }
.drawer .d-head h2 { margin: 0; flex: 1; font: 400 2.1rem var(--font-title); color: var(--burgundy); }
.drawer .d-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer .d-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid #f1d7df; background: #fff; }
.icon-btn { border: none; background: #fbeef2; color: var(--burgundy); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }

.field { margin-bottom: 18px; }
.field > label, .field > .lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--burgundy-dark); }
.field small { color: #8a5a68; font-weight: 400; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=date], textarea, select {
  width: 100%; font: 1rem var(--font-ui); padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid #efcbd6; background: #fff; color: var(--ink); outline: none; transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--wine); }
textarea { min-height: 150px; resize: vertical; font-family: var(--font-hand); font-size: 1.2rem; line-height: 1.45; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Choix d'animation */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice .c {
  display: block; height: 100%; padding: 10px 10px 10px 12px; border-radius: 12px; background: #fff;
  border: 2px solid #f1d7df; transition: border-color .15s, background .15s;
}
.choice .c b { display: block; font-size: .88rem; }
.choice .c i { font-style: normal; font-size: 1.4rem; display: block; }
.choice .c em { font-style: normal; font-size: .75rem; color: #8a5a68; display: block; margin-top: 2px; line-height: 1.3; }
.choice input:checked + .c { border-color: var(--burgundy); background: #fdf0f4; box-shadow: 0 0 0 3px rgba(156, 31, 69, .12); }
.choice input:focus-visible + .c { outline: 2px solid var(--gold); }

/* Médias */
.drop {
  border: 2px dashed #e7b3c3; border-radius: 14px; padding: 18px; text-align: center; color: #8a5a68;
  background: #fff; cursor: pointer; transition: background .15s, border-color .15s;
}
.drop.over { background: #fdf0f4; border-color: var(--wine); }
.drop b { color: var(--burgundy); }
.progress { height: 6px; border-radius: 6px; background: #f6dde5; overflow: hidden; margin-top: 10px; display: none; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--wine), var(--gold)); transition: width .2s; }
.mlist { display: grid; gap: 10px; margin-top: 12px; }
.mitem { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 2px 8px rgba(120, 10, 40, .08); }
.mitem .thumb { width: 84px; height: 64px; border-radius: 8px; background: #2a0612; display: grid; place-items: center; overflow: hidden; color: #fff; font-size: 1.6rem; }
.mitem .thumb img, .mitem .thumb video { width: 100%; height: 100%; object-fit: cover; }
.mitem .meta { min-width: 0; }
.mitem .meta .fn { font-size: .78rem; color: #8a5a68; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.mitem .meta input { padding: 6px 10px; font-size: .9rem; }
.mitem .ops { display: flex; flex-direction: column; gap: 4px; }
.mitem .ops button { width: 30px; height: 26px; border-radius: 8px; font-size: .8rem; }

/* Réglages */
.card { background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 4px 14px rgba(120, 10, 40, .08); margin-bottom: 18px; }
.card h3 { margin: 0 0 14px; font: 400 1.9rem var(--font-title); color: var(--burgundy); }
.upl { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.upl img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }

/* Suivi */
table.track { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
table.track th, table.track td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f6e1e8; font-size: .9rem; }
table.track th { background: #fbeef2; color: var(--burgundy-dark); }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; position: relative; z-index: 5; }
.login form { width: min(380px, 100%); background: #fffaf8; border-radius: 24px; padding: 30px; text-align: center; box-shadow: 0 20px 60px rgba(60, 0, 20, .35); }
.login h1 { font: 400 2.6rem var(--font-title); color: var(--burgundy); margin: 0 0 6px; }
.login p { color: #8a5a68; margin: 0 0 18px; }
.login .err { color: #c0213f; font-size: .9rem; min-height: 1.2em; margin: 8px 0; }
.login .btn { width: 100%; justify-content: center; margin-top: 6px; }

@media (max-width: 640px) {
  .a-wrap { padding: 16px 16px 80px; }
  .days { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .a-header h1 { font-size: 1.6rem; }
  .choices { grid-template-columns: 1fr 1fr; }
}
