/* ORYKA — formulaire de projet : les étapes à gauche, la question en cours à droite, le récapitulatif et l'envoi sur
   WhatsApp. S'ajoute à pages.css (couleurs, typographie, menu, pied de page communs). */

.fo-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(env(safe-area-inset-top, 0px) + 132px) 0 36px; }
.fo-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 60% at 90% 0%, rgba(110, 155, 255, .32), rgba(110, 155, 255, 0) 70%), radial-gradient(36% 50% at 0% 90%, rgba(36, 89, 230, .1), rgba(36, 89, 230, 0) 70%), linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); }
.fo-sky svg { position: absolute; right: -260px; top: -120px; width: 900px; color: rgba(36, 89, 230, .14); }
.fo-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 24px clamp(30px, 6vw, 80px); align-items: end; }
.fo-hero-main { display: grid; gap: 16px; justify-items: start; }
.fo-hero .display { font-size: clamp(38px, 5.2vw, 70px); text-wrap: balance; }
.fo-hero .lead { max-width: 560px; }
.fo-points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fo-points li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 14px 16px; border-radius: 20px; background: var(--white);
  box-shadow: 0 0 0 1px var(--hairline), 0 20px 40px -34px rgba(21, 48, 127, .5); }
.fo-points svg { grid-row: span 2; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--tint); color: var(--cobalt); }
.fo-points b { font: 600 15px/1.3 var(--font); letter-spacing: -0.02em; color: var(--nuit); }
.fo-points span { font-size: 14px; line-height: 1.45; color: var(--text-2); }

.fo-main { padding: 18px 0 clamp(80px, 9vw, 130px); }
.fo-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; scroll-margin-top: 100px; }

/* the steps */
.fo-steps { position: sticky; top: 108px; }
.fo-steps ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.fo-steps button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: none; cursor: pointer; text-align: left;
  font: 500 15px/1.3 var(--font); letter-spacing: -0.015em; color: var(--text-2); transition: background-color .2s ease, color .2s ease; }
.fo-steps button .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: inset 0 0 0 1px var(--hairline-strong);
  font: 700 12.5px/1 var(--font); color: var(--text-3); transition: background-color .2s ease, color .2s ease; }
.fo-steps button:hover:not(:disabled) { background: var(--white); color: var(--nuit); }
.fo-steps button:disabled { cursor: default; opacity: .5; }
.fo-steps button[aria-current] { background: var(--white); color: var(--nuit); font-weight: 600; box-shadow: 0 0 0 1px var(--hairline), 0 14px 30px -24px rgba(21, 48, 127, .6); }
.fo-steps button[aria-current] .n { background: var(--cobalt); color: var(--white); box-shadow: none; }

/* the card of the step being filled */
.fo-card { padding: clamp(22px, 3.4vw, 40px); border-radius: 32px; background: var(--white); box-shadow: 0 0 0 1px var(--hairline), 0 40px 80px -60px rgba(21, 48, 127, .55); }
.fo-progress { display: grid; gap: 10px; margin-bottom: 26px; font: 600 13px/1.3 var(--font); color: var(--text-3); }
.fo-progress i { display: block; height: 6px; border-radius: 99px; background: var(--mist); overflow: hidden; }
.fo-progress b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cobalt), var(--azur)); transition: width .5s var(--ease); }
.fo-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.fo-step-head { display: grid; gap: 8px; }
.fo-step-head h2 { font: 600 clamp(26px, 3vw, 36px)/1.1 var(--font); letter-spacing: -0.045em; color: var(--nuit); outline: none; }
.fo-step-head p { font-size: 16px; color: var(--text-2); }

.fo-field { display: grid; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
.fo-field > label, .fo-field legend, .fo-label { padding: 0; font: 600 15px/1.35 var(--font); letter-spacing: -0.015em; color: var(--nuit); }
.fo-field legend { margin-bottom: 9px; }
.fo-req { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--tint); font: 600 11.5px/1.4 var(--font); font-style: normal; color: var(--cobalt); vertical-align: 1px; }
.fo-help { font-size: 13.5px; line-height: 1.45; color: var(--text-3); }
.fo-input { width: 100%; min-height: 52px; padding: 14px 16px; border: 0; border-radius: 16px; background: var(--mist); box-shadow: inset 0 0 0 1px var(--hairline);
  font: 500 16px/1.4 var(--font); color: var(--nuit); transition: box-shadow .2s ease, background-color .2s ease; }
.fo-zone { min-height: 104px; resize: vertical; }
.fo-input::placeholder { color: #9aa3b8; }
.fo-input:focus { outline: none; background: var(--white); box-shadow: inset 0 0 0 2px var(--cobalt), 0 0 0 5px rgba(36, 89, 230, .12); }
.fo-input.bad { box-shadow: inset 0 0 0 2px #d14343, 0 0 0 5px rgba(209, 67, 67, .1); }
.fo-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-choice { position: relative; cursor: pointer; }
.fo-choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.fo-choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--mist); box-shadow: inset 0 0 0 1px var(--hairline);
  font: 600 14.5px/1.2 var(--font); letter-spacing: -0.015em; color: var(--text-2); transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.fo-choice:hover span { color: var(--nuit); box-shadow: inset 0 0 0 1px rgba(36, 89, 230, .35); }
.fo-choice input:checked + span { background: var(--cobalt); color: var(--white); box-shadow: 0 10px 20px -12px rgba(36, 89, 230, .8); }
.fo-choice input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 3px; }

/* the types of project, as big tiles */
.fo-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fo-type { position: relative; cursor: pointer; }
.fo-type input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.fo-type span { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 76px; padding: 16px 18px; border-radius: 20px; background: var(--mist);
  box-shadow: inset 0 0 0 1px var(--hairline); transition: background-color .2s ease, box-shadow .2s ease; }
.fo-type b { font: 600 16px/1.25 var(--font); letter-spacing: -0.02em; color: var(--nuit); }
.fo-type svg { flex: none; width: 28px; height: 28px; padding: 6px; border-radius: 50%; color: transparent; box-shadow: inset 0 0 0 1.5px var(--hairline-strong); transition: background-color .2s ease, color .2s ease; }
.fo-type:hover span { box-shadow: inset 0 0 0 1px rgba(36, 89, 230, .35); }
.fo-type input:checked + span { background: var(--tint); box-shadow: inset 0 0 0 2px var(--cobalt); }
.fo-type input:checked + span svg { background: var(--cobalt); color: var(--white); box-shadow: none; }
.fo-type input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 3px; }

.fo-note { padding: 14px 16px; border-radius: 16px; background: var(--tint); font-size: 14.5px; line-height: 1.5; color: var(--marine); }
.fo-alert { padding: 14px 16px; border-radius: 16px; background: #fdecec; font-size: 14.5px; line-height: 1.5; color: #9b2c2c; }
.fo-alert ul { margin: 8px 0 0; padding-left: 18px; }
.fo-alert button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; text-decoration: underline; text-underline-offset: 2px; }

.fo-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 24px 16px; border-radius: 20px; cursor: pointer; text-align: center; background: var(--mist);
  box-shadow: inset 0 0 0 1.5px var(--hairline-strong); font-size: 14px; color: var(--text-2); transition: background-color .2s ease, box-shadow .2s ease; }
.fo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fo-drop:hover { background: var(--tint); box-shadow: inset 0 0 0 2px var(--cobalt); }
.fo-drop:focus-within { box-shadow: inset 0 0 0 2px var(--cobalt), 0 0 0 5px rgba(36, 89, 230, .12); }
.fo-drop-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: var(--white); }
.fo-drop-ic svg { width: 18px; height: 18px; }
.fo-drop b { font: 600 15px/1.3 var(--font); color: var(--cobalt); }
.fo-files { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fo-files li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--mist); font-size: 14px; color: var(--nuit); }
.fo-files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-files li small { color: var(--text-3); }
.fo-files button { width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--text-2); cursor: pointer; }
.fo-files button svg { width: 14px; height: 14px; }
.fo-accord { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px; border-radius: 18px; background: var(--mist); cursor: pointer; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.fo-accord input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--cobalt); }
.fo-accord a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; }

.fo-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.fo-nav [data-fo-next] { margin-left: auto; }
.fo-nav [data-fo-prev] .btn-ic svg { transform: rotate(180deg); }
.fo-save { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.fo-save button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; }

/* the summary and the sending */
.fo-recap { padding: 18px 20px; border-radius: 20px; background: var(--mist); }
.fo-recap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fo-recap-head h3 { min-width: 0; overflow-wrap: anywhere; }
.fo-edit { flex: none; }
.fo-recap h3 { font: 600 17px/1.2 var(--font); letter-spacing: -0.03em; color: var(--nuit); }
.fo-edit { padding: 6px 12px; border: 0; border-radius: 999px; background: var(--white); cursor: pointer; font: 600 13px/1 var(--font); color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--hairline); }
.fo-recap dl { display: grid; gap: 10px; margin: 14px 0 0; }
.fo-recap dt { font: 600 13px/1.35 var(--font); color: var(--text-3); }
.fo-recap dd { margin: 2px 0 0; font-size: 15px; line-height: 1.5; color: var(--nuit); white-space: pre-line; overflow-wrap: anywhere; }
.fo-empty { margin-top: 8px; font-size: 14px; color: var(--text-3); }
.fo-send { display: grid; justify-items: start; gap: 12px; padding: 22px; border-radius: 24px; background: var(--nuit); color: var(--white); }
.fo-send .btn[disabled] { opacity: .45; pointer-events: none; }
/* long labels go on two lines instead of pushing the card out of the screen */
.fo-send .btn, .fo-done-acts .btn { max-width: 100%; white-space: normal; text-align: left; line-height: 1.25; padding-top: 7px; padding-bottom: 7px; }
.fo-send-title { font: 600 20px/1.2 var(--font); letter-spacing: -0.03em; color: var(--white); }
.fo-send-help { margin-top: -4px; }
.fo-send-small { font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, .55); }
.btn-ic svg.dl { transform: none !important; }
.fo-send-help { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .7); }
.fo-send-help b { color: var(--white); }
.fo-done { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 20px; border-radius: 22px; background: var(--tint); box-shadow: inset 0 0 0 1px rgba(36, 89, 230, .16); }
.fo-done-ic svg { display: block; width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--cobalt); color: var(--white); }
.fo-done.wait .fo-done-ic svg { padding: 12px; background: var(--white); color: var(--cobalt); box-shadow: inset 0 0 0 1px rgba(36, 89, 230, .2); }
.fo-done b { font: 600 18px/1.25 var(--font); letter-spacing: -0.03em; color: var(--nuit); }
.fo-done p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.fo-done p b { font: inherit; font-weight: 600; letter-spacing: normal; color: var(--nuit); }
.fo-done-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

@media (max-width: 960px) {
  .fo-hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .fo-grid { grid-template-columns: minmax(0, 1fr); }
  .fo-steps { position: static; margin: 0 -16px; }
  .fo-steps ol { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; }
  .fo-steps ol::-webkit-scrollbar { display: none; }
  .fo-steps button { white-space: nowrap; background: var(--white); box-shadow: inset 0 0 0 1px var(--hairline); }
  .fo-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .fo-hero { padding-top: calc(env(safe-area-inset-top, 0px) + 112px); }
  .fo-card { border-radius: 26px; }
  .fo-types { grid-template-columns: minmax(0, 1fr); }
  .fo-type span { min-height: 62px; }
  .fo-nav .btn { flex: 1; justify-content: space-between; }
  .fo-send { justify-items: stretch; padding: 20px 18px; }
  .fo-send .btn, .fo-done-acts .btn { width: 100%; justify-content: space-between; }
  .fo-done { display: block; padding: 18px; }
  .fo-done-ic svg { width: 40px; height: 40px; padding: 10px; margin-bottom: 12px; }
}
