/* Administration APEL — surcharge d'Administrate, même palette que la boutique. */
:root {
  --green-900: #213529; --green-700: #2f4a3e; --green-100: #e4e9dd;
  --red-600: #a3472b; --gold-500: #c08a3e; --gold-100: #f2e4c6;
  --bg: #f3ebdd; --ink: #26302a; --muted: #666b5e; --line: #e0d5c1;
}
body { background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--green-700); }
h1, h2, h3 { font-family: Georgia, "Iowan Old Style", serif; color: var(--green-900); }
.muted { color: var(--muted); }

/* Mise en page : barre latérale + contenu */
.app-container { display: flex; min-height: 100vh; max-width: none; padding: 0; margin: 0; }
.navigation { flex: 0 0 15rem; width: 15rem; background: var(--green-900); color: #fff; padding: 1.2rem .9rem; display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.navigation__brand { font: 700 1.3rem Georgia, serif; padding: 0 .6rem; }
.navigation__brand small { display: block; font: 500 .72rem sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-500); }
.navigation__title { margin: 0 0 .3rem; padding: 0 .6rem; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.navigation__link, .navigation form { display: block; }
.navigation__link { margin: 0 !important; padding: .5rem .6rem; border-radius: 8px; color: rgba(255,255,255,.85); font-size: .92rem; line-height: 1.3; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
.navigation__link:hover { background: rgba(255,255,255,.1); color: #fff; }
.navigation__link--active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold-500); }
.navigation__foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.15); padding-top: .8rem; }
.main-content { flex: 1; min-width: 0; padding: 1.8rem 2.2rem 3rem; }
.main-content__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; padding: 0; }
.main-content__page-title { margin: 0; font-size: 1.7rem; }
.main-content__body { padding: 0; max-width: none; }

/* Panneaux, tableaux */
.panel, .main-content__body > table, .main-content__body > form + table { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(15,61,44,.05); }
.panel { padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; overflow-x: auto; }
.panel--flush { padding: 0; }
.panel__title { font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
th { background: #faf8f3; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
th a { color: inherit; text-decoration: none; }
td { padding: .75rem 1rem; border-bottom: 1px solid #f0ece2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfbf7; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.row--done td { opacity: .55; }

/* Boutons, formulaires */
.button, input[type=submit], button[type=submit], .navigation + * .button { background: #2f4a3e; color: #f3ebdd; border: 0; border-radius: 8px; padding: .55rem 1rem; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s; }
.button:hover, input[type=submit]:hover, button[type=submit]:hover { background: #213529; color: #f3ebdd; }
.button--alt { background: #fff; color: var(--green-700); border: 1px solid var(--line); }
.button--alt:hover { background: var(--green-100); color: var(--green-900); }
.button--danger { background: #b3243b; color: #fff; }
.button--danger:hover { background: #951d31; color: #fff; }
input[type=text], input[type=search], input[type=email], input[type=number], input[type=password], input[type=date], input[type=datetime-local], select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; background: #fff; font: inherit; min-height: 2.4rem; }
input:focus, select:focus, textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px var(--green-100); outline: 0; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar input[type=search] { flex: 1; min-width: 14rem; }
.search input { border-radius: 8px; }

/* Fiches / formulaires Administrate */
.attribute-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.attribute-data { margin-bottom: 1rem; }
.main-content__body dl, .main-content__body form fieldset { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.4rem; }
.field-unit label { font-weight: 600; }
.form-actions { margin-top: 1rem; }

/* Flashes, pastilles, KPI, cartes */
.flash { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.flash-notice { background: var(--green-100); color: var(--green-900); }
.flash-alert, .flash-error, .flash.alert { background: #fbe4e7; color: #7a1626; }
.notice { background: var(--gold-100); color: #6b4a14; border-radius: 10px; padding: .8rem 1rem; }
.pill { font: 600 .72rem sans-serif; letter-spacing: .04em; text-transform: uppercase; background: var(--green-100); color: var(--green-900); padding: .2rem .6rem; border-radius: 999px; }
.pill--ok { background: var(--green-100); } .pill--alert { background: var(--red-600); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin: .4rem 0 1.2rem; }
.kpi { background: var(--bg); border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; }
.kpi__value { font: 700 1.7rem Georgia, serif; color: var(--green-900); }
.kpi__label { font-size: .78rem; color: var(--muted); }
.kpi--money { background: var(--green-900); } .kpi--money .kpi__value, .kpi--money .kpi__label { color: #fff; }
.kpi--alert { background: #fbe4e7; } .kpi--alert .kpi__value { color: var(--red-600); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--ink); }
a.card:hover { border-color: var(--green-700); box-shadow: 0 4px 14px rgba(15,61,44,.1); }
.card span { color: var(--muted); font-size: .9rem; }
.order-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }

/* Mobile : la barre latérale passe en haut */
@media (max-width: 800px) {
  .app-container { flex-direction: column; }
  .navigation { position: static; width: 100%; height: auto; flex-basis: auto; flex-direction: row; flex-wrap: wrap; gap: .8rem 1.2rem; }
  .navigation__foot { margin: 0; border: 0; padding: 0; display: flex; }
  .main-content { padding: 1.2rem 1rem 2rem; }
  table { display: block; overflow-x: auto; }
}

/* Fiche commande : pensée pour la remise au retrait */
.pill--warn { background: #f2e4c6; color: #6b4a14; }
.pill--off { background: #e6e3dc; color: #5b5f55; }
.handover__top { display: grid; grid-template-columns: 1fr 14rem; gap: 1rem; margin-bottom: 1.4rem; }
.handover__buyer h2 { margin: .5rem 0 .1rem; font-size: 1.6rem; }
.handover__facts { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1rem 0 0; }
.handover__facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.handover__facts dd { margin: 0; font-weight: 700; }
.handover__progress { display: flex; flex-direction: column; justify-content: center; gap: .2rem; text-align: center; }
.handover__progress .kpi__value { font-size: 2.4rem; }
.bar { height: .5rem; background: var(--green-100); border-radius: 99px; overflow: hidden; margin-top: .6rem; }
.bar span { display: block; height: 100%; background: var(--green-700); }
.handover__title { margin: 0 0 .8rem; }
.handover__items { display: grid; gap: .8rem; margin-bottom: 1.4rem; }
.hitem { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--gold-500); border-radius: 14px; padding: 1rem 1.3rem; }
.hitem--done { border-left-color: var(--green-700); background: #f6f8f2; opacity: .75; }
.hitem__what { font-size: 1.15rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.hitem__qty { font: 800 1.5rem Georgia, serif; color: var(--green-900); }
.hitem__perso { margin: .4rem 0; padding: .4rem .7rem; background: var(--gold-100); border-radius: 8px; display: inline-block; font-size: 1.05rem; }
.hitem__who { margin: .2rem 0; font-size: 1.05rem; }
.hitem__action { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex-shrink: 0; }
.button--big { padding: .9rem 1.6rem; font-size: 1.05rem; }
.handover__tech { margin-top: 1.2rem; }
.handover__tech summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.handover__tech dl { display: grid; grid-template-columns: 11rem 1fr; gap: .3rem 1rem; margin: 1rem 0; }
.handover__tech dt { color: var(--muted); } .handover__tech dd { margin: 0; word-break: break-all; }
@media (max-width: 800px) { .handover__top { grid-template-columns: 1fr; } .hitem { flex-direction: column; align-items: stretch; } .hitem__action { align-items: stretch; } .button--big { width: 100%; } }
.handover__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.handover__head .handover__title { margin: 0; }
