/* Formulaires publics remplis par les clients (demande de livraison et
   inscription) : photo de l'agence DHD en fond, voile graphite comme
   l'enseigne, feuille blanche coiffée du bandeau orange. */

@media screen {
  .pf-body {
    --pf-orange: #f58220;
    --pf-orange-deep: #d9690b;
    --pf-graphite: #25282e;
    --pf-ink: #1b1e23;
    --pf-muted: #62676f;
    --pf-mist: #f3f4f6;
    --pf-line: #e2e4e8;
    --pf-display: Bahnschrift, "DIN Alternate", "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif;

    min-height: 100vh;
    margin: 0;
    background: var(--pf-graphite);
    color: var(--pf-ink);
  }

  .pf-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
      linear-gradient(180deg, rgba(27, 30, 35, 0.9) 0%, rgba(30, 33, 39, 0.8) 55%, rgba(217, 105, 11, 0.6) 100%),
      url("../assets/dhdlogo.jpg") center / cover no-repeat;
  }

  .pf-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-content: start;
    max-width: 44rem;
    min-height: 100vh;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
  }

  /* ——— Présentation, centrée au-dessus du formulaire ——— */

  .pf-intro {
    color: #fff;
    text-align: center;
  }

  .pf-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
    gap: 0.85rem;
  }

  .pf-mark {
    width: 52px;
    height: 52px;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
  }

  .pf-company {
    margin: 0;
    font-family: var(--pf-display);
    font-size: 1.15rem;
    font-weight: 700;
  }

  .pf-slogan {
    margin: 0.1rem 0 0;
    font-size: 0.95rem;
    color: #ffc38c;
    text-align: left;
  }

  .pf-title {
    margin: 1.4rem 0 0.2rem;
    font-family: var(--pf-display);
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.01em;
  }

  /* Pied de page : comment ça marche, sous le formulaire. */
  .pf-foot {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
    background: rgba(27, 30, 35, 0.78);
    backdrop-filter: blur(4px);
    color: #fff;
    text-align: center;
  }

  .pf-lead {
    max-width: 34rem;
    margin: 0 auto 0.4rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
  }

  .pf-lead-ar {
    margin-bottom: 1.5rem;
    font-family: var(--font-ar);
  }

  .pf-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
  }

  .pf-steps li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .pf-steps span {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border: 2px solid var(--pf-orange);
    border-radius: 50%;
    font-family: var(--pf-display);
    font-weight: 700;
    color: var(--pf-orange);
  }

  .pf-steps small {
    display: block;
    font-family: var(--font-ar);
    font-size: 0.95em;
    color: #ffc38c;
  }

  .pf-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-family: var(--pf-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
  }

  .pf-phone:hover {
    background: var(--pf-orange-deep);
    text-decoration: none;
  }

  .pf-phone svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .pf-title-ar {
    margin: 0;
    font-family: var(--font-ar);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffc38c;
    text-align: center;
  }

  /* Français à gauche, arabe à droite, sur chaque libellé. */
  .pf-form .field > span,
  .pf-choice legend {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    width: 100%;
  }

  .pf-form .field > span i,
  .pf-choice legend i,
  .pf-switch i {
    font-family: var(--font-ar);
    font-style: normal;
  }

  .pf-form .field > span i,
  .pf-choice legend i {
    margin-left: auto;
    font-size: 0.92rem;
    font-weight: 600;
    color: #3d4249;
  }

  .pf-switch a > span {
    font-size: 0.95rem;
  }

  .pf-switch i {
    margin-left: 0.3rem;
  }

  .pf-btn {
    column-gap: 0.75rem;
  }

  .pf-btn span[lang="ar"] {
    font-family: var(--font-ar);
  }

  .pf-submit p[lang="ar"] {
    margin-top: 0.2rem;
    font-family: var(--font-ar);
  }

  .pf-done-ar-title {
    margin: -0.4rem auto 1rem !important;
    font-family: var(--font-ar);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pf-ink) !important;
  }

  .pf-done p[lang="ar"] {
    font-family: var(--font-ar);
  }

  /* ——— Feuille du formulaire ——— */

  .pf-sheet {
    overflow: hidden;
    border-top: 6px solid var(--pf-orange);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  }

  .pf-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--pf-mist);
    border-bottom: 1px solid var(--pf-line);
  }

  .pf-switch a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.95rem 0.75rem 0.85rem;
    border-bottom: 3px solid transparent;
    color: var(--pf-muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
  }

  .pf-switch a small {
    font-size: 0.8rem;
    font-weight: 500;
  }

  .pf-switch a .pf-switch-hint {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pf-orange-deep);
  }

  .pf-switch a:hover {
    color: var(--pf-ink);
    text-decoration: none;
  }

  .pf-switch a[aria-current="page"] {
    margin-bottom: -1px;
    border-bottom-color: var(--pf-orange);
    background: #fff;
    color: var(--pf-ink);
  }

  .pf-switch a:focus-visible,
  .pf-phone:focus-visible,
  .pf-btn:focus-visible {
    outline: 3px solid var(--pf-orange);
    outline-offset: 2px;
  }

  .pf-form {
    padding: 1.5rem 1.75rem 1.75rem;
  }

  .pf-form .form-error {
    margin-bottom: 1.25rem;
  }

  .pf-section {
    padding-bottom: 1.35rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--pf-line);
  }

  .pf-section-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1rem;
    font-family: var(--pf-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pf-ink);
  }

  .pf-section-head small {
    margin-left: auto;
    font-family: var(--font-ar);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pf-muted);
  }

  .pf-num {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    background: var(--pf-graphite);
    color: #fff;
    font-size: 0.9rem;
  }

  /* Libellés en casse normale, plus lisibles pour un client que les
     petites capitales de l'espace agents. */
  .pf-form .field {
    margin-bottom: 0.9rem;
  }

  .pf-form .field > span {
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #3d4249;
  }

  .pf-form .field input,
  .pf-form .field select {
    min-height: 2.9rem;
    border-color: #d5d8dd;
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
  }

  .pf-form .field input::placeholder {
    color: #a3a8b0;
  }

  .pf-req {
    color: var(--pf-orange-deep);
  }

  .pf-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 0.35rem 0 0;
    padding: 0;
    border: none;
  }

  .pf-choice legend {
    margin-bottom: 0.4rem;
    padding: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #3d4249;
  }

  .pf-choice label {
    position: relative;
    cursor: pointer;
  }

  .pf-choice input {
    position: absolute;
    opacity: 0;
  }

  .pf-choice label > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.55rem 0.9rem;
    border: 1.5px solid #d5d8dd;
    border-radius: 10px;
    font-weight: 600;
  }

  .pf-choice small {
    font-weight: 500;
    color: var(--pf-muted);
  }

  .pf-choice input:checked + span {
    border-color: var(--pf-orange);
    background: #fff4ea;
    box-shadow: inset 0 0 0 1px var(--pf-orange);
  }

  .pf-choice input:focus-visible + span {
    outline: 3px solid var(--pf-orange);
    outline-offset: 2px;
  }

  /* Case à cocher « colis fragile » et remarque libre. */
  .pf-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem 0;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #d5d8dd;
    border-radius: 10px;
    cursor: pointer;
  }

  .pf-check input {
    position: absolute;
    opacity: 0;
  }

  .pf-check-box {
    display: grid;
    flex: none;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border: 1.5px solid #b6bac1;
    border-radius: 6px;
    background: #fff;
  }

  .pf-check-box::after {
    content: "";
    width: 0.7rem;
    height: 0.38rem;
    border: 0 solid #fff;
    border-width: 0 0 2.5px 2.5px;
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
  }

  .pf-check input:checked ~ .pf-check-box {
    border-color: var(--pf-orange);
    background: var(--pf-orange);
  }

  .pf-check input:checked ~ .pf-check-box::after {
    opacity: 1;
  }

  .pf-check input:checked ~ .pf-check-text {
    color: var(--pf-orange-deep);
  }

  .pf-check input:focus-visible ~ .pf-check-box {
    outline: 3px solid var(--pf-orange);
    outline-offset: 2px;
  }

  .pf-check-text {
    display: flex;
    flex: 1;
    align-items: baseline;
    gap: 0.3rem;
    font-weight: 600;
  }

  .pf-check-text i {
    margin-left: auto;
    font-family: var(--font-ar);
    font-style: normal;
    font-size: 0.92rem;
  }

  .pf-form .field textarea {
    width: 100%;
    padding: 0.62rem 0.8rem;
    border: 1px solid #d5d8dd;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--pf-ink);
    resize: vertical;
  }

  .pf-form .field textarea:focus {
    outline: none;
    border-color: var(--pf-orange);
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.16);
  }

  .pf-form .field textarea::placeholder {
    color: #a3a8b0;
  }

  .pf-submit p {
    margin: 0.75rem 0 0;
    font-size: 0.84rem;
    color: var(--pf-muted);
    text-align: center;
  }

  .pf-btn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: var(--pf-orange);
    color: #fff;
    font-family: var(--pf-display);
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s;
  }

  .pf-btn:hover {
    background: var(--pf-orange-deep);
  }

  .pf-btn:disabled {
    opacity: 0.6;
    cursor: wait;
  }

  .pf-btn-ghost {
    display: inline-flex;
    width: auto;
    margin: 1.25rem auto 0;
    padding: 0.8rem 1.4rem;
    border: 1.5px solid var(--pf-line);
    background: #fff;
    color: var(--pf-ink);
    font-size: 1rem;
  }

  .pf-btn-ghost:hover {
    border-color: var(--pf-orange);
    background: #fff4ea;
  }

  /* ——— Inscription e-commerçant : pièces du dossier et carte d'identité ——— */

  .pf-docs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.1rem;
    padding: 0.9rem 1rem;
    border: 1.5px solid #f6c89c;
    border-radius: 10px;
    background: #fff8f1;
  }

  .pf-docs-col[lang="ar"] {
    font-family: var(--font-ar);
  }

  .pf-docs-title {
    margin: 0 0 0.45rem;
    font-weight: 700;
    color: var(--pf-ink);
  }

  .pf-docs ul {
    margin: 0;
    padding-inline-start: 1.15rem;
    line-height: 1.6;
    font-size: 0.92rem;
    color: #3d4249;
  }

  .pf-docs-free {
    margin: 0.5rem 0 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--pf-orange-deep);
  }

  .pf-photo-drop {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 9.5rem;
    margin-top: 0.4rem;
    padding: 0.75rem;
    border: 2px dashed #c9ccd2;
    border-radius: 12px;
    background: var(--pf-mist);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }

  .pf-photo-drop:hover {
    border-color: var(--pf-orange);
    background: #fff8f1;
  }

  .pf-photo-drop:focus-within {
    outline: 3px solid var(--pf-orange);
    outline-offset: 2px;
  }

  .pf-form .pf-photo-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    opacity: 0;
  }

  .pf-photo-empty {
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    color: var(--pf-muted);
  }

  .pf-photo-empty[hidden],
  .pf-photo-change[hidden],
  .pf-photo-drop img[hidden] {
    display: none;
  }

  .pf-photo-empty svg {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.25rem;
    fill: none;
    stroke: var(--pf-orange-deep);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .pf-photo-empty strong {
    color: var(--pf-ink);
  }

  .pf-photo-empty span {
    font-family: var(--font-ar);
  }

  .pf-photo-drop img {
    display: block;
    max-width: 100%;
    max-height: 16rem;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  }

  .pf-photo-change {
    margin-top: 0.6rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--pf-orange-deep);
  }

  .pf-photo-hint {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: var(--pf-muted);
  }

  .pf-photo-hint span {
    display: block;
    font-family: var(--font-ar);
  }

  /* ——— Confirmation ——— */

  .pf-done {
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    outline: none;
  }

  .pf-done[hidden] {
    display: none;
  }

  .pf-done-icon {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--pf-orange);
    animation: pf-pop 0.35s ease-out;
  }

  .pf-done-icon svg {
    width: 2.2rem;
    height: 2.2rem;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .pf-done h2 {
    margin: 0 0 0.75rem;
    font-family: var(--pf-display);
    font-size: 1.7rem;
  }

  .pf-done p {
    max-width: 28rem;
    margin: 0 auto 0.75rem;
    line-height: 1.6;
    color: #3d4249;
  }

  @keyframes pf-pop {
    from {
      transform: scale(0.6);
      opacity: 0;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .pf-done-icon {
      animation: none;
    }
  }

  /* ——— Tablette et téléphone : une seule colonne ——— */

  @media (max-width: 600px) {
    .pf-shell {
      gap: 1.5rem;
      padding: 1.5rem 1rem 2.5rem;
    }

    .pf-steps {
      gap: 0.5rem;
    }

    .pf-steps li {
      font-size: 0.78rem;
    }

    .pf-lead {
      font-size: 0.9rem;
    }

    .pf-title {
      margin-top: 1rem;
      font-size: 1.6rem;
    }





    .pf-form {
      padding: 1.25rem 1rem 1.5rem;
    }

    .pf-form .grid-2,
    .pf-form .grid-3 {
      grid-template-columns: 1fr;
      gap: 0;
    }

    .pf-section-head small {
      display: none;
    }

    .pf-docs {
      grid-template-columns: 1fr;
      gap: 0.75rem;
    }

    .pf-switch a {
      font-size: 0.88rem;
    }

    .pf-switch i {
      display: block;
      margin-left: 0;
    }
  }
}
