/* Météo du vol libre — le livre en ligne : compte du lecteur, cadenas, assistant, pages de connexion et
   « Vos données » (compte.js). S'appuie sur ../style.css (couleurs, sombre compris) et livre.css. */

/* Les éléments de compte.js qui changent d'affichage gardent l'attribut hidden efficace. */
.pm-compte [hidden], .pm-assistant[hidden], .pm-assistant [hidden], .pm-page [hidden] { display: none !important; }

/* ------------------------------------------------------------ en-tête : se connecter, mon compte */
.site-header .inner { position: relative; }
.pm-compte { position: relative; display: flex; align-items: center; }
.pm-compte-lien {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 0;
  background: none; font: inherit; font-weight: 600; color: var(--primary); text-decoration: none; cursor: pointer;
}
.pm-compte-lien svg { width: 1.15em; height: 1.15em; flex: none; }
.pm-compte-lien:hover, .pm-compte-lien[aria-expanded="true"], .pm-compte-lien[aria-current="page"] { background: var(--surface-2); }
.pm-compte-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 47; min-width: 250px; max-width: calc(100vw - 32px);
  padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.pm-menu-email { margin: 4px 10px 8px; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.pm-compte-menu a, .pm-compte-menu button {
  display: block; width: 100%; padding: 10px; border-radius: 8px; border: 0; background: none; text-align: left;
  font: inherit; font-size: .95rem; color: var(--text); text-decoration: none; cursor: pointer;
}
.pm-compte-menu a:hover, .pm-compte-menu button:hover { background: var(--surface-2); }
.pm-compte-menu .pm-danger { color: var(--ko); }
/* Téléphone : le menu de navigation prend toute la largeur ; le compte remonte sur la ligne du titre. */
@media (max-width: 480px) {
  .pm-compte { position: absolute; top: 12px; right: 12px; }
}
@media (max-width: 359px) {
  .pm-compte-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .pm-compte-lien svg { width: 1.4em; height: 1.4em; }
}

/* ------------------------------------------------------------ cadenas (lecteur non connecté) */
.pm-cadenas { display: inline-flex; margin-left: .35em; vertical-align: -.08em; color: var(--muted); }
.pm-cadenas svg { width: .9em; height: .9em; }
.cc-acces {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.5;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}
.cc-acces svg { width: 1.05em; height: 1.05em; }

/* ------------------------------------------------------------ assistant : bouton flottant et panneau */
/* En bas à gauche : le bouton « Sommaire » occupe le coin droit sur téléphone. */
.pm-assistant-bouton {
  position: fixed; left: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.pm-assistant-bouton svg { width: 1.25em; height: 1.25em; flex: none; }
.pm-assistant-bouton[aria-expanded="true"] { filter: brightness(1.1); }
/* Sur grand écran, le sommaire latéral descend jusqu'en bas : de la marge pour qu'aucune entrée ne reste dessous. */
@media (min-width: 1080px) {
  .livre-nav, .livre-cote.ouvert .livre-nav { padding-bottom: 96px; }
}
@media (max-width: 1079px) {
  .livre .site-footer { padding-bottom: 64px; }
}

.pm-assistant {
  position: fixed; left: 16px; bottom: 76px; z-index: 46; display: flex; flex-direction: column;
  width: min(440px, calc(100vw - 32px)); max-height: min(74vh, 660px);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); font-size: .98rem; line-height: 1.55;
  animation: pm-monte .18s ease-out;
}
@keyframes pm-monte { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pm-assistant.pm-sans-animation { animation: none; }
.pm-assistant-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--border);
}
.pm-assistant-tete h2 { margin: 0; font-size: 1.05rem; }
.pm-fermer {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: 1.6rem; line-height: 1; color: var(--muted);
}
.pm-fermer:hover { background: var(--surface-2); color: var(--text); }
.pm-assistant-corps { overflow-y: auto; padding: 12px 18px 14px; overscroll-behavior: contain; }
.pm-intro { margin: 0 0 12px; color: var(--muted); }
.pm-invite p { margin: 0 0 12px; }
.pm-inactif { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); }
.pm-question label { display: block; margin: 0 0 6px; font-weight: 600; }
.pm-question textarea, .pm-champ input {
  display: block; width: 100%; max-width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; min-height: 44px;
}
.pm-question textarea { min-height: 84px; resize: vertical; }
.pm-question textarea:disabled { opacity: .6; }
.pm-ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pm-compteur { font-size: .85rem; color: var(--muted); }
.pm-reponse { margin-top: 14px; }
.pm-reponse:empty { display: none; }
.pm-rappel {
  margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600;
  overflow-wrap: anywhere;
}
.pm-texte p { margin: 0 0 .7em; }
.pm-texte ul { margin: 0 0 .7em; padding-left: 1.2em; }
.pm-texte li { margin: .25em 0; }
.pm-texte a, .pm-liens a { color: var(--primary); text-underline-offset: 2px; }
.pm-liens-titre { margin: 12px 0 4px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pm-liens { margin: 0; padding-left: 1.2em; }
.pm-liens li { margin: .2em 0; }
.pm-note { margin: 0; color: var(--muted); }
.pm-attente::after { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: .5em; vertical-align: -.05em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pm-tourne .8s linear infinite; }
@keyframes pm-tourne { to { transform: rotate(360deg); } }
.pm-erreur { margin: 0; color: var(--ko); font-weight: 600; }
.pm-petit { margin: 14px 0 0; font-size: .78rem; line-height: 1.45; color: var(--muted); }
.pm-petit a { color: inherit; }

@media (max-width: 600px) {
  .pm-assistant { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .pm-assistant-ouvert .pm-assistant-bouton, .pm-assistant-ouvert .sommaire-bouton { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-assistant, .pm-attente::after { animation: none; }
}
@media print {
  .pm-assistant, .pm-assistant-bouton, .pm-compte, .pm-cadenas, .cc-acces { display: none !important; }
}

/* ------------------------------------------------------------ pages connexion et « Vos données » */
.pm-page { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
.pm-page .hero { padding-bottom: 110px; }
.pm-carte {
  max-width: 34rem; margin: -64px auto 0; position: relative; z-index: 1; padding: 22px 22px 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(20, 40, 70, .1);
}
.pm-carte .feedback { margin: 0 0 16px; }
.pm-carte .feedback p { margin: 0 0 .5em; }
.pm-carte .feedback p:last-child { margin-bottom: 0; }
.pm-form label { font-weight: 600; }
.pm-champ { margin: 0 0 14px; }
.pm-champ label { display: block; margin: 0 0 6px; }
.pm-identite { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pm-bascule { margin: -6px 0 0; font-size: .9rem; }
.pm-lien-bouton {
  font: inherit; color: var(--primary); background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.pm-case { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 4px; cursor: pointer; font-weight: 600; }
.pm-case input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.pm-aide { margin: 0 0 16px 30px; font-size: .86rem; color: var(--muted); }
.pm-form .btn { width: 100%; }
.pm-message { margin: 12px 0 0; min-height: 1.4em; }
/* Pot de miel : hors de l'écran (un robot remplit tout ; un humain ne le voit pas, un lecteur d'écran l'ignore). */
.pm-pot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#pm-envoye:focus { outline: none; }
.pm-extrait { max-width: 34rem; margin: 18px auto 0; font-size: .95rem; text-align: center; }
.pm-info { max-width: 34rem; margin: 28px auto 0; font-size: .95rem; color: var(--muted); }
.pm-info h2 { font-size: 1.05rem; color: var(--text); margin: 0 0 6px; }
.pm-info p + h2 { margin-top: 1.2em; }
.pm-info p { margin: 0 0 .8em; }

.pm-donnees { padding-top: 24px; }
.pm-donnees p, .pm-donnees li { hyphens: manual; -webkit-hyphens: manual; }   /* pas de « Post-Hog » */
.pm-donnees h2 { margin-top: 2em; }
.pm-donnees table { margin: .5em 0 1em; }
.pm-compte-bloc {
  margin: 1.2em 0 2em; padding: 1.1em 1.3em; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); font-family: var(--font); font-size: 1rem;
}
.pm-compte-bloc p { margin: 0 0 .7em; }
.pm-compte-bloc .btn-row { margin-top: 1em; }
.pm-compte-bloc .pm-case { margin-top: .4em; font-weight: 600; }
#pm-accord-note { margin: .2em 0 0 30px; font-size: .9rem; color: var(--muted); min-height: 1.3em; }
#pm-identite-form { margin: 1em 0 0; }
#pm-acces-autre h2 { font-size: 1.1rem; margin: 20px 0 6px; }
#pm-acces-autre p { margin: 0 0 12px; }
#pm-acces-attente { margin: 0; color: var(--muted); }
@media (max-width: 600px) {
  .pm-carte { margin-top: -56px; padding: 18px 16px; }
}
@media (max-width: 420px) {
  .pm-identite { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ soutenir.html : la page du soutien */
.pm-soutenir fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.pm-soutenir legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.s-formule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 400; line-height: 1.45; }
.s-formule:has(input:checked) { border: 2px solid var(--accent); padding: 11px 13px; }
.s-formule input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.s-formule em { font-style: normal; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: .1em; }
.s-formule.s-indisponible { opacity: .5; cursor: default; }
.s-montant { display: flex; align-items: center; gap: 8px; }
.s-montant input { max-width: 8em; }
.s-raccourcis { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.pm-form .s-raccourcis .btn { width: auto; min-height: 36px; padding: 6px 14px; }
.s-ligne { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.pm-soutenir select { display: block; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; min-height: 44px; }
.s-recap { font-weight: 700; margin: 4px 0 12px; }
.s-petit { margin: 12px 0 0; }
.s-liste { padding-left: 1.2em; }
.s-liste li { margin: .3em 0; }
@media (max-width: 480px) { .s-ligne { grid-template-columns: 1fr; } }
.pm-soutenir .pm-aide { margin-left: 0; }
.pm-soutenir .btn.chaud { background: var(--accent); border-color: var(--accent); color: #fff; }
/* « Votre exemplaire » (telecharger.html) : le bouton dans le texte garde ses couleurs (.texte a les remplacerait) */
.pm-telecharger a.btn { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; font-family: var(--font); }
.s-merci { margin-bottom: 8px; }
.s-merci-titre { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; margin: 0 0 8px; color: var(--accent-texte); }
.s-merci-texte { font-size: 1.08rem; line-height: 1.6; }
.s-merci-mail { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; }
.s-merci h2 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
.s-adresse-perso { display: flex; gap: 8px; flex-wrap: wrap; }
.s-adresse-perso input { flex: 1 1 260px; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .9rem; }
.pm-form .s-adresse-perso .btn, .s-adresse-perso .btn { width: auto; }
.s-gerer { text-align: center; font-size: .92rem; margin: 18px 0 0; }

/* ------------------------------------------------------------ « Vos données » et mentions légales */
.d-fiche { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 1em; font-family: var(--font); font-size: .98rem; }
.d-fiche dt { color: var(--muted); }
.d-fiche dd { margin: 0; }
.d-vide { color: var(--muted); font-family: var(--font); font-size: .98rem; }
.pm-donnees table { font-family: var(--font); font-size: .93rem; }
.pm-sommaire-legal { background: var(--surface-2); border-radius: 12px; padding: 12px 18px; font-family: var(--font); }
.pm-sommaire-legal ol { margin: 0; }
.pm-legal h3 { margin-top: 1.4em; }
@media (max-width: 520px) { .d-fiche { grid-template-columns: 1fr; } .d-fiche dd { margin-bottom: 6px; } }
