/* ==========================================================================
   KARTA - Tunnel de commande v2 (order/index.php, order/confirmation.php)
   Même langage que la landing : sombre, accent lime unique, Clash + Satoshi
   ========================================================================== */

:root {
    --bg: #0a0a0b;
    --bg-2: #111113;
    --bg-3: #18181b;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --text: #f4f4f1;
    --muted: #a1a19b;
    --subtle: #77776f;
    --accent: #d4ff3f;
    --accent-ink: #0c0f02;
    --accent-soft: rgba(212, 255, 63, .12);
    --danger: #ff6b57;
    --f-display: 'Clash Display', 'Satoshi', system-ui, sans-serif;
    --f-body: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --r: 20px;
    --r-field: 14px;
    --ease: cubic-bezier(.16, 1, .3, 1);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg); color: var(--text);
    font-family: var(--f-body); font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ol, ul { list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.is-accent { color: var(--accent); }

/* ---------- Fond ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg__blob { position: absolute; border-radius: 50%; will-change: transform; }
.bg__blob--1 {
    width: 64vmax; height: 64vmax; right: -22vmax; top: -26vmax;
    background: radial-gradient(closest-side, rgba(212, 255, 63, .12), rgba(212, 255, 63, .04) 50%, transparent 72%);
    animation: oblob1 36s ease-in-out infinite alternate;
}
.bg__blob--2 {
    width: 74vmax; height: 74vmax; left: -24vmax; bottom: -38vmax;
    background: radial-gradient(closest-side, rgba(38, 110, 72, .24), rgba(38, 110, 72, .07) 50%, transparent 72%);
    animation: oblob2 44s ease-in-out infinite alternate;
}
@keyframes oblob1 { to { transform: translate3d(-14vw, 12vh, 0) scale(1.12); } }
@keyframes oblob2 { to { transform: translate3d(18vw, -10vh, 0) scale(.92); } }
.bg__dots {
    position: absolute; inset: 0; background-size: 28px 28px; background-position: center;
    background-image: radial-gradient(rgba(255, 255, 255, .11) 1px, transparent 1.5px);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 85%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 85%);
}
.grain {
    position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Boutons ---------- */
.btn {
    --pad-y: 14px; --pad-x: 24px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: var(--pad-y) var(--pad-x); border-radius: 999px;
    font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap;
    transition: transform .5s var(--ease), background-color .3s, color .3s, border-color .3s, box-shadow .4s var(--ease), opacity .3s;
}
.btn i { font-size: 1.15em; transition: transform .45s var(--ease); }
.btn:hover i.ph-arrow-right { transform: translateX(4px); }
.btn:hover i.ph-arrow-left { transform: translateX(-4px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn--sm { --pad-y: 11px; --pad-x: 18px; font-size: 14px; }
.btn--lg { --pad-y: 18px; --pad-x: 30px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { box-shadow: 0 10px 40px -10px rgba(212, 255, 63, .55); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); background: rgba(255, 255, 255, .02); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .01em; line-height: 1.3;
    border: 1px solid var(--line-2); color: var(--muted);
}
.pill--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.brand__mark i { font-size: 18px; transform: rotate(90deg); }
.brand__word { font-family: var(--f-display); font-weight: 600; font-size: 24px; letter-spacing: -.03em; }

/* ==========================================================================
   EN-TÊTE ET ÉTAPES
   ========================================================================== */
.onav {
    position: sticky; top: 0; z-index: 40;
    background: rgba(10, 10, 11, .72);
    backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
}
.onav__in {
    max-width: 1240px; margin-inline: auto; padding: 0 clamp(16px, 4vw, 40px);
    height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.onav__secure { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.onav__secure i { color: var(--accent); font-size: 17px; }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper__sep { width: 28px; height: 1px; background: var(--line-2); }
.stepper__item button { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; transition: background-color .25s; }
.stepper__item button:hover { background: rgba(255, 255, 255, .05); }
.stepper__n {
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    font-size: 13px; font-weight: 700; border: 1px solid var(--line-2); color: var(--muted);
    transition: background-color .35s var(--ease), color .35s, border-color .35s;
}
.stepper__l { font-size: 14px; font-weight: 600; color: var(--muted); transition: color .3s; }
.stepper__item.is-active .stepper__n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stepper__item.is-active .stepper__l { color: var(--text); }
.stepper__item.is-done .stepper__n { background: var(--accent-soft); border-color: rgba(212, 255, 63, .4); color: var(--accent); font-size: 0; }
.stepper__item.is-done .stepper__n::before { content: ""; width: 11px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(-45deg); }
.stepper__item.is-done .stepper__l { color: var(--text); }

/* ==========================================================================
   STRUCTURE
   ========================================================================== */
.owrap { position: relative; z-index: 1; max-width: 1240px; margin-inline: auto; padding: 40px clamp(16px, 4vw, 40px) 96px; }
.ohead { margin-bottom: 36px; }
.ohead__back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 22px; transition: color .2s; }
.ohead__back:hover { color: var(--text); }
.ohead__title {
    font-family: var(--f-display); font-weight: 600;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.02; letter-spacing: -.025em;
    text-wrap: balance;
}
.ohead__lead { margin-top: 12px; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.12rem); max-width: 52ch; }
.ohead__offer {
    margin-top: 18px; display: inline-block;
    padding: 9px 16px; border-radius: 18px; font-size: 14px; line-height: 1.45;
    background: var(--accent-soft); border: 1px solid rgba(212, 255, 63, .3); color: var(--text);
}
.ohead__offer i { color: var(--accent); font-size: 17px; vertical-align: -3px; margin-right: 4px; }

.oalert {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px;
    padding: 14px 18px; border-radius: 16px; font-size: 15px;
    background: rgba(255, 107, 87, .1); border: 1px solid rgba(255, 107, 87, .35); color: #ffd6cf;
}
.oalert i { color: var(--danger); font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.ogrid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }

/* ==========================================================================
   ÉTAPES
   ========================================================================== */
.oform { min-width: 0; }
.ostep {
    display: none;
    background: rgba(17, 17, 19, .6);
    border: 1px solid var(--line); border-radius: 24px;
    padding: clamp(20px, 3vw, 36px);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ostep.is-active { display: block; animation: ostepIn .6s var(--ease) both; }
@keyframes ostepIn { from { opacity: 0; transform: translateY(14px); } }
.ostep__head { margin-bottom: 26px; }
.ostep__k { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ostep__title { margin-top: 6px; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.02em; line-height: 1.1; }
.ostep__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line);
}
.ostep__note { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.ostep__note i { color: var(--accent); font-size: 17px; }
.ostep__legal { margin-top: 14px; font-size: 13px; color: var(--subtle); text-align: right; }

.oblock { margin-top: 30px; }
.oblock__title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.oblock__hint { font-size: 14px; font-weight: 500; color: var(--muted); }
.orow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.orow--wide { grid-template-columns: 1.25fr 1fr; }
.orow--tight { margin-top: 0; }

/* ---------- Modèles ---------- */
.models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.model {
    position: relative; display: flex; flex-direction: column; cursor: pointer;
    border-radius: var(--r); overflow: hidden;
    background: var(--bg-2); border: 1px solid var(--line);
    transition: border-color .3s, transform .5s var(--ease), box-shadow .4s var(--ease);
}
.model:hover { border-color: var(--line-2); transform: translateY(-3px); }
.model input { position: absolute; opacity: 0; pointer-events: none; }
.model:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.model.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 60px -30px rgba(212, 255, 63, .45); }
.model__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0e0e10; }
.model__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.model:hover .model__media img { transform: scale(1.05); }
.model__badge {
    position: absolute; left: 12px; top: 12px;
    padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: rgba(10, 10, 11, .7); border: 1px solid var(--line-2);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.model__check {
    position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; font-size: 15px;
    background: rgba(10, 10, 11, .6); border: 1px solid var(--line-2); color: transparent;
    transition: background-color .3s, color .3s, transform .5s var(--ease);
    transform: scale(.85);
}
.model.is-selected .model__check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1); }
.model__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.model__name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.model__desc {
    font-size: 13.5px; color: var(--muted); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.model__price { margin-top: auto; padding-top: 10px; font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.model.is-selected .model__price { color: var(--accent); }

/* ---------- Champs ---------- */
.field { position: relative; margin-bottom: 14px; }
.field__input {
    width: 100%; height: 60px; padding: 24px 16px 8px;
    border-radius: var(--r-field);
    background: rgba(10, 10, 11, .55); border: 1px solid var(--line-2);
    color: var(--text); font-size: 16px; font-weight: 500;
    transition: border-color .25s, background-color .25s, box-shadow .25s;
    -webkit-appearance: none; appearance: none;
}
textarea.field__input { height: auto; min-height: 104px; padding-top: 28px; resize: vertical; line-height: 1.5; }
.field__input:hover { border-color: rgba(255, 255, 255, .24); }
.field__input:focus { outline: none; border-color: var(--accent); background: rgba(10, 10, 11, .85); box-shadow: 0 0 0 4px rgba(212, 255, 63, .12); }
.field__input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 60px #121214 inset; caret-color: var(--text); }
.field__label {
    position: absolute; left: 17px; top: 19px;
    font-size: 15px; color: var(--muted); pointer-events: none;
    transform-origin: left top; transition: transform .3s var(--ease), color .25s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 40px);
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label,
.field__input:-webkit-autofill + .field__label,
.field--select .field__label { transform: translateY(-10px) scale(.78); }
.field__input:focus + .field__label { color: var(--accent); }
.field--select .field__input { padding-right: 44px; cursor: pointer; }
.field--select option { background: #151517; color: var(--text); }
.field__caret { position: absolute; right: 16px; top: 21px; font-size: 17px; color: var(--muted); pointer-events: none; }
.field.is-invalid .field__input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 87, .14); animation: oshake .4s; }
.field.is-invalid .field__label { color: var(--danger); }
@keyframes oshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Import de fichier ---------- */
.upload {
    position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
    padding: 12px 14px; border-radius: 16px; min-height: 68px;
    border: 1px dashed rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .02);
    transition: border-color .25s, background-color .25s;
}
.upload:hover { border-color: rgba(212, 255, 63, .5); background: rgba(212, 255, 63, .04); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.upload__icon { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-size: 21px; background: var(--bg-3); color: var(--accent); }
.upload__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.upload__txt strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload__txt small { font-size: 13px; color: var(--muted); }
.upload__action { font-size: 13px; font-weight: 700; color: var(--muted); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); }
.upload.is-filled { border-style: solid; border-color: rgba(212, 255, 63, .45); }
.upload.is-filled .upload__icon { background: var(--accent); color: var(--accent-ink); }

/* ---------- Interrupteur ---------- */
.switch {
    display: flex; align-items: center; gap: 14px; cursor: pointer;
    padding: 12px 14px; border-radius: 16px; min-height: 68px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { position: relative; width: 44px; height: 26px; border-radius: 999px; flex-shrink: 0; background: var(--bg-3); border: 1px solid var(--line-2); transition: background-color .3s, border-color .3s; }
.switch__thumb { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #d8d8d2; transition: transform .45s var(--ease), background-color .3s; }
.switch input:checked + .switch__track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch__txt { display: flex; flex-direction: column; }
.switch__txt strong { font-size: 15px; font-weight: 600; }
.switch__txt small { font-size: 13px; color: var(--muted); }

/* ---------- Quantité ---------- */
.qty { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }
.qty__ctrl { display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(10, 10, 11, .5); }
.qty__btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; transition: background-color .2s, color .2s; }
.qty__btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.qty__btn:disabled { opacity: .35; cursor: not-allowed; }
.qty__num { min-width: 44px; text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.tiers { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-width: 280px; }
.tier {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 8px 6px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
    transition: border-color .25s, background-color .25s, color .25s;
}
.tier strong { font-size: 14px; }
.tier span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tier:hover { border-color: var(--line-2); }
.tier.is-active { border-color: var(--accent); background: var(--accent-soft); }
.tier.is-active span { color: var(--accent); }

/* ---------- Choix (livraison, paiement) ---------- */
.choices { display: grid; gap: 12px; }
.choices--2 { grid-template-columns: 1fr 1fr; }
.choice {
    position: relative; display: flex; align-items: flex-start; gap: 14px; cursor: pointer;
    padding: 18px; border-radius: 18px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
    transition: border-color .25s, background-color .25s, box-shadow .35s var(--ease);
}
.choice:hover { border-color: var(--line-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.choice.is-selected { border-color: var(--accent); background: rgba(212, 255, 63, .05); box-shadow: 0 0 0 1px var(--accent); }
.choice__icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-size: 22px; background: var(--bg-3); color: var(--muted); transition: background-color .3s, color .3s; }
.choice.is-selected .choice__icon { background: var(--accent); color: var(--accent-ink); }
.choice__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.choice__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 16px; }
.choice__title strong { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.choice__desc { font-size: 14px; color: var(--muted); line-height: 1.45; }
.choice::after {
    content: ""; position: absolute; right: 18px; top: 18px; width: 20px; height: 20px; border-radius: 50%;
    border: 1.5px solid var(--line-2); transition: border-color .25s, border-width .25s;
}
.choice.is-selected::after { border: 6px solid var(--accent); }
.choice__title { padding-right: 30px; }

/* ---------- Virement ---------- */
.transfer { margin-top: 14px; padding: 18px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 10px; animation: ostepIn .5s var(--ease); }
.transfer__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.transfer__k { color: var(--muted); font-size: 14px; }
.copy {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 10px; font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 14.5px; letter-spacing: .02em;
    background: rgba(10, 10, 11, .6); border: 1px solid var(--line-2); transition: border-color .2s, color .2s;
}
.copy:hover { border-color: var(--accent); }
.copy i { color: var(--muted); font-size: 16px; }
.copy.is-copied { border-color: var(--accent); color: var(--accent); }
.copy.is-copied i { color: var(--accent); }
.upload--sm { margin-top: 4px; min-height: 60px; }

.recap { margin-top: 18px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); display: grid; gap: 8px; }
.recap__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.recap__row span { color: var(--muted); flex-shrink: 0; }
.recap__row strong { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* ==========================================================================
   COLONNE APERÇU
   ========================================================================== */
.oside__sticky { position: sticky; top: 96px; display: grid; gap: 16px; }

.preview {
    position: relative; padding: 34px 26px 18px; border-radius: 24px; overflow: hidden;
    background: radial-gradient(120% 90% at 50% 0%, rgba(212, 255, 63, .08), transparent 60%), rgba(17, 17, 19, .7);
    border: 1px solid var(--line);
    perspective: 1100px;
}
.pcard {
    --rx: 0deg; --ry: 0deg;
    position: relative; width: 100%; aspect-ratio: 1.586; cursor: pointer;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .6s var(--ease);
    transform-style: preserve-3d;
}
.pcard__inner {
    position: absolute; inset: 0; transform-style: preserve-3d;
    transition: transform .9s var(--ease);
}
.pcard.is-flipped .pcard__inner { transform: rotateY(180deg); }
.pcard.is-pop .pcard__inner { animation: opop .7s var(--ease); }
.pcard.is-flipped.is-pop .pcard__inner { animation: none; }
@keyframes opop { 40% { transform: scale(.95) rotateZ(-1.5deg); } }
.pcard__face {
    --ink: #ecece6; --ink-2: rgba(236, 236, 230, .6); --qr-bg: #f4f4f1; --qr-fg: #0a0a0b;
    position: absolute; inset: 0; border-radius: 16px; overflow: hidden;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    padding: 7% 7.5%; color: var(--ink);
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .08);
    background: #151517;
}
.pcard__face::after { /* reflet */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .07) 45%, transparent 60%);
}
.pcard__back { transform: rotateY(180deg); display: flex; align-items: center; gap: 7%; }
.pcard__front { display: flex; flex-direction: column; }
.pcard__top { display: flex; align-items: center; justify-content: space-between; }
.pcard__logo { display: flex; align-items: center; height: 30px; max-width: 60%; }
.pcard__logo img { max-height: 30px; max-width: 100%; object-fit: contain; }
.pcard__brand { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.pcard__brand i { transform: rotate(90deg); font-size: 16px; }
.pcard__nfc { font-size: 24px; transform: rotate(90deg); opacity: .8; }
.pcard__chip {
    width: 15%; aspect-ratio: 1.3; border-radius: 6px; margin-top: 8%;
    background: linear-gradient(135deg, #e9d18a, #a8873d 55%, #e2c67a);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
    opacity: .9;
}
.pcard__bottom { margin-top: auto; }
.pcard__name { font-family: var(--f-display); font-weight: 600; font-size: clamp(16px, 1.6vw, 21px); letter-spacing: -.01em; line-height: 1.15; overflow-wrap: anywhere; }
.pcard__sub { margin-top: 3px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); overflow-wrap: anywhere; }
.pcard__qr { width: 36%; aspect-ratio: 1; flex-shrink: 0; padding: 5%; border-radius: 10px; background: var(--qr-bg); }
.pcard__qr svg { width: 100%; height: 100%; fill: var(--qr-fg); display: block; }
.pcard__backtxt { display: flex; flex-direction: column; gap: 6px; }
.pcard__backtxt small { font-size: 12px; color: var(--ink-2); }

/* Finitions */
.pcard[data-finish="mat"] .pcard__face {
    background: radial-gradient(120% 120% at 0% 0%, #26262a, #121214 60%), #151517;
}
.pcard[data-finish="glossy"] .pcard__face {
    background:
        linear-gradient(125deg, rgba(255, 255, 255, .0) 20%, rgba(255, 255, 255, .16) 38%, rgba(255, 255, 255, 0) 52%),
        linear-gradient(160deg, #1c1c22, #050506 70%);
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(160, 200, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.pcard[data-finish="métal"] .pcard__face {
    --ink: #e8cc86; --ink-2: rgba(232, 204, 134, .7);
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px),
        linear-gradient(135deg, #3a3b40, #1b1c1f 45%, #2e2f34 70%, #151618);
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(232, 204, 134, .35);
}
.pcard[data-finish="bois"] .pcard__face {
    --ink: #2b1a0c; --ink-2: rgba(43, 26, 12, .7); --qr-bg: #2b1a0c; --qr-fg: #d7ae7b;
    background:
        repeating-radial-gradient(ellipse 140% 30% at 20% 120%, rgba(90, 50, 20, .0) 0 7px, rgba(90, 50, 20, .14) 8px 9px),
        linear-gradient(120deg, #d9b17f, #c0915d 50%, #d4a874);
}
.pcard[data-finish="bois"] .pcard__chip { display: none; }

.preview__flip {
    margin: 16px auto 0; display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
    transition: color .2s, background-color .2s;
}
.preview__flip:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

/* ---------- Récapitulatif ---------- */
.sum { padding: 22px; border-radius: 24px; background: rgba(17, 17, 19, .7); border: 1px solid var(--line); }
.sum__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 15px; color: var(--muted); }
.sum__row strong { color: var(--text); font-weight: 600; white-space: nowrap; }
.sum__row small { font-size: 13px; color: var(--subtle); }
.sum__row--item { color: var(--text); font-weight: 600; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.sum__row--disc, .sum__row--disc strong { color: var(--accent); }
.coupon { margin: 10px 0 4px; }
.coupon summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.coupon summary::-webkit-details-marker { display: none; }
.coupon summary:hover { color: var(--text); }
.coupon summary i { color: var(--accent); font-size: 17px; }
.coupon__row { display: flex; gap: 8px; margin-top: 10px; }
.coupon__input {
    flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 999px;
    background: rgba(10, 10, 11, .6); border: 1px solid var(--line-2);
    font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.coupon__input:focus { outline: none; border-color: var(--accent); }
.coupon__input::placeholder { color: var(--subtle); }
.coupon__msg { font-size: 13px; margin-top: 8px; }
.coupon__msg:empty { display: none; }
.coupon__msg.is-ok { color: var(--accent); }
.coupon__msg.is-err { color: var(--danger); }
.sum__total {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line);
    font-weight: 700;
}
.sum__total strong { font-family: var(--f-display); font-weight: 600; font-size: 32px; letter-spacing: -.02em; line-height: 1; }
.sum__cod { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.sum__cod i { color: var(--accent); font-size: 17px; }

.trust { display: grid; gap: 2px; padding: 8px 6px; }
.trust li { display: flex; align-items: center; gap: 12px; padding: 6px 0; font-size: 14px; color: var(--muted); }
.trust li i { font-size: 19px; color: var(--accent); flex-shrink: 0; }
.trust strong { color: var(--text); font-weight: 600; }

.wa {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .02); font-size: 14px; color: var(--muted);
    transition: border-color .25s, background-color .25s;
}
.wa strong { color: var(--text); }
.wa > i:first-child { font-size: 24px; color: #25d366; }
.wa > i:last-child { margin-left: auto; transition: transform .4s var(--ease); }
.wa:hover { border-color: rgba(37, 211, 102, .45); background: rgba(37, 211, 102, .05); }
.wa:hover > i:last-child { transform: translate(2px, -2px); }

/* ---------- Barre mobile ---------- */
.obar { display: none; }

/* ---------- Notifications ---------- */
.otoasts { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.otoast {
    display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 16px;
    background: #18181b; border: 1px solid var(--line-2); font-size: 14.5px;
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
    opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .5s var(--ease);
}
.otoast.is-in { opacity: 1; transform: none; }
.otoast i { font-size: 20px; flex-shrink: 0; }
.otoast--success i { color: var(--accent); }
.otoast--error i { color: var(--danger); }
.otoast--info i { color: var(--muted); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
    .ogrid { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
    .stepper__l { display: none; }
    .stepper__item.is-active .stepper__l { display: inline; }
}

@media (max-width: 900px) {
    .onav__secure span { display: none; }
    .owrap { padding-top: 28px; padding-bottom: 120px; }
    .ohead { margin-bottom: 24px; }
    .ohead__back { margin-bottom: 14px; }

    /* Une colonne : aperçu, puis étapes, puis total et réassurance */
    .ogrid { display: flex; flex-direction: column; gap: 16px; }
    .oside, .oside__sticky { display: contents; }
    .preview { order: 0; width: 100%; padding: 22px 18px 10px; }
    .pcard { max-width: 380px; margin-inline: auto; }
    .oform { order: 1; width: 100%; }
    .sum { order: 2; width: 100%; }
    .trust { order: 3; }
    .wa { order: 4; }

    .obar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: rgba(10, 10, 11, .86); border-top: 1px solid var(--line);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    }
    .obar__total { display: flex; flex-direction: column; line-height: 1.1; }
    .obar__total small { font-size: 12px; color: var(--muted); }
    .obar__total strong { font-family: var(--f-display); font-weight: 600; font-size: 22px; }
    .obar .btn { height: 48px; --pad-y: 0; }
    .otoasts { bottom: 96px; }
    .ostep__foot .btn--accent { display: none; }
    .ostep__foot { justify-content: flex-start; }
    .ostep__foot:not(:has(.btn--ghost)) { display: none; }
    .ostep__legal { text-align: left; }
}

@media (max-width: 640px) {
    .onav__in { height: 64px; gap: 12px; }
    .brand__word { font-size: 21px; }
    .stepper { gap: 4px; }
    .stepper__sep { width: 12px; }
    .stepper__item button { padding: 4px; }
    .stepper__item.is-active button { padding-right: 10px; }
    .stepper__l { font-size: 13px; }
    .onav__secure { display: none; }
    .models { grid-template-columns: 1fr 1fr; gap: 10px; }
    .model__body { padding: 12px; }
    .model__name { font-size: 14px; }
    .model__desc { display: none; }
    .model__price { font-size: 17px; padding-top: 6px; }
    .model__badge { font-size: 11px; left: 8px; top: 8px; padding: 4px 8px; }
    .model__check { right: 8px; top: 8px; width: 26px; height: 26px; }
    .orow, .orow--wide, .choices--2 { grid-template-columns: 1fr; gap: 0; }
    .orow--tight { gap: 10px; }
    .tiers { min-width: 0; flex: 1 1 100%; }
    .upload__action { display: none; }
    .qty__ctrl { margin-inline: auto; }
    .ostep { border-radius: 20px; }
    .choice { padding: 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   CONFIRMATION
   ========================================================================== */
.done { max-width: 1040px; }
.done__hero { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 20px 0 40px; }
.done__hero .ohead__lead { margin-inline: auto; }
.done__hero .ohead__title { margin-top: 8px; }
.done__check { width: 84px; height: 84px; margin-bottom: 22px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 10px rgba(212, 255, 63, .08), 0 20px 60px -10px rgba(212, 255, 63, .5); animation: odonePop .8s var(--ease) both; }
.done__check svg { width: 100%; height: 100%; }
.done__check circle { fill: none; }
.done__check path { fill: none; stroke: var(--accent-ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: odoneDraw .6s .45s var(--ease) forwards; }
@keyframes odonePop { from { transform: scale(.4); opacity: 0; } }
@keyframes odoneDraw { to { stroke-dashoffset: 0; } }
.done__num {
    margin-top: 22px; display: inline-flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(17, 17, 19, .7);
    font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 17px; font-weight: 600; letter-spacing: .04em;
    transition: border-color .2s, color .2s;
}
.done__num i { color: var(--muted); }
.done__num:hover, .done__num.is-copied { border-color: var(--accent); }
.done__num.is-copied i { color: var(--accent); }
.done__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.done__card { padding: clamp(20px, 3vw, 30px); border-radius: 24px; background: rgba(17, 17, 19, .65); border: 1px solid var(--line); }
.timeline { display: grid; }
.timeline__item { position: relative; display: flex; gap: 16px; padding-bottom: 22px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 42px; bottom: 4px; width: 1px; background: var(--line-2); }
.timeline__dot { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-size: 19px; background: var(--bg-3); color: var(--muted); }
.timeline__item.is-current .timeline__dot { background: var(--accent); color: var(--accent-ink); }
.timeline__item strong { display: block; font-size: 15.5px; margin-top: 2px; }
.timeline__item p { font-size: 14px; color: var(--muted); }
.done__product { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.done__product picture { width: 96px; flex-shrink: 0; }
.done__product img { width: 96px; height: 68px; object-fit: cover; border-radius: 12px; }
.done__product strong { display: block; font-size: 16px; line-height: 1.3; }
.done__product span { font-size: 14px; color: var(--muted); }
.done__list > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 14.5px; }
.done__list dt { color: var(--muted); flex-shrink: 0; }
.done__list dd { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.done__list .is-accent dt, .done__list .is-accent dd { color: var(--accent); }
.done__next {
    margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: clamp(22px, 3.4vw, 36px); border-radius: 24px;
    background: radial-gradient(120% 140% at 100% 0%, rgba(212, 255, 63, .12), transparent 55%), rgba(17, 17, 19, .7);
    border: 1px solid rgba(212, 255, 63, .22);
}
.done__next .ohead__lead { margin-top: 6px; font-size: 15.5px; }
.done__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.done__foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.done__foot .wa { flex: 1 1 320px; max-width: 480px; }
.done__foot .ohead__back { margin: 0; }
@media (max-width: 800px) {
    .done__grid { grid-template-columns: 1fr; }
    .done__ctas, .done__ctas .btn { width: 100%; }
    .owrap.done { padding-bottom: 60px; }
}

/* ==========================================================================
   ACCÈS À L'ESPACE CLIENT (en-tête)
   ========================================================================== */
.onav__end { display: flex; align-items: center; gap: 18px; }
.onav__account {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 5px 14px 5px 5px; border-radius: 999px;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
    font-size: 14px; font-weight: 600; color: var(--text);
    transition: border-color .25s, background-color .25s;
}
.onav__account:hover { border-color: rgba(212, 255, 63, .45); background: var(--accent-soft); }
.onav__account i { font-size: 15px; color: var(--muted); transition: transform .3s var(--ease), color .25s; }
.onav__account:hover i { transform: translateX(3px); color: var(--accent); }
.onav__avatar {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--accent-ink);
    font-family: var(--f-display); font-size: 14px; font-weight: 600;
}
.onav__login {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--muted);
    transition: color .25s, border-color .25s;
}
.onav__login i { font-size: 18px; }
.onav__login:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
@media (max-width: 1080px) {
    .ord:not(.ord--done) .onav__end .onav__secure { display: none; }
}
@media (max-width: 640px) {
    .onav__end { gap: 8px; }
    .onav__account { padding: 4px; }
    .onav__account-l, .onav__account i, .onav__login span { display: none; }
    .onav__login { padding: 8px; }
}
.stepper__l { white-space: nowrap; }
@media (max-width: 420px) {
    .ord:not(.ord--done) .onav .brand__word { display: none; }
    .stepper__sep { width: 8px; }
}
