/* Rozen · Espace pro — d'après la maquette */
:root {
    --bg: #f7f9fb;
    --surface: #ffffff;
    --navy: #004a7c;
    --navy-deep: #003a63;
    --navy-soft: #5d8db5;
    --ink-soft: #6f8fac;
    --line: #e4ebf1;
    --field: #9fb6ca;
    --nav-active: #e6edf3;
    --accent: #e8552b;
    --warn-bg: #fdf1ea; --warn-line: #f5d3c2; --warn-ink: #e0632f;
    --ok-bg: #e9f6ef;   --ok-ink: #3a9d68;
    --err-bg: #fde9eb;  --err-ink: #df2f41;
    --info-bg: #eef4f9; --info-ink: #2f6c9b;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0, 74, 124, .04), 0 8px 24px rgba(0, 74, 124, .05);
    --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--navy); font: 400 15px/1.5 var(--font); }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Structure ---------- */
.app {
    display: grid; grid-template-columns: 265px 1fr; min-height: 100vh;
    background: linear-gradient(90deg, var(--surface) 264px, var(--line) 264px 265px, var(--bg) 265px);
}
.sidebar {
    background: var(--surface); border-right: 1px solid var(--line);
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
}
.sidebar__top { display: flex; align-items: center; justify-content: center; padding: 22px 20px 44px; }
.sidebar__logo img { width: 150px; }
.sidebar__toggle { display: none; }
.nav { display: flex; flex-direction: column; gap: 8px; padding-right: 16px; flex: 1; }
.nav__link {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    border-radius: 0 12px 12px 0; text-decoration: none;
    font: 500 11.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--navy);
    background: none; border: 0; cursor: pointer; width: 100%; text-align: left;
}
.nav__link:hover { background: #f1f5f8; }
.nav__link.is-active { background: var(--nav-active); }
.nav__link.is-active .icon { color: var(--accent); }
.nav__logout { margin-top: auto; padding-bottom: 24px; }
.nav__logout .nav__link { color: var(--ink-soft); }

.main { padding: 52px clamp(20px, 3vw, 48px) 64px; min-width: 0; }
.hello h1 { font-size: clamp(30px, 3.4vw, 50px); font-weight: 700; letter-spacing: -.02em; color: var(--navy); }
.hello__soft { color: var(--navy-soft); }
.banner {
    margin: 30px 0 0; padding: 10px 22px; border: 1px solid var(--warn-line); background: var(--warn-bg);
    border-radius: var(--radius-sm); color: var(--warn-ink); font-size: 12px; letter-spacing: .08em;
}
.main > .alert { margin-top: 16px; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 3vw, 48px); margin-top: 32px; }
.steps + .card { margin-top: 20px; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.card__title { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.card__foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.muted { color: var(--ink-soft); font-size: 13.5px; letter-spacing: .02em; }
.strong { font-weight: 500; }
.soft { color: var(--ink-soft); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; letter-spacing: .1em; }
.table th {
    text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
    padding: 0 12px 14px 0; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 16px 12px 16px 0; vertical-align: middle; color: var(--navy); }
.table tbody tr + tr td { border-top: 1px solid transparent; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td { border-top: 1px solid var(--line); font-weight: 700; padding-top: 18px; }
.table--orders td { padding-top: 13px; padding-bottom: 13px; }
.table--orders .ref { font-size: 15px; font-weight: 700; letter-spacing: .12em; color: #3f6f97; }
.table--orders .price { font-size: 15px; font-weight: 700; letter-spacing: .08em; color: #3f6f97; }
.table--orders tr[data-href] { cursor: pointer; }
.table--orders tr[data-href]:hover td { background: #fafcfd; }
.table .more { width: 40px; text-align: center; }
.table .more a { display: inline-flex; padding: 6px; color: var(--navy-soft); border-radius: 8px; }
.table .more a:hover { background: var(--nav-active); }
.table--contact td { font-size: 14px; letter-spacing: .03em; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); }
.table--contact tr:last-child td { border-bottom: 0; }
.sub { display: block; color: var(--ink-soft); font-size: 12.5px; margin-top: 3px; }
.link { color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--field); }
.link:hover { border-color: var(--navy); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 6px 16px; border-radius: 8px; font-size: 12px; font-weight: 500; letter-spacing: .08em; white-space: nowrap; }
.badge--warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge--ok   { background: var(--ok-bg);   color: var(--ok-ink); }
.badge--err  { background: var(--err-bg);  color: var(--err-ink); font-weight: 700; }
.badge--lg { font-size: 13px; padding: 8px 18px; }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.input {
    width: 100%; font: 400 15px/1.4 var(--font); color: var(--navy); background: #fff;
    border: 1px solid var(--field); border-radius: var(--radius-sm); padding: 11px 14px;
}
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 74, 124, .12); }
textarea.input { resize: vertical; min-height: 84px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: 14px; border: 1px solid transparent; cursor: pointer;
    font: 500 15px/1 var(--font); text-decoration: none; transition: background .15s;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-deep); }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--field); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--block { width: 100%; padding: 17px; }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.link-accent { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; letter-spacing: .04em; }

/* ---------- Alertes ---------- */
.alert { padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 20px; }
.alert ul { margin: 8px 0 0; padding-left: 18px; }
.alert--err  { background: var(--err-bg); color: #b4202f; }
.alert--ok   { background: var(--ok-bg); color: #2c7d52; }
.alert--info { background: var(--info-bg); color: var(--info-ink); }

/* ---------- Étapes de commande ---------- */
.steps { list-style: none; display: flex; gap: 8px; margin: 32px 0 0; padding: 0; flex-wrap: wrap; }
.steps__item {
    display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px;
    font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.steps__item span {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--field); font-size: 12px; letter-spacing: 0;
}
.steps__item.is-current { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }
.steps__item.is-current span { background: var(--navy); border-color: var(--navy); color: #fff; }
.steps__item.is-done span { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok-ink); }

/* ---------- Import ---------- */
.import { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 40px; }
.import__form { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.drop {
    position: relative; width: 100%; min-height: 230px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 30px;
    border: 1.5px dashed var(--field); border-radius: var(--radius); background: #fbfcfd; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.drop .icon { width: 34px; height: 34px; color: var(--navy-soft); }
.drop:hover, .drop.is-over { border-color: var(--navy); background: #f3f7fa; }
.drop.has-file { border-style: solid; border-color: var(--navy); background: #f3f7fa; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__title { font-size: 17px; font-weight: 500; word-break: break-word; }
.drop__hint { color: var(--ink-soft); font-size: 13px; }
.import__help { border-left: 1px solid var(--line); padding-left: 40px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cols { list-style: none; padding: 0; margin: 0; width: 100%; }
.cols li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cols em { font-style: normal; font-size: 12px; color: var(--ink-soft); letter-spacing: .04em; }

/* ---------- Vérification ---------- */
.totals { display: flex; gap: 12px; margin: 0; }
.totals div { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 18px; min-width: 96px; }
.totals dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.totals dd { margin: 4px 0 0; font-size: 20px; font-weight: 700; white-space: nowrap; }
.confirm { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.confirm__actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }

/* ---------- Confirmation ---------- */
.done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.done__mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-ink); display: grid; place-items: center; animation: pop .45s cubic-bezier(.2, .9, .3, 1.3) both; }
.done__mark .icon { width: 34px; height: 34px; stroke-width: 2.2; }
.done__title { font-size: 30px; font-weight: 700; }
.done__text { color: var(--navy-soft); max-width: 46ch; }
.mailnote { display: inline-flex; align-items: center; gap: 8px; background: var(--info-bg); color: var(--info-ink); padding: 8px 16px; border-radius: 999px; font-size: 13px; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; width: 100%; max-width: 820px; margin: 18px 0 8px; }
.summary div { background: var(--bg); padding: 16px; }
.summary dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.summary dd { margin: 6px 0 0; font-weight: 500; }
.done__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Mon compte ---------- */
.info { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.info__row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.info dt { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.info dd { margin: 0; font-weight: 500; letter-spacing: .03em; word-break: break-word; }

/* ---------- Divers ---------- */
.search { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: var(--radius-sm); padding: 0 16px; width: 240px; color: var(--ink-soft); }
.search input { border: 0; background: none; font: 400 15px var(--font); letter-spacing: .08em; color: var(--navy); padding: 12px 0; width: 100%; }
.search input:focus { outline: none; }
.search:focus-within { box-shadow: 0 0 0 2px rgba(0, 74, 124, .15); }
.empty { text-align: center; padding: 40px 0 20px; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--navy-soft); text-decoration: none; margin-bottom: 20px; }
.back:hover { color: var(--navy); }
.quote { background: var(--bg); border-left: 3px solid var(--navy-soft); padding: 12px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 24px; font-size: 14px; }

/* ---------- Connexion ---------- */
.auth__wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 64px 20px; }
.auth__logo { width: 210px; margin-bottom: 44px; }
.auth__card { width: 100%; max-width: 480px; margin: 0; padding: 48px; text-align: left; }
.auth__title { font-size: 30px; font-weight: 700; text-align: center; letter-spacing: -.01em; }
.auth__lead { text-align: center; color: var(--navy); font-weight: 300; font-size: 16px; letter-spacing: .08em; margin: 12px 0 30px; }
.auth__text { color: var(--navy-soft); margin-bottom: 28px; line-height: 1.6; }
.auth__text a { color: var(--navy); }
.auth__forgot { align-self: center; margin: -4px 0 14px; font-size: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .info { grid-template-columns: 1fr; }
    .import { grid-template-columns: 1fr; }
    .import__help { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
}
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: var(--bg); }
    .sidebar { position: sticky; height: auto; z-index: 10; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar__top { justify-content: space-between; padding: 12px 20px; }
    .sidebar__logo img { width: 104px; }
    .sidebar__toggle { display: inline-flex; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--navy); cursor: pointer; }
    .nav { display: none; padding: 0 12px 16px; }
    .nav.is-open { display: flex; }
    .nav__link { border-radius: 12px; }
    .nav__logout { margin-top: 8px; padding-bottom: 0; }
    .main { padding-top: 32px; }
    .search { width: 100%; }
    .info__row { grid-template-columns: 1fr; gap: 4px; }
    .totals { flex-wrap: wrap; }
    .auth__card { padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
