/* ══════════════════════════════════════════════════════════════════════
   Axorun V2 — extension « pages Axorun » (portail, offres, pages légales,
   éditeurs du gérant, chats de démo). Dépend de tokens.css + composants.css,
   qu'elle ne modifie pas. Aucune couleur en dur hors des jetons d'accent.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Accent Axorun (orange du portail). Valeurs calculées avec la même règle que
      AX.appliquerAccent : encre noire 8,1:1, texte lisible ≥ 4,5:1 sur les surfaces. */
:root{
  --accent:#FF7A45;
  --accent-ink:#000000;
  --accent-text-light:#A25335;
  --accent-text-dark:#FF7A45;
}

/* ── Mise en page ── */
.ax-cadre{width:100%;max-width:1080px;margin:0 auto;padding:0 var(--gouttiere);min-width:0}
.ax-cadre--etroit{max-width:760px}
.ax-entete{display:flex;align-items:center;gap:var(--e-3);min-height:64px;padding:var(--e-2) var(--gouttiere);
  border-bottom:1px solid var(--ligne);background:var(--carte)}
.ax-entete>.ax-pousse{flex:1;min-width:0}
.ax-marque{display:inline-flex;align-items:center;min-height:44px;gap:var(--e-2);font-weight:var(--g-fort);color:var(--texte);text-decoration:none;min-width:0}
.ax-marque img{width:32px;height:32px;border-radius:8px;flex:none;display:block}
.ax-titre{font-size:var(--t-grand);font-weight:var(--g-fort);line-height:1.2;overflow-wrap:anywhere}
.ax-sous-titre{color:var(--texte-doux);overflow-wrap:anywhere}
.ax-doux{color:var(--texte-doux)}
.ax-petit{font-size:var(--t-petit)}
.ax-pile{display:flex;flex-direction:column;gap:var(--e-3);min-width:0}
.ax-rangee{display:flex;flex-wrap:wrap;align-items:center;gap:var(--e-2);min-width:0}

/* ── Lien texte : cible tactile de 44 px sans changer l'allure d'un lien ── */
.ax-lien{display:inline-flex;align-items:center;gap:6px;min-height:44px;color:var(--accent-text);font-weight:var(--g-fort);
  text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;cursor:pointer;background:none;border:0;padding:0}
.ax-lien:hover{text-decoration-thickness:2px}
.ax-lien--doux{color:var(--texte-doux);font-weight:var(--g-normal)}

/* ── Case à cocher sur une ligne de 48 px ── */
.ax-case{display:flex;align-items:center;gap:var(--e-3);min-height:var(--cible);cursor:pointer;min-width:0}
.ax-case input{width:22px;height:22px;flex:none;margin:0;accent-color:var(--accent-text)}
.ax-case>span{min-width:0;overflow-wrap:anywhere}

/* ── Message d'état sous un formulaire (texte seul : les traductions le reconnaissent) ── */
.ax-statut{display:block;padding:var(--e-2) var(--e-3);border-radius:var(--r-controle);font-size:var(--t-petit);font-weight:var(--g-fort);
  background:var(--ton-neutre-fond);color:var(--ton-neutre-encre);overflow-wrap:anywhere}
.ax-statut:empty{display:none}
.ax-statut--ok{background:var(--ton-ok-fond);color:var(--ton-ok-encre)}
.ax-statut--erreur{background:var(--ton-danger-fond);color:var(--ton-danger-encre)}
.ax-statut--info{background:var(--ton-info-fond);color:var(--ton-info-encre)}

/* ── Toasts flottants (pages sans barre de service) : même API que AX.Toast ── */
.ax-toasts{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;justify-content:center;pointer-events:none;
  padding:0 var(--gouttiere) calc(var(--e-4) + env(safe-area-inset-bottom))}
.ax-toasts .toast{position:relative;left:auto;right:auto;width:100%;max-width:560px;margin:0;padding:var(--e-3) var(--e-4);
  background:var(--carte);color:var(--texte);border:1px solid var(--ligne-forte);border-radius:var(--r-controle);box-shadow:var(--ombre-2);visibility:hidden}
.ax-toasts.avec-toast .toast{visibility:visible;pointer-events:auto;opacity:1;transform:none}
.ax-toasts--haut{bottom:auto;top:0;padding:calc(var(--e-3) + env(safe-area-inset-top)) var(--gouttiere) 0}

/* ── Barre d'action collée en bas (éditeurs) : un état + l'action principale ── */
.ax-barre{position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--carte);border-top:1px solid var(--ligne);
  padding:var(--e-2) var(--gouttiere) calc(var(--e-2) + env(safe-area-inset-bottom))}
.ax-barre__dedans{display:flex;align-items:center;gap:var(--e-3);max-width:1080px;margin:0 auto;min-height:56px;min-width:0}
.ax-barre__etat{flex:1;min-width:0;font-size:var(--t-petit);color:var(--texte-doux);display:flex;align-items:center;gap:var(--e-2)}
.ax-barre__etat>span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.ax-barre__etat.ok{color:var(--ton-ok-encre);font-weight:var(--g-fort)}
.ax-barre__etat.ko,.ax-barre__etat.err{color:var(--ton-danger-encre);font-weight:var(--g-fort)}
.ax-barre__etat .ic{display:none}
.ax-barre__etat.ok .ic--ok,.ax-barre__etat.ko .ic--ko,.ax-barre__etat.err .ic--ko{display:block}
.ax-barre .btn{flex:none}
.ax-avec-barre{padding-bottom:110px}

/* ── Fenêtre de dialogue générique (remplace alert / confirm / prompt) ── */
.ax-dialogue .feuille__corps p{overflow-wrap:anywhere}
.ax-dialogue__actions{display:flex;flex-direction:column-reverse;gap:var(--e-2)}
@media (min-width:480px){.ax-dialogue__actions{flex-direction:row;justify-content:flex-end}}
.feuille__tete h2{font-size:var(--t-normal);font-weight:var(--g-fort);overflow-wrap:anywhere}

/* ── Texte long (pages légales) ── */
.ax-doc{max-width:72ch}
.ax-doc h1{font-size:var(--t-grand);line-height:1.2;font-weight:var(--g-fort);overflow-wrap:anywhere}
.ax-doc h2{font-size:var(--t-normal);font-weight:var(--g-fort);margin-top:var(--e-6);padding-top:var(--e-4);border-top:1px solid var(--ligne)}
.ax-doc h3{font-size:var(--t-normal);font-weight:var(--g-fort);margin-top:var(--e-5)}
.ax-doc p,.ax-doc ul{margin:var(--e-3) 0 0;overflow-wrap:anywhere}
.ax-doc ul{padding-left:1.25em}
.ax-doc li+li{margin-top:var(--e-2)}
.ax-doc a{color:var(--accent-text);text-underline-offset:3px}
.ax-doc em{color:var(--texte-doux)}
.ax-doc strong,.ax-doc b{font-weight:var(--g-fort)}

/* ── Pied de page et signature ── */
.ax-pied{border-top:1px solid var(--ligne);margin-top:var(--e-6);padding:var(--e-4) 0 var(--e-5);font-size:var(--t-petit);color:var(--texte-doux)}
.ax-pied a{color:var(--texte-doux)}
.axo-signature{text-align:center;padding:var(--e-4) var(--gouttiere);font-size:var(--t-petit);color:var(--texte-doux)}
.axo-signature a{color:inherit;display:inline-flex;align-items:center;min-height:44px}

/* ── Chargement d'écran : icône qui respire + phrase ── */
.ax-chargement{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--e-4);
  padding:var(--e-5) var(--gouttiere);color:var(--texte-doux);text-align:center}
.ax-chargement img{width:64px;height:64px;border-radius:16px;animation:respire 1.6s ease-in-out infinite}
@keyframes respire{50%{opacity:.55;transform:scale(calc(1 - .05 * var(--deplacement)))}}
@media (prefers-reduced-motion: reduce){.ax-chargement img{animation:none}}
