/* YooPanel : coque réelle « Pop kiosque » (carte #509) : barre haute, onglets du bas, feuille « Mon compte », pied.
   Charge après yp.css. Propriétés logiques partout : la coque se retourne seule en droite à gauche. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; }
.yp a:not([class]) { color: inherit; }
.yp-sauter { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 70; }
.yp-sauter:focus { top: 12px; }
[data-theme="encre"] .yp-logo { color: var(--creme); }

/* ---------- Barre haute ---------- */
.yp-haut { position: sticky; top: 0; z-index: 40; background: rgba(251, 243, 228, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 2px solid var(--ligne); }
.yp-haut__rangee { display: flex; align-items: center; gap: 12px; max-width: var(--largeur); height: var(--entete); margin-inline: auto; padding-inline: 16px; }
.yp-haut__marque { display: inline-flex; flex: none; color: var(--encre); text-decoration: none; }
.yp-haut__nav { display: none; align-items: center; gap: 4px; margin-inline-start: 16px; }
.yp-haut__lien { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--encre); text-decoration: none; transition: background-color .2s; }
.yp-haut__lien:hover { background: rgba(30, 25, 21, .06); }
.yp-haut__lien[aria-current="page"] { background: var(--encre); color: var(--creme); }
.yp-haut__droite { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.yp-haut__solde { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 2px solid var(--encre); border-radius: var(--rayon-pastille); background: var(--citron); color: var(--encre); font: 700 14px/1.2 var(--font-texte); font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.yp-haut__solde svg { flex: none; }
.yp-haut__compte { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border: 2px solid var(--encre); border-radius: 16px; background: var(--papier); color: var(--encre); font: 700 14px/1 var(--font-texte); cursor: pointer; transition: background-color .2s; }
.yp-haut__compte:hover, .yp-haut__compte[aria-expanded="true"] { background: var(--citron); }
.yp-haut__initiale { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 12px; background: var(--peche); font: 800 14px/1 var(--font-titre); }
.yp-haut__prenom { display: none; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline-end: 8px; }
.yp-haut__lien .yp-pastille { margin-inline-start: 2px; }
@media (min-width: 640px) { .yp-haut__prenom { display: inline; } }
@media (min-width: 768px) { .yp-haut__nav { display: flex; } }

/* ---------- Contenu et pied ---------- */
.yp-panel { display: flex; flex-direction: column; min-height: 100svh; }
.yp-panel__corps { flex: 1; min-width: 0; }
.yp-pied { width: 100%; max-width: var(--largeur); margin-inline: auto; padding: 16px 16px 40px; }
.yp-pied__liens { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 600; }
.yp-pied__liens a { color: var(--texte-2); text-decoration: none; }
.yp-pied__liens a:hover { color: var(--encre); text-decoration: underline; }
.yp-pied__legal { margin-top: 16px; font-size: 12.5px; color: var(--texte-2); }
.yp-pied__legal a { color: inherit; text-decoration: underline; }

/* ---------- Onglets du bas (mobile) ---------- */
.yp-onglets-bas { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--papier); border-top: 2.5px solid var(--encre); padding-bottom: env(safe-area-inset-bottom); }
.yp-onglet-bas { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 60px; padding: 8px 2px 7px; font: 700 11px/1.15 var(--font-texte); color: var(--texte-2); text-decoration: none; text-align: center; background: none; border: 0; cursor: pointer; overflow-wrap: normal; }
.yp-onglet-bas > span:not(.yp-onglet-bas__pilule):not(.yp-pastille) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yp-onglet-bas[aria-current="page"] { color: var(--encre); }
.yp-onglet-bas__pilule { display: grid; place-items: center; width: 48px; height: 30px; border: 2px solid transparent; border-radius: 11px; transition: background-color .2s; }
.yp-onglet-bas[aria-current="page"] .yp-onglet-bas__pilule { background: var(--citron); border-color: var(--encre); }
.yp-onglet-bas .yp-pastille { position: absolute; top: 3px; inset-inline-start: calc(50% + 8px); }
.yp-panel { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .yp-onglets-bas { display: none; } .yp-panel { padding-bottom: 0; } }

/* ---------- Feuille « Mon compte » (dialog) ---------- */
dialog.yp-feuille { width: 100%; max-width: none; max-height: 100dvh; margin: auto 0 0; padding: 0; border: 0; background: transparent; color: var(--texte); }
dialog.yp-feuille::backdrop { background: rgba(30, 25, 21, .45); }
.yp-feuille__carte { padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); background: var(--papier); border: 2.5px solid var(--encre); border-bottom: 0; border-radius: var(--rayon-grand) var(--rayon-grand) 0 0; box-shadow: var(--yp-sh); }
.yp-feuille__tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yp-feuille__titre { font: 800 20px/1.2 var(--font-titre); letter-spacing: -.02em; }
.yp-feuille__liste { display: grid; gap: 2px; margin: 12px 0 0; padding: 0; list-style: none; font-weight: 700; }
.yp-feuille__lien { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; color: var(--encre); text-decoration: none; transition: background-color .2s; }
.yp-feuille__lien:hover { background: rgba(30, 25, 21, .06); }
.yp-feuille__lien[aria-current="page"] { background: var(--encre); color: var(--creme); }
.yp-feuille__lien svg { flex: none; }
.yp-feuille__lien--sortie { color: var(--tomate-profonde); }
.yp-feuille__solde { margin-inline-start: auto; padding: 2px 10px; border: 2px solid var(--encre); border-radius: var(--rayon-pastille); background: var(--citron); color: var(--encre); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yp-feuille__langue { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.yp-feuille__choix { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 2px solid var(--encre); border-radius: 12px; background: var(--papier); color: var(--encre); font: 700 15px/1.2 var(--font-texte); }
.yp-feuille__choix:focus-visible { outline: 3px solid var(--focus-1); outline-offset: 2px; }
@media (min-width: 768px) {
  dialog.yp-feuille { width: min(24rem, calc(100% - 2rem)); margin: 76px 16px auto auto; }
  [dir="rtl"] dialog.yp-feuille { margin: 76px auto auto 16px; }
  .yp-feuille__carte { border-bottom: 2.5px solid var(--encre); border-radius: var(--rayon-grand); padding-bottom: 20px; }
  .yp-feuille__mobile { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.yp-feuille[open] .yp-feuille__carte { animation: yp-monte .32s var(--courbe-tiroir) 1 both; }
}
@keyframes yp-monte { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Dialogues ---------- */
dialog.yp-boite:not([open]) { display: none; }
dialog.yp-boite { margin: auto; }
.yp-choix.yp-bascule input[type="checkbox"]:checked::after { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--encre); transform: translateX(calc(22px * var(--yp-sx))); }

/* ---------- Classes de page des écrans sans coque (connexion, système, site) ---------- */
.l-haut { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: var(--entete); padding: 10px max(16px, calc((100% - var(--largeur)) / 2 + 16px)); background: rgba(251, 243, 228, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 2px solid var(--ligne); color: var(--encre); }
.l-hero { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 48px; align-items: start; padding: 48px 64px 64px; }
.l-h1 { font: 800 clamp(2.2rem,5vw,4rem)/1.02 var(--font-titre); letter-spacing: -.03em; margin: 0; }
.l-surligne { background: linear-gradient(transparent 62%, var(--citron) 62% 92%, transparent 92%); padding: 0 .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.l-sec { padding: 56px 64px; }
.yp .l-h2 { font: 800 clamp(1.7rem,3vw,2.5rem)/1.08 var(--font-titre); letter-spacing: -.025em; margin: 0 0 24px; }
.l-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
.l-gestes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: var(--papier); border: 2.5px solid var(--encre); box-shadow: var(--yp-sh); border-radius: var(--rayon-grand); overflow: hidden; }
.l-geste { position: relative; display: grid; gap: 10px; align-content: start; padding: 24px; border-inline-start: 2px dashed var(--ligne); }
.l-geste:first-child { border-inline-start: 0; }
.l-file { display: flex; align-items: center; gap: 16px; padding: 14px 18px; min-width: 0; }
.l-file__txt { flex: 1; min-width: 0; display: grid; gap: 6px; }
.l-petit { display: grid; gap: 4px; padding: 10px 0; border-bottom: 2px solid var(--ligne); position: relative; }
.l-petit:last-child { border-bottom: 0; }
.l-tampon-abs { position: absolute; inset-inline-end: 8px; top: 6px; }
.l-page-simple { display: grid; grid-template-rows: auto 1fr auto; min-height: 100svh; }
.l-page-simple > main { padding: 48px 16px; }
.l-page-simple__corps { max-width: 560px; margin-inline: auto; }
@media (max-width: 1023px) {
  .l-hero { grid-template-columns: minmax(0,1fr); gap: 28px; padding: 24px 16px 32px; }
  .l-sec { padding: 32px 16px; }
  .l-2 { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .l-gestes { grid-template-columns: minmax(0,1fr); }
  .l-geste { border-inline-start: 0; border-top: 2px dashed var(--ligne); }
  .l-geste:first-child { border-top: 0; }
  .l-file { flex-direction: column; align-items: stretch; }
  .l-page-simple > main { padding: 24px 16px; }
}

/* ---------- SweetAlert2 aux couleurs de YooPanel ---------- */
.swal2-container.swal2-backdrop-show { background: rgba(30, 25, 21, .45) !important; }
.swal2-popup { background: var(--papier) !important; color: var(--encre) !important; font-family: var(--font-texte) !important; border: 2.5px solid var(--encre) !important; border-radius: var(--rayon-grand) !important; box-shadow: 7px 7px 0 var(--encre) !important; }
.swal2-title { font: 800 22px/1.2 var(--font-titre) !important; letter-spacing: -.02em !important; color: var(--encre) !important; }
.swal2-html-container { color: var(--encre) !important; font-size: 16px !important; }
.swal2-styled.swal2-confirm { background: var(--tomate) !important; color: var(--blanc) !important; border: 2.5px solid var(--encre) !important; border-radius: var(--rayon-bouton) !important; font: 700 17px/1.15 var(--font-titre) !important; box-shadow: 4px 4px 0 var(--encre) !important; }
.swal2-styled.swal2-cancel, .swal2-styled.swal2-deny { background: var(--papier) !important; color: var(--encre) !important; border: 2.5px solid var(--encre) !important; border-radius: var(--rayon-bouton) !important; font: 700 17px/1.15 var(--font-titre) !important; box-shadow: 4px 4px 0 var(--encre) !important; }
.swal2-styled:focus { box-shadow: 4px 4px 0 var(--encre), 0 0 0 3px var(--tomate) !important; }
.swal2-icon { border-color: var(--encre) !important; color: var(--encre) !important; }
.swal2-timer-progress-bar { background: var(--tomate) !important; }
