/* =============================================================
   CommandeCI — Styles page demande (extrait de demande.php)
   NE PAS ajouter de CSS inline dans demande.php
   ============================================================= */

  /* ─── Reset & Tokens ─────────────────────────────────── */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg-deep:   #0A0907;
    --bg-dark:   #1C1917;
    --bg-mid:    #292524;
    --bg-light:  #FAFAF9;
    --bg-warm:   #F5F5F4;
    --gold:      #A16207;
    --gold-lt:   #D97706;
    --gold-pale: #FBBF24;
    --white:     #FFFFFF;
    --text-inv:  rgba(250,250,249,0.92);
    --text-dim:  rgba(250,250,249,0.5);
    --text-dark: #1C1917;
    --text-mid:  #57534E;
    --text-mute: #A8A29E;
    --bd-dark:   rgba(250,250,249,0.08);
    --bd-light:  #E7E5E4;
    --bd-mid:    #D6D3D1;
    --font-h:    'Montserrat', system-ui, sans-serif;
    --font-b:    'Montserrat', system-ui, sans-serif;
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  16px;
    --r-xl:  22px;
    --r-pill:999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.07);
  }

  html { scroll-behavior: smooth; }
  body {
    font-family: var(--font-b);
    background: var(--bg-light);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  a { text-decoration: none; color: inherit; }

  .container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 24px; }

  /* ─── Navbar (floating pill) ────────────────────────── */
  .nav {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: calc(100% - 40px);
    max-width: 920px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 10px 22px;
    background: rgba(10,9,7,.72);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid var(--bd-dark);
    border-radius: var(--r-pill);
    transition: background .3s, box-shadow .3s;
  }
  .nav.scrolled {
    background: rgba(10,9,7,.93);
    box-shadow: 0 6px 32px rgba(0,0,0,.45);
  }
  .nav__logo {
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -.01em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .nav__logo-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold-lt);
    flex-shrink: 0;
  }
  .nav__links {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
  }
  .nav__links a {
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: color .2s;
  }
  .nav__links a:hover { color: var(--white); }
  .nav__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border: 1px solid rgba(250,250,249,.18);
    color: var(--text-dim);
    font-size: .8rem;
    font-weight: 500;
    border-radius: var(--r-pill);
    transition: border-color .2s, color .2s;
    white-space: nowrap;
  }
  .nav__back:hover { border-color: rgba(250,250,249,.4); color: var(--white); }
  .nav__burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
  }
  .nav__burger span {
    display: block;
    width: 19px; height: 1.5px;
    background: var(--white);
    border-radius: 2px;
    transition: all .25s;
  }
  .nav__mobile {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    background: rgba(10,9,7,.97);
    border: 1px solid var(--bd-dark);
    border-radius: 18px;
    padding: 14px;
    gap: 4px;
  }
  .nav__mobile.open { display: flex; }
  .nav__mobile a {
    font-size: .9rem;
    color: var(--text-dim);
    padding: 10px 14px;
    border-radius: 10px;
    transition: background .2s, color .2s;
  }
  .nav__mobile a:hover { background: rgba(255,255,255,.05); color: var(--white); }
  @media (max-width: 780px) {
    .nav__links, .nav__back { display: none; }
    .nav__burger { display: flex; }
  }

  /* ─── Page Header ───────────────────────────────────── */
  .page-hero {
    position: relative;
    background: var(--bg-dark);
    padding: 120px 0 60px;
    overflow: hidden;
  }
  .page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 80% 50%, rgba(161,98,7,.12) 0%, transparent 65%),
      radial-gradient(ellipse 40% 60% at 10% 80%, rgba(161,98,7,.06) 0%, transparent 60%);
    pointer-events: none;
  }
  .page-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 36px;
  }
  .page-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-pale);
    margin-bottom: 12px;
  }
  .page-hero__label::before {
    content: '';
    display: block;
    width: 20px; height: 1px;
    background: var(--gold-pale);
  }
  .page-hero__title {
    font-family: var(--font-h);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 12px;
  }
  .page-hero__title em {
    font-style: italic;
    color: var(--gold-pale);
  }
  .page-hero__sub {
    font-size: .95rem;
    color: var(--text-dim);
    max-width: 560px;
    line-height: 1.65;
  }

  /* Steps indicator */
  .steps-track {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .steps-track::-webkit-scrollbar { display: none; }
  .step-item {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
  }
  .step-item__inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .step-num {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(250,250,249,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: all .3s;
  }
  .step-label {
    font-size: .75rem;
    font-weight: 500;
    color: var(--text-dim);
    white-space: nowrap;
    transition: color .3s;
  }
  .step-line {
    width: 40px; height: 1px;
    background: rgba(250,250,249,.12);
    flex-shrink: 0;
    margin: 0 6px;
  }
  .step-item--active .step-num {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
    box-shadow: 0 0 14px rgba(161,98,7,.5);
  }
  .step-item--active .step-label { color: var(--gold-pale); font-weight: 600; }
  @media (max-width: 600px) {
    .step-line { width: 20px; margin: 0 2px; }
    .step-label { font-size: .7rem; }
  }

  /* ─── Main layout ──────────────────────────────────── */
  .demande-layout {
    padding: 48px 0 80px;
    background: var(--bg-light);
  }
  .demande-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
  }
  @media (max-width: 900px) {
    .demande-grid { grid-template-columns: 1fr; }
    /* Sur mobile : l'aside reste APRÈS le formulaire (ordre DOM naturel),
       plus de sticky — le formulaire d'abord, les infos ensuite */
    .demande-aside {
      order: 2;
      position: static;
    }
    .demande-form-col {
      order: 1;
    }
  }

  /* ─── Form cards ────────────────────────────────────── */
  .form-card {
    background: var(--white);
    border: 1px solid var(--bd-light);
    border-radius: var(--r-xl);
    padding: 32px 32px 36px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .3s;
  }
  .form-card:hover { box-shadow: var(--shadow-md); }

  .form-card__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--bd-light);
  }
  .form-card__icon {
    width: 42px; height: 42px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
  }
  .form-card__title {
    font-family: var(--font-h);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
  }
  .form-card__sub {
    font-size: .85rem;
    color: var(--text-mid);
    line-height: 1.5;
  }

  /* ─── Form elements ─────────────────────────────────── */
  .form-group { margin-bottom: 22px; }
  .form-group:last-child { margin-bottom: 0; }

  .form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 7px;
    letter-spacing: .01em;
  }
  .required { color: var(--gold-lt); margin-left: 2px; }

  .form-control {
    width: 100%;
    padding: 11px 14px;
    font-family: var(--font-b);
    font-size: .9rem;
    color: var(--text-dark);
    background: var(--white);
    border: 1.5px solid var(--bd-light);
    border-radius: var(--r-md);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
  }
  .form-control::placeholder { color: var(--text-mute); }
  .form-control:focus {
    border-color: var(--gold-lt);
    box-shadow: 0 0 0 3px rgba(217,119,6,.12);
  }
  .form-control:invalid:not(:placeholder-shown) { border-color: #EF4444; }
  textarea.form-control { resize: vertical; min-height: 88px; }
  select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23A8A29E' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }

  .form-hint {
    display: block;
    font-size: .78rem;
    color: var(--text-mute);
    margin-top: 5px;
    line-height: 1.45;
  }
  .form-error {
    display: block;
    font-size: .78rem;
    color: #DC2626;
    margin-top: 5px;
    min-height: 1em;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  @media (max-width: 580px) {
    .form-row { grid-template-columns: 1fr; }
  }

  /* Input with addon (budget + devise) */
  .input-addon-wrap {
    display: flex;
    gap: 0;
  }
  .input-addon-wrap .form-control:first-child {
    border-radius: var(--r-md) 0 0 var(--r-md);
    border-right: none;
  }
  .input-addon-wrap .form-control:last-child {
    border-radius: 0 var(--r-md) var(--r-md) 0;
    flex: 0 0 110px;
    background: var(--bg-warm);
    color: var(--text-mid);
    font-size: .82rem;
  }

  /* Category selector grid */
  .cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 4px;
  }
  @media (max-width: 520px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
  }

  .cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 10px;
    background: var(--bg-warm);
    border: 1.5px solid var(--bd-light);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all .2s var(--ease-out);
    font-family: var(--font-b);
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-mid);
    text-align: center;
  }
  .cat-btn svg { color: var(--text-mute); transition: color .2s; }
  .cat-btn:hover {
    border-color: rgba(161,98,7,.3);
    background: #FFFBEB;
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(161,98,7,.08);
  }
  .cat-btn:hover svg { color: var(--gold); }
  .cat-btn.selected {
    border-color: var(--gold);
    background: #FFFBEB;
    color: var(--gold);
    box-shadow: 0 0 0 3px rgba(161,98,7,.12), 0 4px 14px rgba(161,98,7,.08);
  }
  .cat-btn.selected svg { color: var(--gold); }

  /* Upload zone */
  .upload-zone {
    position: relative;
    border: 2px dashed var(--bd-mid);
    border-radius: var(--r-lg);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
  }
  .upload-zone:hover, .upload-zone.dragover {
    border-color: var(--gold-lt);
    background: #FFFBEB;
  }
  .upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
  }
  .upload-zone__icon { color: var(--text-mute); margin: 0 auto 10px; }
  .upload-zone__text { font-size: .84rem; color: var(--text-mid); line-height: 1.5; }
  .upload-zone__text strong { color: var(--text-dark); }
  .upload-filename {
    font-size: .82rem;
    color: var(--gold);
    margin-top: 8px;
    display: none;
  }

  /* Checkbox */
  .checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
  }
  .checkbox-wrap input[type="checkbox"] {
    width: 17px; height: 17px;
    border: 1.5px solid var(--bd-mid);
    border-radius: 4px;
    accent-color: var(--gold);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .checkbox-wrap span {
    font-size: .84rem;
    color: var(--text-mid);
    line-height: 1.5;
  }
  .checkbox-wrap a { color: var(--gold-lt); text-decoration: underline; }

  /* Submit */
  .form-submit { margin-top: 8px; }
  .btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 28px;
    background: var(--gold);
    color: var(--white);
    font-family: var(--font-b);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    position: relative;
    overflow: hidden;
  }
  .btn-submit:hover {
    background: var(--gold-lt);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(161,98,7,.38);
  }
  .btn-submit:active { transform: translateY(0); }
  .btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
  .btn-submit .spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin .7s linear infinite;
  }
  .btn-submit.loading .spinner { display: block; }
  .btn-submit.loading .btn-text { display: none; }
  @keyframes spin { to { transform: rotate(360deg); } }

  .submit-note {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .79rem;
    color: var(--text-mute);
    margin-top: 12px;
    text-align: center;
    justify-content: center;
  }

  /* ─── Aside ─────────────────────────────────────────── */
  .demande-aside {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .aside-card {
    background: var(--white);
    border: 1px solid var(--bd-light);
    border-radius: var(--r-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
  }
  .aside-card--dark {
    background: var(--bg-dark);
    border-color: var(--bd-dark);
  }
  .aside-title {
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 18px;
  }
  .aside-card--dark .aside-title { color: var(--white); }

  .aside-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .aside-steps li {
    display: flex;
    gap: 14px;
    padding: 0 0 20px 0;
    position: relative;
  }
  .aside-steps li:last-child { padding-bottom: 0; }
  .aside-steps li::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 28px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--gold), transparent);
  }
  .aside-steps li:last-child::before { display: none; }
  .aside-step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 1px solid rgba(161,98,7,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
  }
  .aside-step-body strong {
    display: block;
    font-size: .83rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 3px;
  }
  .aside-step-body span {
    font-size: .78rem;
    color: var(--text-mute);
    line-height: 1.45;
  }

  .trust-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .trust-icon {
    width: 36px; height: 36px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(161,98,7,.15), rgba(161,98,7,.05));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
  }
  .trust-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--white);
  }
  .trust-text {
    font-size: .79rem;
    color: var(--text-dim);
    line-height: 1.5;
  }

  .btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(250,250,249,.06);
    border: 1px solid rgba(250,250,249,.14);
    border-radius: var(--r-md);
    color: var(--text-dim);
    font-size: .82rem;
    font-weight: 500;
    transition: background .2s, color .2s;
    cursor: pointer;
    text-decoration: none;
  }
  .btn-wa:hover { background: rgba(250,250,249,.1); color: var(--white); }

  /* ─── Toast ─────────────────────────────────────────── */
  .toast-wrap {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }
  .toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    background: var(--bg-dark);
    border: 1px solid var(--bd-dark);
    border-radius: var(--r-pill);
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    font-size: .86rem;
    color: var(--white);
    white-space: nowrap;
    pointer-events: all;
    animation: toastIn .35s var(--ease-out);
  }
  .toast.out { animation: toastOut .3s ease forwards; }
  .toast--success .toast-dot { background: #22C55E; }
  .toast--error   .toast-dot { background: #EF4444; }
  .toast--info    .toast-dot { background: var(--gold-pale); }
  .toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  @keyframes toastIn  { from { opacity:0; transform: translateY(12px) scale(.96); } to { opacity:1; transform: none; } }
  @keyframes toastOut { to   { opacity:0; transform: translateY(8px) scale(.95); } }

  /* ─── Footer ─────────────────────────────────────────── */
  .footer {
    background: var(--bg-dark);
    padding: 24px 0;
    border-top: 1px solid var(--bd-dark);
  }
  .footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .footer__logo {
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .footer__logo-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
  }
  .footer__copy {
    font-size: .77rem;
    color: var(--text-dim);
  }
  .footer__copy a { color: var(--text-dim); }
  .footer__copy a:hover { color: var(--white); }

  @media (max-width: 600px) {
    .footer__inner { flex-direction: column; gap: 10px; text-align: center; }
    .form-card { padding: 22px 18px 26px; }
    .page-hero { padding: 110px 0 48px; }
  }
