/* Norme de style Axelia — 5. bandeaux, encarts et sections : ce qui remplace la carte à liseré de couleur.
   .ax-bandeau   une ligne d'information ou de reprise. À gauche un TALON de velours qui porte le mot-clé (« Reprendre »,
                 « À jour », « Écart »), coupé en oblique et doublé d'un filet ; au centre le corps ; à droite l'action.
                 Le talon porte un mot : il n'est jamais vide, jamais réduit à une barre.
   .ax-encart    une note courte dans un texte (« À retenir ») : cadre fin et coin de velours, sans balise en plus.
   .ax-section   un bloc titré : tête de velours, corps clair.
   Sens : --ok (sapin), --alerte (bordeaux), --attente (ocre) ; sans rien, la couleur du thème. Toute teinte .ax-* vaut aussi. */

.ax-bandeau--ok,      .ax-encart--ok      { --ax-v1: var(--v-sapin);    --ax-v2: var(--v-sapin-reflet); }
.ax-bandeau--alerte,  .ax-encart--alerte  { --ax-v1: var(--v-bordeaux); --ax-v2: var(--v-bordeaux-reflet); }
.ax-bandeau--attente, .ax-encart--attente { --ax-v1: var(--v-ocre);     --ax-v2: var(--v-ocre-reflet); }

.ax-bandeau {
  --ax-r: var(--ax-rayon-2);
  position: relative; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch;
  width: 100%; min-height: 52px; margin: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--trait); border-radius: var(--ax-r);
  font: inherit; font-size: 14px; line-height: 1.4; text-align: left; text-decoration: none;
}
.ax-bandeau[hidden] { display: none; }
.ax-bandeau:not(.ax-sur-velours) { background: var(--carte); color: var(--texte); }

/* le talon : le velours et son filet sont deux calques découpés selon la même oblique */
.ax-bandeau__talon {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: var(--ax-pas-2); min-width: 92px;
  padding: 0 calc(var(--ax-pas-4) + var(--ax-coupe) + 6px) 0 var(--ax-pas-4);
  color: var(--ax-encre); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.ax-bandeau__talon::before, .ax-bandeau__talon::after { content: ""; position: absolute; inset: 0; z-index: -1; transition: filter var(--ax-pose); }
.ax-bandeau__talon::before {      /* le filet : une lame de 1,5 px parallèle à la coupe */
  background: var(--relief);
  clip-path: polygon(calc(100% - 1.5px) 0, 100% 0, calc(100% - var(--ax-coupe)) 100%, calc(100% - var(--ax-coupe) - 1.5px) 100%);
}
.ax-bandeau__talon::after {       /* le velours, en retrait de 5 px derrière le filet */
  clip-path: polygon(0 0, calc(100% - 5px) 0, calc(100% - var(--ax-coupe) - 5px) 100%, 0 100%);
}

.ax-bandeau__corps  { display: flex; flex-wrap: wrap; align-items: baseline; align-content: center; gap: 2px var(--ax-pas-3); min-width: 0; padding: var(--ax-pas-2) var(--ax-pas-3) var(--ax-pas-2) var(--ax-pas-1); }
.ax-bandeau__titre  { font-weight: 600; color: var(--ax-v1, var(--accent)); }
.ax-bandeau__texte  { font-size: 13px; color: var(--doux); }
.ax-bandeau__action { display: flex; align-items: center; gap: var(--ax-pas-2); padding: 6px var(--ax-pas-3) 6px 0; }
.ax-bandeau__fleche { align-self: center; box-sizing: border-box; width: 9px; height: 9px; margin: 0 var(--ax-pas-4) 0 var(--ax-pas-2); border: solid var(--ax-v1, var(--accent)); border-width: 2px 2px 0 0; transform: rotate(45deg); transition: translate var(--ax-pose); }

/* bandeau cliquable (reprise) : sur <button> ou <a> */
button.ax-bandeau, a.ax-bandeau { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color var(--ax-pose), background-color var(--ax-pose), box-shadow var(--ax-pose); }
button.ax-bandeau:not(.ax-sur-velours):hover, a.ax-bandeau:not(.ax-sur-velours):hover, .ax-bandeau:not(.ax-sur-velours).ax-est-survol {
  background: var(--fond-2); border-color: color-mix(in srgb, var(--ax-v1, var(--accent)) 50%, var(--trait)); box-shadow: var(--ax-ombre-2);
}
button.ax-bandeau:hover .ax-bandeau__talon::after, a.ax-bandeau:hover .ax-bandeau__talon::after, .ax-bandeau.ax-est-survol .ax-bandeau__talon::after { filter: brightness(1.12); }
button.ax-bandeau:hover .ax-bandeau__fleche, a.ax-bandeau:hover .ax-bandeau__fleche, .ax-bandeau.ax-est-survol .ax-bandeau__fleche { translate: 3px 0; }
button.ax-bandeau:not(.ax-sur-velours):active, a.ax-bandeau:not(.ax-sur-velours):active, .ax-bandeau:not(.ax-sur-velours).ax-est-appui { background: var(--piste); box-shadow: none; }
button.ax-bandeau:focus-visible, a.ax-bandeau:focus-visible, .ax-bandeau.ax-est-focus { outline: 2px solid var(--ax-focus); outline-offset: 2px; }
button.ax-bandeau:disabled, .ax-bandeau[aria-disabled="true"] { opacity: .5; filter: saturate(.35); cursor: not-allowed; pointer-events: none; }

/* bandeau plein velours : class="ax-bandeau ax-sur-velours". Le talon n'est plus qu'un voile derrière le même filet. */
.ax-bandeau.ax-sur-velours { border-color: transparent; box-shadow: inset 0 1px 0 var(--ax-voile), 0 10px 16px -14px var(--ax-v1, var(--bouton-b)); }
.ax-bandeau.ax-sur-velours .ax-bandeau__talon::before { background: var(--relief-clair); }
.ax-bandeau.ax-sur-velours .ax-bandeau__talon::after { background: var(--ax-creux); }
.ax-sur-velours .ax-bandeau__titre { color: var(--ax-encre); }
.ax-sur-velours .ax-bandeau__texte { color: var(--ax-encre-douce); }
.ax-sur-velours .ax-bandeau__fleche { border-color: var(--ax-encre); }
button.ax-bandeau.ax-sur-velours:hover, a.ax-bandeau.ax-sur-velours:hover, .ax-bandeau.ax-sur-velours.ax-est-survol { filter: brightness(1.1); }
button.ax-bandeau.ax-sur-velours:active, a.ax-bandeau.ax-sur-velours:active, .ax-bandeau.ax-sur-velours.ax-est-appui { filter: brightness(.94); }
/* bandeau de velours posé sur une surface de velours : un cerne clair le détache */
.ax-sur-velours .ax-bandeau.ax-sur-velours { box-shadow: inset 0 1px 0 var(--ax-voile), 0 0 0 1px var(--ax-voile-fort); }
/* bandeau clair posé sur une surface de velours : il reste une pièce claire (texte seul, sans bouton à l'intérieur) */
.ax-sur-velours .ax-bandeau:not(.ax-sur-velours) { border-color: transparent; }
.ax-sur-velours .ax-bandeau:not(.ax-sur-velours) .ax-bandeau__titre { color: var(--ax-v1, var(--accent)); }
.ax-sur-velours .ax-bandeau:not(.ax-sur-velours) .ax-bandeau__texte { color: var(--doux); }
.ax-sur-velours .ax-bandeau:not(.ax-sur-velours) .ax-bandeau__fleche { border-color: var(--ax-v1, var(--accent)); }

/* --- encart : note dans un texte. Aucune balise à ajouter : le coin est un fond. --- */
.ax-encart {
  box-sizing: border-box; margin: var(--ax-pas-3) 0; padding: 11px 14px 11px 22px; max-width: 78ch;
  border: 1px solid var(--trait); border-radius: var(--ax-rayon-2); color: var(--texte); font-size: 13px; line-height: 1.5;
  background: linear-gradient(135deg, var(--ax-v1, var(--bouton-b)) 0 14px, transparent 14.5px) no-repeat, var(--fond-2);
}
.ax-encart > strong:first-child, .ax-encart > b:first-child { color: var(--ax-v1, var(--accent)); }
.ax-encart:empty { display: none; }
.ax-sur-velours .ax-encart { border-color: var(--ax-trait-velours); color: var(--ax-encre); background: linear-gradient(135deg, var(--relief-clair) 0 14px, transparent 14.5px) no-repeat, var(--ax-voile); }
.ax-sur-velours .ax-encart > strong:first-child, .ax-sur-velours .ax-encart > b:first-child { color: var(--ax-encre); }

/* --- section : tête de velours, corps clair. Sur <details>, la tête (summary) replie le corps. --- */
.ax-section {
  box-sizing: border-box; margin: 0 0 var(--ax-pas-3); padding: 0; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ax-v1, var(--bouton-b)) 28%, var(--trait)); border-radius: var(--ax-rayon-3);
  background: var(--carte); color: var(--texte); box-shadow: none;
}
.ax-section__tete {
  box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px var(--ax-pas-3);
  min-height: var(--ax-cible); padding: var(--ax-pas-2) var(--ax-pas-4); box-shadow: inset 0 1px 0 var(--ax-voile), inset 0 -1px 0 var(--ax-passepoil);
}
.ax-section__titre { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: inherit; }
.ax-section__note  { font-size: 12px; color: var(--ax-encre-douce); }
.ax-section__corps { padding: var(--ax-pas-4); }
summary.ax-section__tete { cursor: pointer; list-style: none; transition: filter var(--ax-vif); }
summary.ax-section__tete::-webkit-details-marker { display: none; }
summary.ax-section__tete::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border: solid var(--ax-encre); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform var(--ax-pose); }
details[open] > summary.ax-section__tete::after { transform: rotate(45deg); }
summary.ax-section__tete:hover, summary.ax-section__tete.ax-est-survol { filter: brightness(1.1); }
summary.ax-section__tete:focus-visible, summary.ax-section__tete.ax-est-focus { outline: 2px solid var(--ax-encre); outline-offset: -4px; }
.ax-sur-velours .ax-section { border-color: var(--ax-voile-fort); background: var(--ax-voile); color: var(--ax-encre); }
.ax-sur-velours .ax-section__tete { background: var(--ax-creux); }

/* téléphone : le talon devient un onglet posé en tête du bandeau */
@media (max-width: 560px) {
  .ax-bandeau { grid-template-columns: minmax(0, 1fr) auto; }
  .ax-bandeau__talon { grid-column: 1 / -1; justify-self: start; min-height: 26px; }
  .ax-bandeau__corps { padding-left: var(--ax-pas-3); }
  .ax-bandeau__action { grid-column: 1 / -1; padding: 0 var(--ax-pas-3) var(--ax-pas-2); }
  .ax-bandeau__fleche { grid-column: 2; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  button.ax-bandeau, a.ax-bandeau, .ax-bandeau__talon::before, .ax-bandeau__talon::after, .ax-bandeau__fleche, summary.ax-section__tete, summary.ax-section__tete::after { transition: none; }
}
