/* ============================================================
   Composants communs : feuilles, boutons, entête, formulaires
   ============================================================ */

/* Le contenu programmé reçoit le focus à chaque changement de page : pas de cadre autour. */
main[tabindex="-1"]:focus, main[tabindex="-1"]:focus-visible, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

/* — Une feuille de papier à coin corné — */
.feuille, .carte, .cours, .bloc {
  --fond-pli: var(--pays-bg);
  position: relative;
  background-color: var(--feuille);
  border-radius: var(--r-feuille);
  box-shadow: var(--ombre-2);
}
.feuille::after, .carte::after, .cours::after, .bloc::after {
  content: ""; position: absolute; top: 0; right: 0; z-index: 2;
  width: var(--pli); height: var(--pli);
  background: linear-gradient(225deg, var(--fond-pli) 0 50%, #DCD6F0 50% 100%);
  border-top-right-radius: var(--r-feuille);
  box-shadow: -3px 3px 6px -2px rgb(27 24 56 / .22);
  pointer-events: none;
}

/* — Boutons : une pastille de papier épais, avec son bord — */
.btn {
  --b: var(--astuce); --b-deep: #C99A00; --b-on: var(--encre);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 3rem; padding: .7rem 1.35rem;
  font-family: var(--f-titre); font-weight: 700; font-size: 1.05rem; letter-spacing: -.005em; line-height: 1.1;
  color: var(--b-on); background: var(--b);
  border-radius: 14px 14px 14px 6px;
  box-shadow: 0 4px 0 var(--b-deep), 0 10px 16px -8px rgb(27 24 56 / .35);
  text-decoration: none; text-align: center; border: 0;
  transition: transform var(--d-rapide) var(--ease), box-shadow var(--d-rapide) var(--ease), background-color var(--d-rapide);
}
/* Au survol, le bouton ne bouge pas (sinon il tremble quand le curseur est posé sur son bord bas) : seule son ombre grandit. */
.btn:hover:not(:disabled) { box-shadow: 0 6px 0 var(--b-deep), 0 14px 18px -8px rgb(27 24 56 / .35); filter: brightness(1.035); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--b-deep), 0 3px 6px -4px rgb(27 24 56 / .4); }
.btn:disabled { --b: #DAD6EA; --b-deep: #BDB8D4; --b-on: #6F6B8F; cursor: not-allowed; }
.btn .ico { flex: none; }
.btn--grand { min-height: 3.4rem; padding: .85rem 1.7rem; font-size: 1.15rem; }
.btn--petit { min-height: 2.4rem; padding: .4rem .9rem; font-size: .95rem; border-radius: 11px 11px 11px 5px; box-shadow: 0 3px 0 var(--b-deep); }
.btn--clair { --b: #fff; --b-deep: #C9C4E3; --b-on: var(--encre); }
.btn--danger { --b-on: var(--faux-deep); }
.btn--lien { --b: transparent; --b-deep: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; min-height: 2.6rem; }
.btn--lien:hover:not(:disabled) { box-shadow: none; transform: none; }
[data-matiere] .btn-action { --b: var(--c); --b-deep: var(--c-deep); --b-on: var(--c-on); }

.btn-rond {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  background: #fff; color: var(--encre); border-radius: 50%;
  box-shadow: 0 2px 0 rgb(27 24 56 / .14), 0 6px 10px -4px rgb(27 24 56 / .3);
  transition: transform var(--d-rapide) var(--ease);
}
.btn-rond:hover { filter: brightness(1.04); }
.btn-rond:active { transform: translateY(2px); }
.btn-rond--petit { width: 2.4rem; height: 2.4rem; }
.btn-rond[aria-pressed="true"] { background: var(--encre); color: #fff; }
.btn-rond__aa { font-family: var(--f-titre); font-weight: 700; font-size: .95rem; letter-spacing: -.02em; }

/* — Entête — */
.entete { position: relative; z-index: 50; padding-block: .75rem; }
.entete__ligne { display: flex; align-items: center; gap: var(--s4); }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--encre); flex-shrink: 0; }
.logo .marque { filter: drop-shadow(0 2px 0 rgb(27 24 56 / .18)); transition: transform var(--d-moyen) var(--ease-rebond); }
.logo:hover .marque { transform: rotate(-6deg) scale(1.06); }
.logo__mot { font-family: var(--f-titre); font-weight: 400; font-size: 1.45rem; letter-spacing: -.03em; white-space: nowrap; }
.logo__mot b { font-weight: 700; }

.entete__nav { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.entete__lien {
  display: inline-flex; align-items: center; gap: .3rem; padding: .42rem .68rem;
  border-radius: 10px; text-decoration: none; font-weight: 700; font-size: .92rem;
  color: var(--encre); transition: background-color .15s ease, transform .1s ease;
  user-select: none; white-space: nowrap; flex-shrink: 0;
}
.entete__lien:hover { background: rgb(255 255 255 / .65); }
.entete__lien--sommaire { cursor: pointer; }
.entete__lien--club {
  background: #FEF08A; border: 1.5px solid #CA8A04; color: #854D0E;
  box-shadow: 0 2px 0 #CA8A04;
}
.entete__lien--club:hover { background: #FDE047; transform: translateY(-1px); }

/* Menus déroulants (Classes, Aventures) */
.menu-deroulant { position: relative; display: inline-block; }
.menu-deroulant summary { list-style: none; cursor: pointer; }
.menu-deroulant summary::-webkit-details-marker { display: none; }
.menu-chevron { font-size: .8rem; opacity: .7; transition: transform .2s ease; display: inline-block; }
.menu-deroulant[open] .menu-chevron { transform: rotate(180deg); }

.menu-panneau {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; color: var(--encre); border: 2.5px solid var(--encre);
  border-radius: 18px; box-shadow: 0 12px 30px -6px rgba(27, 24, 56, 0.18), 0 4px 0 var(--encre);
  z-index: 100; padding: 1.1rem;
  animation: menu-pop .18s var(--ease-rebond) both;
}
/* Pont invisible entre l'onglet summary et le panneau pour que le curseur ne perde jamais le survol */
.menu-panneau::before {
  content: "";
  position: absolute;
  top: -16px;
  left: -12px;
  right: -12px;
  height: 18px;
  background: transparent;
}
@keyframes menu-pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Panneau Classes : 3 colonnes de cycles */
.menu-panneau--classes { width: min(92vw, 560px); }
.menu-grille-cycles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.menu-col-cycle { display: flex; flex-direction: column; gap: .4rem; }
.menu-cycle-nom {
  font-family: var(--f-titre); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem;
  padding-bottom: .3rem; border-bottom: 2px solid #E2E8F0;
}
.menu-cycle-nom--primaire { color: #16A34A; border-color: #BBF7D0; }
.menu-cycle-nom--college { color: #0284C7; border-color: #BAE6FD; }
.menu-cycle-nom--lycee { color: #7C3AED; border-color: #DDD6FE; }

.menu-liste-classes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .25rem; }
.menu-lien-classe {
  display: flex; align-items: center; justify-content: space-between;
  padding: .35rem .55rem; border-radius: 8px; text-decoration: none;
  color: var(--encre); font-size: .88rem; font-weight: 600;
  transition: background-color .12s ease;
}
.menu-lien-classe:hover { background: #F1F5F9; color: var(--encre); }
.badge-classe {
  font-family: var(--f-titre); font-weight: 700; font-size: .78rem;
  padding: .1rem .45rem; border-radius: 6px; color: #fff;
}
.badge-classe--primaire { background: #16A34A; }
.badge-classe--college { background: #0284C7; }
.badge-classe--lycee { background: #7C3AED; }

.menu-panneau__pied {
  margin-top: .85rem; padding-top: .75rem;
  border-top: 1.5px dashed #E2E8F0; text-align: center;
}
.menu-pied-lien {
  font-size: .85rem; font-weight: 700; color: var(--encre);
  text-decoration: underline; text-underline-offset: 3px;
}
.menu-pied-lien:hover { color: var(--francais-deep); }

/* Panneau Activités & Espaces Pro : grille de cartes */
.menu-panneau--activites { width: min(92vw, 540px); }
.menu-panneau--pro { width: min(92vw, 480px); }
.menu-grille-activites { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.menu-carte-activite {
  display: flex; align-items: flex-start; gap: .7rem; padding: .65rem .8rem;
  background: #F8FAFC; border: 1.5px solid #E2E8F0; border-radius: 12px;
  text-decoration: none; color: var(--encre); transition: all .15s ease;
}
.menu-carte-activite:hover {
  background: #fff; border-color: var(--encre);
  transform: translateY(-2px); box-shadow: 0 3px 0 var(--encre);
}
.menu-carte-activite__ico { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: .15rem; }
.menu-carte-activite__corps strong { display: block; font-size: .9rem; line-height: 1.2; margin-bottom: .15rem; }
.menu-carte-activite__corps p { font-size: .76rem; color: var(--encre-2); margin: 0; line-height: 1.3; }

/* Bouton de recherche rapide (Ctrl+K) */
.entete__recherche-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .75rem; background: #fff; border: 2px solid var(--encre);
  border-radius: 20px; box-shadow: 0 2px 0 var(--encre);
  text-decoration: none; color: var(--encre-2); font-size: .88rem; font-weight: 600;
  transition: transform .1s ease, box-shadow .1s ease;
  margin-left: .4rem;
}
.entete__recherche-btn:hover {
  background: #fff; color: var(--encre);
  transform: translateY(-1px); box-shadow: 0 3px 0 var(--encre);
}
.entete__recherche-ico { display: inline-flex; align-items: center; color: var(--encre); }
.entete__recherche-ico .ico { width: 17px; height: 17px; }
.entete__recherche-label { font-size: .86rem; }
.entete__recherche-kbd {
  display: inline-block; font-family: monospace; font-size: .7rem; font-weight: 700;
  background: #F1F5F9; border: 1px solid #CBD5E1; border-radius: 5px;
  padding: .1rem .35rem; color: var(--encre-2);
}

.entete__outils { display: flex; align-items: center; gap: .55rem; }
.carnet-puce {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.4rem; padding: .3rem .95rem .3rem .75rem;
  background: var(--encre); color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem;
  border-radius: 12px 12px 12px 4px; box-shadow: 0 3px 0 #000;
}
.carnet-puce:hover { background: #2C2860; }
.carnet-puce__serie { display: inline-flex; align-items: center; gap: .15rem; color: var(--astuce); }
.carnet-puce__serie .ico { width: 16px; height: 16px; }

/* — Pied de page structuré en 4 colonnes — */
.pied-site {
  padding-block: var(--s8) var(--s7); color: var(--pied-texte, var(--encre));
  background: rgb(0 0 0 / .03); border-top: 2px solid rgba(27, 24, 56, .08);
  margin-top: var(--s8);
}
.est-accueil .pied-site { --pied-texte: #fff; background: transparent; border-top-color: rgba(255 255 255 / .2); }
.pied-site__grille { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.pied-site__col-marque { display: flex; flex-direction: column; gap: var(--s3); }
.pied-site__col-marque .logo { margin-bottom: var(--s2); }
.est-accueil .pied-site__col-marque .logo__mot { color: #fff; }
.pied-site__promesse { font-size: 1rem; line-height: 1.45; }
.pied-site__legal { font-size: var(--t-xs); opacity: .75; line-height: 1.4; }
.pied-site__col { display: flex; flex-direction: column; gap: .55rem; }
.pied-site__col h4 {
  font-family: var(--f-titre); font-weight: 700; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem;
  opacity: .9;
}
.pied-site__col a {
  font-weight: 600; font-size: .92rem; text-decoration: none;
  opacity: .85; transition: opacity .12s ease;
}
.pied-site__col a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* Responsive Media Queries */
@media (max-width: 68rem) {
  .entete__recherche-kbd { display: none; }
}
@media (max-width: 58rem) {
  .entete__recherche-label { display: none; }
  .entete__recherche-btn { padding: .45rem; border-radius: 50%; }
}
@media (max-width: 52rem) {
  .entete__nav { display: none; }
  .entete__lien--compte { display: none; }
  .entete__recherche-btn { margin-left: auto; }
  .pied-site__grille { grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
}
@media (max-width: 38rem) {
  .entete__ligne { gap: var(--s2); }
  .entete__outils { gap: .35rem; }
  .logo__mot { font-size: 1.25rem; }
  .carnet-puce { padding: .3rem .65rem; min-height: 2.3rem; font-size: .88rem; }
  .pied-site { padding-bottom: max(var(--s6), env(safe-area-inset-bottom)); }
}
@media (max-width: 32rem) {
  .pied-site__grille { grid-template-columns: 1fr; gap: var(--s5); }
  .carnet-puce span:not(.carnet-puce__serie) { max-width: 5.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 26rem) {
  .carnet-puce span:not(.carnet-puce__serie) { display: none; }
  .carnet-puce { padding-inline: .55rem; }
  .logo__mot { font-size: 1.15rem; }
  .btn-rond--petit { width: 2.25rem; height: 2.25rem; }
  .btn { min-height: 2.85rem; padding: .6rem 1.1rem; }
  .tiroir-mobile__contenu { width: 100%; }
  .tiroir-mobile__scroll { padding: 1rem 1rem max(3rem, env(safe-area-inset-bottom)); }
}

/* Bouton Menu Burger */
.entete__btn-burger { display: none; }
@media (max-width: 52rem) {
  .entete__btn-burger { display: inline-grid; }
}

/* Tiroir Mobile */
body.tiroir-ouvert { overflow: hidden; }

.tiroir-mobile {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; justify-content: flex-end;
}
.tiroir-mobile[hidden] { display: none; }

.tiroir-mobile__fond {
  position: absolute; inset: 0;
  background: rgba(27, 24, 56, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: tiroir-fond 0.2s ease forwards;
}
@keyframes tiroir-fond {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tiroir-mobile__contenu {
  position: relative; z-index: 2;
  width: min(100%, 380px); height: 100%;
  background: #fff; color: var(--encre);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(27, 24, 56, 0.25);
  animation: tiroir-glisse 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes tiroir-glisse {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.tiroir-mobile__tete {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid #E2E8F0;
  background: #F8FAFC;
}

.tiroir-mobile__scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 1rem 1.25rem 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.tiroir-mobile__recherche {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: #F1F5F9; border: 2px solid var(--encre);
  border-radius: 12px; text-decoration: none; color: var(--encre);
  font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 3px 0 var(--encre);
}
.tiroir-mobile__recherche kbd {
  margin-left: auto; font-family: monospace; font-size: 0.75rem;
  background: #fff; border: 1px solid #CBD5E1; border-radius: 4px;
  padding: 0.1rem 0.35rem; color: var(--encre-2);
}

.tiroir-section {
  display: flex; flex-direction: column; gap: 0.6rem;
}
.tiroir-section__titre {
  font-family: var(--f-titre); font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--encre-2);
  margin: 0;
}

.tiroir-grille-classes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem;
}
.tiroir-classe {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.6rem; background: #F8FAFC; border: 1.5px solid #E2E8F0;
  border-radius: 8px; text-decoration: none; color: var(--encre);
  font-size: 0.88rem; font-weight: 600;
}
.tiroir-classe:active { background: #E2E8F0; }
.tiroir-lien-secondaire {
  font-size: 0.84rem; font-weight: 700; color: var(--encre);
  text-decoration: underline; text-underline-offset: 3px;
  margin-top: 0.2rem;
}

.tiroir-grille-activites {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem;
}
.tiroir-carte-activite {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 0.25rem; padding: 0.65rem 0.5rem; background: #F8FAFC;
  border: 1.5px solid #E2E8F0; border-radius: 10px;
  text-decoration: none; color: var(--encre);
}
.tiroir-carte-activite:active {
  background: #fff; border-color: var(--encre);
}
.tiroir-activite-ico { font-size: 1.4rem; line-height: 1; }
.tiroir-carte-activite strong { font-size: 0.85rem; }

.tiroir-liens-principaux {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding-top: 0.75rem; border-top: 1.5px dashed #E2E8F0;
}
.tiroir-lien-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.9rem; background: #fff; border: 2px solid var(--encre);
  border-radius: 10px; text-decoration: none; color: var(--encre);
  font-weight: 700; font-size: 0.92rem;
  box-shadow: 0 2px 0 var(--encre);
}
.tiroir-lien-nav--club {
  background: #FEF08A; border-color: #CA8A04; color: #854D0E;
  box-shadow: 0 2px 0 #CA8A04;
}
.tiroir-btn-connexion {
  margin-top: 0.5rem; text-align: center;
}

/* — Fil d'Ariane — */
.fil { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-block: var(--s4); font-size: var(--t-sm); font-weight: 700; }
.fil a { text-underline-offset: 3px; }
.fil span[aria-hidden] { opacity: .5; }

/* — Étoiles — */
.etoiles { display: inline-flex; gap: 2px; color: var(--encre); vertical-align: middle; }
.etoile { filter: drop-shadow(0 1px 0 rgb(27 24 56 / .2)); }
.etoile--vide { filter: none; }

/* — Barre de progression — */
.barre { display: block; height: .6rem; background: rgb(27 24 56 / .12); border-radius: 99px; overflow: hidden; }
.barre > span { display: block; height: 100%; background: var(--c, var(--cime)); border-radius: 99px; transition: width .6s var(--ease); }

/* — Etiquettes — */
.etiquette, .bientot, .pastille-info {
  display: inline-block; padding: .15rem .6rem; font-size: var(--t-xs); font-weight: 700; letter-spacing: .02em;
  background: var(--astuce); color: var(--encre); border-radius: 6px 6px 6px 2px;
}
.bientot { background: transparent; border: 2px dashed currentColor; opacity: .75; }
.pastille-info { margin-left: .5rem; transform: rotate(-2deg); }
.etiquette--periode {
  font-size: .72rem; padding: .08rem .38rem;
  background: var(--cadre-clair, #eeeaf5); color: var(--encre-2);
  border-radius: 4px; vertical-align: middle;
}

/* — Tampon de classe — */
.tampon {
  display: inline-grid; place-items: center; min-width: 5.5rem; height: 5.5rem; padding-inline: 1rem;
  font-family: var(--f-titre); font-weight: 700; font-size: 2.6rem; letter-spacing: -.04em;
  color: var(--pays-deep); background: #fff; border: 4px solid var(--pays-deep);
  border-radius: 24px 24px 24px 6px; transform: rotate(-4deg);
  box-shadow: 4px 5px 0 rgb(27 24 56 / .22);
}

/* — Formulaires — */
.champ-groupe { display: grid; gap: .3rem; }
.champ-groupe label { font-weight: 700; font-size: var(--t-sm); }
.champ, select.champ {
  min-height: 3rem; padding: .55rem .9rem; width: 100%;
  background: #fff; border: 2.5px solid var(--encre); border-radius: 12px 12px 12px 4px;
  box-shadow: inset 0 2px 0 rgb(27 24 56 / .08);
}
.champ:focus { outline: none; }
.champ:focus-visible { outline: 3px solid var(--encre); box-shadow: 0 0 0 6px var(--astuce); }

.interrupteur { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; padding-block: .8rem; cursor: pointer; }
.interrupteur + .interrupteur { border-top: 2px dashed var(--trait); }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interrupteur__piste { position: relative; width: 3.2rem; height: 1.8rem; background: #D4D0E6; border-radius: 99px; box-shadow: inset 0 2px 0 rgb(27 24 56 / .16); transition: background var(--d-moyen); flex: none; margin-top: .1rem; }
.interrupteur__piste::after { content: ""; position: absolute; top: .22rem; left: .25rem; width: 1.36rem; height: 1.36rem; background: #fff; border-radius: 50%; box-shadow: 0 2px 0 rgb(27 24 56 / .25); transition: transform var(--d-moyen) var(--ease-rebond); }
.interrupteur input:checked + .interrupteur__piste { background: var(--juste); }
.interrupteur input:checked + .interrupteur__piste::after { transform: translateX(1.4rem); }
.interrupteur input:focus-visible + .interrupteur__piste { outline: 3px solid var(--encre); outline-offset: 3px; box-shadow: 0 0 0 6px var(--astuce), inset 0 2px 0 rgb(27 24 56 / .16); }
.interrupteur small { display: block; margin-top: .15rem; color: var(--encre-2); font-size: var(--t-sm); line-height: 1.45; }

/* — Notifications — */
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: 1.2rem; display: grid; justify-items: center; gap: .5rem; pointer-events: none; }
.toast { padding: .7rem 1.2rem; background: var(--encre); color: #fff; font-weight: 700; border-radius: 12px 12px 12px 4px; box-shadow: var(--ombre-3); animation: toast-in .35s var(--ease-rebond); }
.toast--erreur { background: var(--faux-deep); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* — Boîtes de dialogue — */
.dialogue { width: min(92vw, 30rem); margin: auto; padding: 0; border: 0; color: var(--encre); background: transparent; overflow: visible; }
.dialogue::backdrop { background: rgb(27 24 56 / .55); }
.dialogue[open] { animation: entree .3s var(--ease-rebond); }
.dialogue__corps { display: grid; gap: var(--s4); padding: var(--s6); background: var(--feuille); border-radius: var(--r-feuille); box-shadow: var(--ombre-3); position: relative; }
.dialogue__corps::before { content: ""; position: absolute; top: -.7rem; left: 50%; width: 5rem; height: 1.4rem; transform: translateX(-50%) rotate(-2deg); background: rgb(255 216 77 / .9); }
.dialogue--danger .dialogue__corps::before { background: rgb(229 72 58 / .85); }
.dialogue__titre { font-size: var(--t-lg); }
.dialogue__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); }
.btn--danger-plein { --b: var(--faux); --b-deep: var(--faux-deep); --b-on: #fff; }

/* — Tableaux lisibles — */
.tableau { width: 100%; border-collapse: collapse; margin-block: var(--s3) var(--s5); font-size: var(--t-sm); }
.tableau caption { text-align: left; font-family: var(--f-titre); font-weight: 700; font-size: var(--t-md); padding-block: .4rem; }
.tableau th, .tableau td { padding: .55rem .6rem; text-align: left; border-bottom: 2px dashed var(--trait); }
.tableau thead th { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); }
.tableau tbody th { font-weight: 400; }
.tableau a { text-underline-offset: 3px; }

/* — Animation d'entrée des pages — */
.page-entre > main, .page-entre > .plein > main { animation: entree .5s var(--ease) both; }
@keyframes entree { from { opacity: 0; transform: translateY(10px); } }
.entre { animation: entree .45s var(--ease) both; }

/* — Comptes : mot de passe, cases, aide, erreurs — */
.champ-mdp { position: relative; display: block; }
.champ-mdp .champ { padding-right: 6.2rem; }
.champ-mdp__voir {
  position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); min-height: 2.25rem; padding: 0 .7rem;
  font-weight: 700; font-size: var(--t-sm); color: var(--encre); background: var(--feuille-2); border-radius: 8px 8px 8px 3px;
  box-shadow: 0 2px 0 rgb(27 24 56 / .16);
}
.champ-mdp__voir:hover { background: #ECE8F8; }
.champ-mdp__voir:active { transform: translateY(calc(-50% + 2px)); box-shadow: none; }
.champ[aria-invalid="true"] { border-color: var(--faux-deep); box-shadow: inset 0 2px 0 rgb(27 24 56 / .08), 0 0 0 4px var(--faux-wash); }
.champ__aide { font-size: var(--t-sm); color: var(--encre-2); line-height: 1.45; }
.formulaire__erreur {
  padding: .65rem .9rem; font-weight: 700; font-size: var(--t-sm); line-height: 1.4; color: var(--faux-deep);
  background: var(--faux-wash); border-left: 6px solid var(--faux); border-radius: 4px 12px 12px 4px;
}
.cases { display: grid; gap: .8rem; }
.case { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; font-size: var(--t-sm); line-height: 1.5; cursor: pointer; }
.case input {
  appearance: none; width: 1.55rem; height: 1.55rem; margin-top: .05rem; display: grid; place-content: center;
  background: #fff; border: 2.5px solid var(--encre); border-radius: 6px 6px 6px 2px; box-shadow: inset 0 2px 0 rgb(27 24 56 / .08);
}
.case input::after { content: ""; width: .8rem; height: .45rem; border: solid #fff; border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--d-rapide, .15s) var(--ease-rebond); }
.case input:checked { background: var(--encre); }
.case input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.case input:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; box-shadow: 0 0 0 6px var(--astuce); }
.case input[aria-invalid="true"] { border-color: var(--faux-deep); box-shadow: 0 0 0 4px var(--faux-wash); }
.case a { text-underline-offset: 3px; font-weight: 700; }

.etiquette--sync[data-etat="ok"] { color: var(--juste-deep); background: var(--juste-wash); }
.etiquette--sync[data-etat="erreur"] { color: var(--faux-deep); background: var(--faux-wash); }
.dialogue .formulaire__erreur[hidden] { display: none; }

/* — Sprites d'illustration en papier découpé — */
.sprite {
  display: block;
  max-width: 100%;
  max-height: 12rem;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 6px rgb(27 24 56 / .12));
}

/* — Interface de Paiement Sécurisé (Le Club) — */
.dialogue--paiement {
  max-width: min(94vw, 36rem);
  padding: 0;
  border: 0;
  background: transparent;
}
.dialogue--paiement::backdrop {
  background: rgb(27 24 56 / .6);
  backdrop-filter: blur(4px);
}
.paiement-boite {
  background: var(--feuille, #fff);
  border-radius: var(--r-feuille, 20px);
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  box-shadow: var(--ombre-3);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.paiement-tete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed var(--trait, #e5e0f5);
}
.paiement-onglets {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-block: 0.75rem 1.25rem;
}
.paiement-onglet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.5rem;
  min-height: 2.8rem;
  background: #f4f2fa;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--f-titre, sans-serif);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--encre-2, #5a567a);
  transition: all 0.15s ease;
}
.paiement-onglet:hover {
  background: #ebe6f8;
  color: var(--encre, #1b1838);
}
.paiement-onglet.est-actif {
  background: #fff;
  border-color: #7357f2;
  color: #1b1838;
  box-shadow: 0 3px 8px -2px rgba(115, 87, 242, 0.25);
}
.carte-visuelle {
  background: linear-gradient(135deg, #1b1838 0%, #302b63 50%, #24243e 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 20px -5px rgba(27, 24, 56, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.carte-visuelle__haut {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.carte-visuelle__puce {
  width: 38px;
  height: 26px;
  background: linear-gradient(135deg, #ffd700 0%, #e6a817 100%);
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.carte-visuelle__numero {
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  letter-spacing: 2px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  color: #f7f6fc;
}
.carte-visuelle__bas {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.8rem;
  letter-spacing: 1px;
  font-family: monospace;
}
.carte-visuelle__bas small {
  display: block;
  font-size: 0.65rem;
  color: #a49fc4;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.btn-gpay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 22rem;
  min-height: 3.2rem;
  padding: 0.6rem 1.5rem;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-gpay:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.btn-gpay:active {
  transform: translateY(1px);
}
.btn-paypal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 22rem;
  min-height: 3.2rem;
  padding: 0.6rem 1.5rem;
  background: #ffc439;
  color: #003087;
  border: 0;
  border-radius: 12px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 196, 57, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-paypal:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-paypal:active {
  transform: translateY(1px);
}
.paiement-garanties {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #ebe8f5;
  font-size: 0.8rem;
  color: var(--encre-2, #6f6b8f);
  font-weight: 600;
}
.paiement-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  border: 4px solid #ebe8f5;
  border-top-color: #7357f2;
  border-radius: 50%;
  animation: tourner 0.8s linear infinite;
}
@keyframes tourner {
  to { transform: rotate(360deg); }
}
.paiement-ticket {
  background: #f7f6fc;
  border: 1.5px dashed #c9c4e3;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem auto 0;
  max-width: 22rem;
  text-align: left;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.paiement-ticket__ligne {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

