/* Pages publiques (participer, À propos, sommaire, accès, merci, lire, retrait, plus d'infos…) : l'habillage de la page d'un texte
   (texte.css : fond gris clair, Alegreya, un seul rouge, creux et reliefs doux) appliqué aux composants de clap.css (cadres, boutons, champs).
   Chargée après texte.css par haut_public() (inc/gabarit.php). Le corps porte « corps-texte pub » ; <main> porte « page-pub ».
   Seul l'habillage change : aucune page ne change de structure ni de comportement. L'espace admin garde clap.css seul. */

/* On redéfinit les variables de clap.css : tout ce qui s'en sert prend les couleurs de la page d'un texte. */
body.corps-texte.pub {
  --fond: var(--bg); --texte: var(--ink); --discret: var(--muted); --accent: var(--rouge); --carte: var(--bg);
  --bord: rgba(31, 29, 26, .22);   /* des contours un peu plus marqués que sur la page d'un texte : ici on remplit des données */
  --cadre-creux: inset 3px 3px 9px var(--ombre-d), inset -3px -3px 9px var(--ombre-l);
  --relief: 6px 6px 16px var(--ombre-d), -6px -6px 16px var(--ombre-l);
  --relief-petit: 3px 3px 8px var(--ombre-d), -3px -3px 8px var(--ombre-l);
  color-scheme: light;
}

main.page-pub { max-width: 40rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.page-pub h1 { margin: 0 0 1rem; font-weight: 400; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; }
.page-pub h2, .page-pub h3 { font-weight: 700; }
.page-pub p { margin: 0 0 1em; }
.page-pub .chapeau, .page-pub .mention-ia, .page-pub .a-venir, .page-pub .information, .page-pub .provisoire { color: var(--muted); }

/* Cadres : en creux, avec un contour. */
.page-pub .carte { background: transparent; border: 1px solid var(--bord); border-radius: 24px; box-shadow: var(--cadre-creux); padding: 1.5rem; margin: 1.5rem 0; }
.page-pub .etroite { max-width: 26rem; }
.page-pub .carte.attente { border-color: var(--rouge); } /* dépôts coupés (spec, § 3.2) : un filet rouge, pour qu'on le voie */
.page-pub fieldset { border: 1px solid var(--bord); border-radius: 18px; margin: 1rem 0; padding: .75rem 1rem 1rem; box-shadow: var(--cadre-creux); }
.page-pub legend { padding: 0 .5rem; font-family: var(--sans); font-weight: 700; }
.page-pub .consentement { border: 1px solid var(--rouge); border-radius: 18px; }
.page-pub .texte-a-lire { background: transparent; border-left: 3px solid var(--rouge); }
.page-pub .choix-retrait { border: 1px solid var(--bord); border-radius: 14px; }

/* Champs : en creux. */
.page-pub label { font-family: var(--sans); font-weight: 500; }
.page-pub input[type=text], .page-pub input[type=password], .page-pub input[type=email], .page-pub select, .page-pub textarea {
  width: 100%; padding: .65rem .85rem; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--bord); border-radius: 14px; box-shadow: var(--cadre-creux); }
.page-pub input[type=file] { font: inherit; max-width: 100%; }
.page-pub input[type=checkbox], .page-pub input[type=radio] { accent-color: var(--rouge); }
.page-pub .erreur { color: var(--rouge); font-weight: 700; }

/* Boutons : en relief, texte en rouge ; le bouton « retour » est plus discret (contour). */
.page-pub button, .page-pub .bouton {
  display: inline-block; margin-top: .75rem; padding: .7rem 1.4rem; font-family: var(--sans); font-weight: 700; font-size: calc(1.0625rem * var(--k)); line-height: 1.25;
  color: var(--rouge); background: var(--bg); border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; box-shadow: var(--relief); cursor: pointer; text-decoration: none; transition: box-shadow .15s; }
.page-pub button:hover, .page-pub .bouton:hover { box-shadow: 4px 4px 10px var(--ombre-d), -4px -4px 10px var(--ombre-l); text-decoration: none; }
.page-pub button:active, .page-pub .bouton:active { box-shadow: inset 6px 6px 16px var(--ombre-d), inset -6px -6px 16px var(--ombre-l); }
.page-pub button[hidden] { display: none; }
.page-pub button[disabled] { opacity: .5; cursor: not-allowed; box-shadow: var(--cadre-creux); }
.page-pub .bouton-retour { display: inline-block; margin-top: .75rem; padding: .55rem 1.1rem; font-family: var(--sans); font-weight: 500; color: var(--ink); background: transparent;
  border: 1px solid var(--bord); border-radius: 14px; text-decoration: none; }
.page-pub .bouton-retour:hover { background: rgba(255, 255, 255, .5); border-color: var(--muted); }
.page-pub a.bouton-retour:hover { text-decoration: none; }
/* Plus d'infos : les deux « ← Retour » ont le volume et l'ombre du bouton « Lire à voix haute » (texte.css). */
.page-pub .bouton-retour.relief { background: var(--bg); border-color: rgba(255, 255, 255, .2); border-radius: 16px; box-shadow: var(--relief); transition: box-shadow .15s; }
.page-pub .bouton-retour.relief:hover { background: var(--bg); border-color: rgba(255, 255, 255, .2); box-shadow: 4px 4px 10px var(--ombre-d), -4px -4px 10px var(--ombre-l); }
.page-pub .bouton-retour.relief:active { box-shadow: inset 6px 6px 16px var(--ombre-d), inset -6px -6px 16px var(--ombre-l); }
@media (prefers-reduced-motion: reduce) { .page-pub .bouton-retour.relief { transition: none; } }
@media (prefers-reduced-motion: reduce) { .page-pub button, .page-pub .bouton { transition: none; } }

/* Sommaire : la liste de toutes les images en prose, par série. */
.page-pub .recueil-serie { margin: 2rem 0 .4rem; font-family: 'Alegreya SC', Georgia, serif; font-weight: 400; font-feature-settings: 'smcp', 'c2sc'; text-transform: lowercase;
  font-size: 1.75rem; letter-spacing: .06em; color: var(--ink); }
.page-pub .recueil { padding-left: 0; }
.page-pub .recueil a { align-items: baseline; padding: .45rem .75rem; border-radius: 12px; color: var(--ink); }
.page-pub .recueil a:hover, .page-pub .recueil a:focus-visible { background: rgba(255, 255, 255, .6); text-decoration: none; }
.page-pub .recueil .titre { color: var(--rouge); font-family: var(--sans); font-weight: 700; }
.page-pub .recueil .phrase, .page-pub .recueil .nb { color: var(--muted); }

/* Sommaire : un dessin carré face à chaque série qui en a un. L'espace entre deux séries est celui de .sommaire-serie (marge du haut) ; à l'intérieur
   d'une série, le nom et les lignes sont resserrés (écran large comme écran étroit). Écran large (à partir de 70 rem) : le dessin est dans la marge de
   gauche, son haut aligné sur le haut du nom de la série, et la liste garde toute la largeur de la colonne ; écran plus étroit : le dessin est au-dessus du nom. */
.page-pub .sommaire-serie { margin: 2rem 0 0; }
.page-pub .sommaire-serie .recueil-serie { margin: 0 0 .15rem; line-height: 1.1; }
.page-pub .sommaire-serie .recueil li { margin: 0; }
.page-pub .sommaire-serie .recueil a { padding-top: .15rem; padding-bottom: .15rem; }
.page-pub .sommaire-dessin { margin: 0; max-width: 14rem; }
.page-pub .sommaire-dessin img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.page-pub .sommaire-dessin .legende-dessin { margin-top: .4rem; }
.page-pub .sommaire-serie.avec-dessin .recueil-serie { margin-top: .75rem; }
@media (min-width: 70rem) {
  .page-pub .sommaire-serie { position: relative; }
  .page-pub .sommaire-serie.avec-dessin { min-height: 16rem; }   /* de la place pour le dessin et sa ligne, même si la série a peu de textes */
  .page-pub .sommaire-dessin { position: absolute; top: 0; right: calc(100% + 2rem); width: 14rem; }
  .page-pub .sommaire-serie .recueil-serie { line-height: 1; }
  .page-pub .sommaire-serie.avec-dessin .recueil-serie { margin-top: 0; position: relative; top: -.575rem; }   /* le haut des capitales du nom au niveau du haut du dessin */
}

/* Parcours d'envoi sur ordinateur (parcours-ordinateur.css, chargé par le script) : « .page-pub button » est plus précis que les classes « po- »,
   donc on redonne ici aux boutons du parcours leur forme (têtes d'étape en ligne, cartes de choix, liens), avec le style doux du site. */
.page-pub .po-tete { display: flex; align-items: center; gap: .75rem; width: 100%; margin: 0; padding: .8rem 1rem; text-align: left; font-size: 1rem;
  color: var(--ink); background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.page-pub .po-tete:not(:disabled):hover { background: rgba(255, 255, 255, .5); box-shadow: none; }
.page-pub .po-tete:active { box-shadow: none; }
.page-pub .po-tete:disabled { cursor: default; opacity: .5; }
.page-pub .po-lien { display: inline; margin: 0; padding: .2rem .5rem; font: inherit; color: var(--rouge); background: transparent; border: 0; box-shadow: none; text-decoration: underline; }
.page-pub .po-lien:hover, .page-pub .po-lien:active { box-shadow: none; }
.page-pub .po-choix button { display: flex; flex-direction: column; gap: .15rem; margin: 0; text-align: left; color: var(--ink); }
.page-pub .po-secondaire, .page-pub .po-verifier { background: transparent; color: var(--rouge); border: 1px solid var(--rouge); box-shadow: none; }
.page-pub .po-secondaire:hover, .page-pub .po-verifier:hover, .page-pub .po-secondaire:active, .page-pub .po-verifier:active { box-shadow: none; background: rgba(255, 255, 255, .5); }
.page-pub .po-actions button, .page-pub .po-confirmation button { margin-top: 0; }
.page-pub .po-panneau .enr-arreter { color: #fff; background: var(--rouge); border-color: var(--rouge); }
.page-pub .proposition-citee { margin: .5rem 0 0; padding: .25rem 0 .25rem 1rem; border-left: 3px solid var(--rouge); max-height: 14rem; overflow: auto; overflow-wrap: anywhere; }
