/* =============================================================
   MAQUETTE EXPRESS (17/10/2026) : formulaire axp_formulaire() de includes/awl-express.php, fenêtre de création, exemples.
   Chargé par la page (variable $head_extra), après /css/direction.css. Les champs, choix et boutons gardent les styles .dg-*
   (/css/awl-ui.css, ajustés dans /css/direction.css). Préfixe : axp-. Après une modification : changer le ?v= de la page.
   ============================================================= */

/* ---------- Carte du formulaire ---------- */
.awlh .axp-card { --axp-c: var(--ink); position: relative; padding-top: 22px; }
.awlh .axp-card .dg-progress { margin-bottom: 22px; }

/* Aperçu en direct : une barre d'adresse où s'écrivent le nom, le métier et la ville, dans la couleur choisie */
.awlh .axp-apercu { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: background-color .3s ease, border-color .3s ease; }
.awlh .axp-a-couleur .axp-apercu { border-color: transparent; background: var(--axp-c); color: #fff; }
.awlh .axp-apercu-points { display: inline-flex; gap: 5px; flex-shrink: 0; }
.awlh .axp-apercu-points i { width: 9px; height: 9px; border-radius: 50%; background: #d4d4d8; }
.awlh .axp-a-couleur .axp-apercu-points i { background: rgba(255, 255, 255, .45); }
.awlh .axp-apercu-site { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.awlh .axp-apercu-site b { overflow: hidden; font-size: 15px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.awlh .axp-apercu-site small { overflow: hidden; font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); }
.awlh .axp-a-couleur .axp-apercu-site small { color: rgba(255, 255, 255, .8); }

/* Étapes : une seule visible quand le script tourne */
.awlh .axp-form.is-js .axp-step, .awlh .axp-step { display: none; margin: 0; padding: 0; border: 0; min-width: 0; }
.awlh .axp-step.is-active { display: block; animation: axp-entree .35s var(--ease); }
@keyframes axp-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Étape 1 : recherche du métier (52 kits, une liste de tuiles était trop longue) */
.awlh .axp-recherche-metier { margin-top: 18px; }
.awlh .axp-recherche-metier input { min-height: 58px; padding-left: 50px; font-size: 17px; font-weight: 600; -webkit-appearance: none; appearance: none; }
.awlh .axp-recherche-metier input::-webkit-search-cancel-button { -webkit-appearance: none; }
.awlh .axp-loupe { position: absolute; left: 17px; bottom: 18px; width: 22px; height: 22px; color: var(--muted-2); pointer-events: none; }
.awlh .axp-aide { margin-top: 10px; }
.awlh .axp-recherche { position: relative; }
.awlh .axp-suggestions { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 24px 50px -20px rgba(9, 9, 11, .35); }
.awlh .axp-suggestions li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; }
.awlh .axp-suggestions li small { font-weight: 600; color: var(--muted-2); }
.awlh .axp-suggestions li:hover, .awlh .axp-suggestions li[aria-selected="true"] { background: #fefce8; }
.awlh .axp-info { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--muted); }
.awlh .axp-info.is-ok { background: #fefce8; color: var(--ink); box-shadow: inset 3px 0 0 var(--volt-500); }

/* Étape 3 : couleurs */
.awlh .axp-teintes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; margin-top: 18px; }
.awlh .axp-teinte { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; }
.awlh .axp-teinte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.awlh .axp-teinte-pastille { width: 48px; height: 48px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(9, 9, 11, .08); transition: box-shadow .2s ease, transform .2s var(--ease); }
.awlh .axp-teinte-auto { background: conic-gradient(#1d4ed8, #0f766e, #15803d, #b91c1c, #6d28d9, #1d4ed8); }
.awlh .axp-teinte-nom { font-size: 12px; font-weight: 700; line-height: 1.25; text-align: center; color: var(--muted); }
.awlh .axp-teinte:hover .axp-teinte-pastille { transform: scale(1.06); }
.awlh .axp-teinte input:checked + .axp-teinte-pastille { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.awlh .axp-teinte input:checked ~ .axp-teinte-nom { color: var(--ink); }
.awlh .axp-teinte input:focus-visible + .axp-teinte-pastille { outline: 2px solid var(--ink); outline-offset: 6px; }

.awlh .axp-rassure { margin-top: 14px; font-size: 13px; font-weight: 600; text-align: center; color: var(--muted-2); }
.awlh .axp-fin { text-align: left; outline: none; }
.awlh .axp-fin .dg-done-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 50%; }
.awlh .axp-fin .dg-done-icon::after { content: ""; width: 14px; height: 24px; margin-top: -4px; border: solid var(--ink); border-width: 0 3.5px 3.5px 0; transform: rotate(45deg); }
.awlh .axp-fin .dg-done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.awlh .axp-fin .dg-done-actions a { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Fenêtre de création ---------- */
.axp-ouverte, .axp-ouverte body { overflow: hidden; }
.axp-calque { background: none; }
.awlh .axp-fenetre { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px; background: rgba(9, 9, 11, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease; }
.awlh .axp-fenetre[hidden] { display: none; }
.awlh .axp-fenetre.is-on { opacity: 1; }
.awlh .axp-boite { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow: auto; padding: 32px 28px 28px; border-radius: 26px; background: #fff; text-align: center; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); outline: none; transform: translateY(12px) scale(.98); transition: transform .35s var(--ease); }
.awlh .axp-fenetre.is-on .axp-boite { transform: none; }
.awlh .axp-roue { position: relative; width: 132px; height: 132px; margin: 0 auto 18px; }
.awlh .axp-roue[hidden] { display: none; }
.awlh .axp-roue::before { content: ""; position: absolute; inset: 22px; border: 3px solid var(--surface); border-top-color: var(--ink); border-radius: 50%; animation: axp-tourne .9s linear infinite; }
.awlh .axp-roue svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.awlh .axp-roue circle { fill: none; stroke-width: 9; }
.awlh .axp-roue-fond { stroke: var(--surface); }
.awlh .axp-roue-arc { stroke: var(--volt); stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.awlh .axp-roue span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
@keyframes axp-tourne { to { transform: rotate(360deg); } }
.awlh .axp-boite-titre { font-size: 22px; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; text-transform: uppercase; }
.awlh .axp-etapes { display: grid; gap: 10px; margin: 20px 0 0; text-align: left; }
.awlh .axp-etapes[hidden] { display: none; }
.awlh .axp-etapes li { position: relative; padding-left: 32px; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: #a1a1aa; transition: color .25s ease; }
.awlh .axp-etapes li::before { content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 50%; box-sizing: border-box; }
.awlh .axp-etapes li.is-cours { color: var(--ink); }
.awlh .axp-etapes li.is-cours::before { border-color: var(--line); border-top-color: var(--ink); animation: axp-tourne .8s linear infinite; }
.awlh .axp-etapes li.is-fait { color: var(--ink); }
.awlh .axp-etapes li.is-fait::before { border-color: var(--volt); background: var(--volt); }
.awlh .axp-etapes li.is-fait::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid var(--ink); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.awlh .axp-resultat { margin-top: 14px; }
.awlh .axp-resultat[hidden] { display: none; }
.awlh .axp-resultat p { margin-top: 12px; font-size: 15px; font-weight: 500; line-height: 1.55; color: var(--muted); }
.awlh .axp-resultat b { color: var(--ink); }
.awlh .axp-voir { display: flex; align-items: center; justify-content: center; min-height: 58px; margin-top: 8px; border-radius: 999px; background: var(--volt); font-size: 16px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); transition: background-color .2s ease, transform .2s var(--ease); }
.awlh .axp-voir:hover { background: var(--volt-500); transform: translateY(-2px); }
.awlh .axp-appel { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--volt-500); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.awlh .axp-fermer { display: block; width: 100%; min-height: 48px; margin-top: 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; font-weight: 800; color: var(--muted); cursor: pointer; }

/* ---------- Exemples réels (captures sur téléphone) ---------- */
.awlh .axp-exemples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.awlh .axp-exemple { margin: 0; }
.awlh .axp-telephone { overflow: hidden; aspect-ratio: 375 / 700; padding: 8px; border-radius: 34px; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(9, 9, 11, .55); }
.awlh .axp-telephone img { width: 100%; height: 100%; border-radius: 26px; object-fit: cover; object-position: top; }
.awlh .axp-exemple figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.awlh .axp-exemple figcaption strong { font-size: 16px; font-weight: 900; color: var(--ink); }
.awlh .axp-formules { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; margin-inline: auto; }

/* ---------- Barre fixe sur téléphone (visible quand le formulaire n'est pas à l'écran) ---------- */
.awlh .axp-barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: none; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s var(--ease); }
.awlh .axp-barre .awlh-btn { width: 100%; justify-content: center; }
.awlh .axp-barre.is-on { transform: none; }

@media (max-width: 1023.98px) {
    .awlh .axp-barre { display: block; }
    .awlh .axp-exemples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    /* La première question doit être visible sans défiler : le badge et les coches (redits dans le formulaire) laissent la place */
    .awlh .awlh-herob:has(.axp-card) :is(.awlh-herob-badge, .awlh-herob-checks) { display: none; }
    .awlh .awlh-herob:has(.axp-card) .awlh-herob-grid { gap: 24px; }
    .awlh .awlh-herob:has(.axp-card) .awlh-herob-lead { margin-top: 14px; }
    .awlh .axp-exemples { display: flex; gap: 16px; margin-inline: -24px; padding: 0 24px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .awlh .axp-exemples::-webkit-scrollbar { display: none; }
    .awlh .axp-exemple { flex: 0 0 62%; scroll-snap-align: center; }
    .awlh .axp-formules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
    .awlh .axp-teintes { gap: 12px 4px; }
    .awlh .axp-teinte-pastille { width: 42px; height: 42px; }
    .awlh .axp-boite { padding: 26px 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .awlh .axp-step.is-active, .awlh .axp-roue::before, .awlh .axp-etapes li.is-cours::before { animation: none; }
    .awlh .axp-fenetre, .awlh .axp-boite, .awlh .axp-barre { transition: none; }
}
