/* La petite bulle — direction « atelier de papier » (design-artifacts/D-Design-System/00-design-system.md) */

@font-face {
  font-family: "Caprasimo";
  src: url("/static/polices/caprasimo-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/static/polices/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --pb-papier: #E6ECE1;
  --pb-papier-clair: #EEF2EA;
  --pb-blanc: #FFFFFF;
  --pb-encre: #213D33;
  --pb-mousse: #4C6358;
  --pb-outremer: #3E4FB8;
  --pb-outremer-fonce: #2B3A94;
  --pb-mimosa: #F3CF55;
  --pb-dragee: #F1B7C4;
  --pb-pli: #C98E9C;
  --pb-scotch: rgba(255, 255, 255, .6);
  --pb-trait: #B9C5BC;

  --pb-coin-a: 22px 30px 24px 28px;
  --pb-coin-b: 26px 20px 30px 22px;
  --pb-coin-c: 20px 28px 22px 26px;
  --pb-coin-bouton: 14px;
  --pb-coin-champ: 12px;

  --pb-titre: "Caprasimo", Georgia, serif;
  --pb-texte: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--pb-papier-clair);
  color: var(--pb-encre);
  font-family: var(--pb-texte);
  font-size: 16px;
  line-height: 1.5;
}
body.avec-barre { padding-bottom: 76px; }

img { max-width: 100%; height: auto; }

a { color: var(--pb-outremer); text-underline-offset: 3px; }
a:hover { color: var(--pb-outremer-fonce); }

:focus-visible {
  outline: 3px solid var(--pb-outremer);
  outline-offset: 2px;
  border-radius: 6px;
}

.evitement {
  position: absolute; left: -9999px; top: 8px;
  background: var(--pb-blanc); padding: 8px 12px; border-radius: 8px; z-index: 10;
}
.evitement:focus { left: 8px; }

/* Un élément masqué le reste, même quand sa classe lui donne un affichage (boutons, palettes). */
[hidden] { display: none !important; }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Titres et texte ------------------------------------------------------------------------- */

h1, .titre-carte, .titre-ouverture, .feuille-titre {
  font-family: var(--pb-titre);
  font-weight: 400;
  letter-spacing: .005em;
}
h1 { font-size: 30px; line-height: 1.1; margin: 4px 0 12px; }
h2, h3 { margin: 0; }
.titre-carte { font-size: 19px; line-height: 1.2; margin: 0; }
.titre-carte a { color: inherit; text-decoration: none; }
.titre-carte a:hover { text-decoration: underline; }
.titre-section { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.petit { font-size: 14px; line-height: 1.45; color: var(--pb-mousse); }
.papier-outremer .petit { color: #E8ECFF; }
.salutation { color: var(--pb-mousse); margin: 0; }
.chapeau { font-size: 17px; }

/* --- Mise en page ---------------------------------------------------------------------------- */

.entete {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto; padding: 14px 20px 0;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--pb-titre); font-size: 19px; line-height: .95; color: var(--pb-encre); text-decoration: none;
}
.logo img { display: block; width: 42px; height: 44px; }
.lien-entete { font-weight: 600; }

.page { max-width: 640px; margin: 0 auto; padding: 16px 20px 32px; }

.section { margin: 28px 0; }

.pied {
  max-width: 640px; margin: 0 auto; padding: 16px 20px 28px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px;
}
.pied a { color: var(--pb-mousse); }

@media (min-width: 720px) {
  body { background: var(--pb-papier); }
  .page {
    background: var(--pb-papier-clair);
    border-radius: 28px 40px 32px 36px;
    margin: 20px auto;
    padding: 32px 40px 40px;
  }
  h1 { font-size: 40px; }
}

.rangee { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actions, .actions-bas { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

/* --- Cartes-papier ---------------------------------------------------------------------------- */

.carte {
  position: relative;
  padding: 18px;
  border-radius: var(--pb-coin-a);
  margin: 0 0 16px;
}
.pile { display: flex; flex-direction: column; gap: 16px; }
.pile > .carte { margin: 0; }
.pile > .carte:nth-child(3n + 1) { transform: rotate(-1.2deg); border-radius: var(--pb-coin-a); }
.pile > .carte:nth-child(3n + 2) { transform: rotate(.8deg); border-radius: var(--pb-coin-b); }
.pile > .carte:nth-child(3n) { transform: rotate(-.5deg); border-radius: var(--pb-coin-c); }
.pile.une > .carte { transform: rotate(-.8deg); }

.carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.carte .bouton { margin-top: 8px; }
.actions-carte { margin-top: 8px; }
.actions-carte .bouton { margin-top: 0; }

.papier-dragee { background: var(--pb-dragee); }
.papier-mimosa { background: var(--pb-mimosa); }
.papier-outremer { background: var(--pb-outremer); color: var(--pb-blanc); }
.papier-outremer a { color: var(--pb-blanc); }
.papier-outremer .bouton { background: var(--pb-blanc); color: var(--pb-outremer); }
.papier-clair { background: var(--pb-papier-clair); border: 1.5px solid var(--pb-trait); }
.page .papier-clair { background: var(--pb-blanc); }

/* Un seul morceau de scotch par écran, pour l'élément important. */
.scotch::before {
  content: ""; position: absolute; top: -9px; left: 38%;
  width: 70px; height: 18px; background: var(--pb-scotch); transform: rotate(-4deg);
}

.etiquette {
  flex-shrink: 0;
  background: var(--pb-papier-clair); color: var(--pb-encre);
  border-radius: 8px; padding: 4px 9px;
  font-size: 13px; font-weight: 700; line-height: 1.3;
  transform: rotate(2deg);
}

.bandeau { padding: 12px 16px; border-radius: var(--pb-coin-b); font-family: var(--pb-titre); font-size: 22px; transform: rotate(-1deg); }

.feuille-simple { padding: 6px 0; }

/* --- La surprise : la feuille pliée ----------------------------------------------------------- */

.feuille {
  position: relative;
  min-height: 190px;
  margin: 6px 6px 12px;
  padding: 28px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border-radius: 6px;
  background: linear-gradient(225deg, var(--pb-papier-clair) 0 34px, var(--pb-pli) 34px 36px, var(--pb-dragee) 36px);
  transform: rotate(1.5deg);
}
.feuille::before {
  content: ""; position: absolute; left: -10px; top: 14px;
  width: 54px; height: 18px; background: var(--pb-scotch); transform: rotate(-38deg);
}
.feuille-titre { font-size: 32px; margin: 0; }
.feuille p { margin: 0; }

/* Le dévoilement, une seule fois : la feuille se déplie. */
.devoile .programme-devoile > li { animation: deplier .4s ease-out both; }
.devoile .programme-devoile > li:nth-child(2) { animation-delay: .08s; }
.devoile .programme-devoile > li:nth-child(3) { animation-delay: .16s; }
.devoile .programme-devoile > li:nth-child(n + 4) { animation-delay: .24s; }
@keyframes deplier {
  from { opacity: 0; transform: perspective(600px) rotateX(-70deg); transform-origin: top; }
  to { opacity: 1; transform: none; }
}

.programme-devoile { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.programme-devoile > li { margin: 0; }
.programme-devoile > li:nth-child(odd) { border-radius: var(--pb-coin-b); }

.ressources { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.ressources img { border-radius: 10px; display: block; margin-bottom: 6px; }
.ressources li > p:last-child { margin-bottom: 0; }

/* --- Les trois temps ------------------------------------------------------------------------- */

.trois-temps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 4px 0 20px; }
.trois-temps li {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700;
  border: 1.5px dashed var(--pb-mousse); color: var(--pb-mousse);
}
.trois-temps li.en-cours { background: var(--pb-mimosa); border-color: var(--pb-mimosa); color: var(--pb-encre); transform: rotate(-2deg); }

.temps-explication { padding-left: 20px; }
.temps-explication.grand { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.temps-explication.grand > li:nth-child(1) { transform: rotate(-1deg); }
.temps-explication.grand > li:nth-child(2) { transform: rotate(.7deg); border-radius: var(--pb-coin-b); }
.temps-explication.grand > li:nth-child(3) { transform: rotate(-.4deg); border-radius: var(--pb-coin-c); }
.temps-explication.grand p { margin: 6px 0 0; }
.temps-explication.grand > .carte { margin: 0; }

/* --- Accueil public -------------------------------------------------------------------------- */

.ouverture { padding-top: 6px; }
.collage { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.collage li {
  font-weight: 700; font-size: 14px; padding: 7px 14px;
  border-radius: 14px 18px 12px 16px;
}
.collage li:nth-child(1) { transform: rotate(-3deg); }
.collage li:nth-child(2) { transform: rotate(2deg); }
.collage li:nth-child(3) { transform: rotate(-1deg); }
.collage li:nth-child(4) { transform: rotate(3deg); }
.titre-ouverture { font-size: 36px; line-height: 1.05; margin: 0 0 14px; }
@media (min-width: 720px) { .titre-ouverture { font-size: 52px; } }

/* --- Boutons --------------------------------------------------------------------------------- */

.bouton, .bouton-secondaire {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--pb-coin-bouton);
  font-family: var(--pb-texte); font-size: 16px; font-weight: 700; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.bouton { background: var(--pb-outremer); color: var(--pb-blanc); border: 0; }
.bouton:hover { background: var(--pb-outremer-fonce); color: var(--pb-blanc); }
.bouton-secondaire { background: transparent; color: var(--pb-encre); border: 1.5px solid var(--pb-encre); }
.bouton-secondaire:hover { background: rgba(33, 61, 51, .06); color: var(--pb-encre); }
.formulaire > .bouton, .actions .bouton, .actions-bas a, .feuille-simple .bouton { width: 100%; }
@media (min-width: 720px) { .formulaire > .bouton { width: auto; } }

/* Un lien d'action discret : l'encre du site, souligné d'un trait doux plutôt qu'en bleu « adresse web ». */
.bouton-lien {
  background: none; border: 0; padding: 8px 0; min-height: 44px;
  color: var(--pb-encre); font: inherit; font-weight: 700;
  text-decoration: underline 2px rgba(33, 61, 51, .3); text-underline-offset: 4px;
  cursor: pointer;
}
.bouton-lien:hover { color: var(--pb-encre); text-decoration-color: currentColor; }
.papier-outremer .bouton-lien { color: var(--pb-blanc); text-decoration-color: rgba(255, 255, 255, .5); }

.icone {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 10px; cursor: pointer; color: inherit;
}
.icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icone:disabled { opacity: .35; cursor: default; }

button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pb-encre); }

/* --- Formulaires ----------------------------------------------------------------------------- */

.formulaire { display: flex; flex-direction: column; gap: 18px; }
.formulaire-ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.formulaire-ligne input[type="text"] { flex: 1 1 200px; }

.champ { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.champ label, .champ legend, .champ .libelle { font-weight: 700; font-size: 15px; }
.champ legend { margin-bottom: 6px; padding: 0; }

input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="number"],
input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 48px;
  padding: 10px 14px;
  font: inherit; color: var(--pb-encre);
  background: var(--pb-blanc);
  border: 1.5px solid var(--pb-mousse);
  border-radius: var(--pb-coin-champ);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--pb-outremer); }

.aide { font-size: 14px; color: var(--pb-mousse); margin: 0; }
.en-erreur input, .en-erreur textarea { background: #FDF0F3; }
.erreur-champ, .alerte {
  background: var(--pb-dragee); color: var(--pb-encre);
  padding: 10px 14px; border-radius: 12px; margin: 0; font-size: 15px;
}
.alerte { margin-bottom: 16px; }

.choix {
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 44px; padding: 10px 0; font-weight: 400; cursor: pointer;
}
.choix input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--pb-outremer); }
.choix-date { background: var(--pb-blanc); border-radius: var(--pb-coin-champ); padding: 12px 14px; }

.durees { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille-choix { position: relative; }
.pastille-choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pastille-choix span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--pb-encre); border-radius: 12px; font-weight: 600;
}
.pastille-choix input:checked + span { background: var(--pb-mimosa); border-color: var(--pb-mimosa); transform: rotate(-2deg); }
.pastille-choix input:focus-visible + span { outline: 3px solid var(--pb-outremer); outline-offset: 2px; }

.date-proposee { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; background: var(--pb-blanc); border-radius: var(--pb-coin-champ); margin-bottom: 10px; }
.date-proposee label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 520px) { .date-proposee { grid-template-columns: 2fr 1fr 1fr; } }

.lien-invitation input { font-size: 14px; }

.fichier { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-profil { position: relative; }
.photo-profil:focus-within .bouton-fichier { outline: 3px solid var(--pb-outremer); outline-offset: 2px; }
.bouton-fichier { cursor: pointer; }
.photo-profil { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.details[open] summary { margin-bottom: 6px; }

/* --- Personnes ------------------------------------------------------------------------------- */

.pastilles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 14px; }
.pastille-personne { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 56px; }
.pastille-personne .prenom { font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.pastille {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}
span.pastille:nth-of-type(odd) { transform: rotate(-5deg); }
.pastille.grande { width: 72px; height: 72px; font-size: 26px; }
/* Sur une carte de couleur, un liseré clair garde la pastille visible, même de la même couleur. */
.carte .pastille { box-shadow: 0 0 0 2px var(--pb-blanc); }

.liste-simple { padding-left: 20px; margin: 0; }
.liste-simple li { margin-bottom: 6px; }

/* --- Le ruban et les bandes du programme ---------------------------------------------------- */

.ruban-cadre { margin: 18px 0 22px; }
.ruban { display: block; width: 100%; height: 28px; overflow: visible; }
.ruban rect { stroke: var(--pb-papier-clair); stroke-width: .4; }
.seg-dragee { fill: var(--pb-dragee); }
.seg-mimosa { fill: var(--pb-mimosa); }
.seg-outremer { fill: var(--pb-outremer); }
.ruban .seg-libre { fill: none; stroke: var(--pb-mousse); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ruban-legende { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--pb-mousse); }
.ruban-legende strong { color: var(--pb-encre); }
.ruban-legende .depasse { background: var(--pb-dragee); padding: 0 8px; border-radius: 6px; }

.bandes { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 10px; min-height: 12px; }
.bande {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 10px 6px 10px 12px;
  border-radius: 14px 18px 12px 16px;
}
.bande:nth-child(odd) { transform: rotate(-.6deg); }
.bande:nth-child(even) { transform: rotate(.5deg); border-radius: 16px 12px 18px 14px; }
.bande.gardee { background: transparent; border: 1.5px dashed var(--pb-mousse); color: var(--pb-encre); transform: none; }
.bande.gardee .petit { color: var(--pb-mousse); }
.bande-texte { flex: 1 1 auto; min-width: 0; }
.bande-titre { font-weight: 700; margin: 0; }
.bande-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px; max-width: 50%; }
/* La poignée capte tout le geste : la page ne défile pas pendant qu'on déplace un moment. */
.poignee {
  display: flex; justify-content: center; width: 28px; min-height: 44px; padding-top: 12px; flex-shrink: 0;
  cursor: grab; touch-action: none;
}
.poignee svg { width: 14px; height: 20px; fill: currentColor; }
/* Le moment saisi se soulève comme une bande de papier qu'on tient entre les doigts. */
.bande.en-deplacement {
  position: relative; z-index: 2; cursor: grabbing;
  transform: rotate(1.5deg) scale(1.02);
  box-shadow: 0 14px 28px rgba(33, 61, 51, .22);
}
.bandes.cible { outline: 2px dashed var(--pb-outremer); outline-offset: 4px; border-radius: 12px; }

/* --- Messages et barre du bas --------------------------------------------------------------- */

.message {
  background: var(--pb-mimosa); color: var(--pb-encre);
  padding: 10px 16px; border-radius: var(--pb-coin-b);
  font-weight: 600; transform: rotate(-.6deg);
}

.barre {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: space-around;
  background: var(--pb-papier); border-top: 1.5px solid var(--pb-trait);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.barre a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 72px; min-height: 52px; justify-content: center;
  color: var(--pb-encre); text-decoration: none; font-size: 12px; font-weight: 600;
  border-radius: 12px;
}
.barre svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.barre a[aria-current="page"] .libelle-barre { box-shadow: inset 0 -4px 0 var(--pb-mimosa); }
.icone-barre { position: relative; display: inline-flex; }

/* Compteur : un petit rond outremer, comme une gommette, pour ce qui attend une réponse. */
.compteur {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--pb-outremer); color: var(--pb-blanc);
  font-size: 12px; font-weight: 800; line-height: 1;
}
.barre .compteur { position: absolute; top: -7px; right: -13px; box-shadow: 0 0 0 2px var(--pb-papier); }

/* « 1 demande à regarder » : une étiquette blanche bien visible, sur n'importe quelle carte. */
.alerte-demandes {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 12px;
  padding: 6px 14px 6px 10px; border: 1.5px solid var(--pb-encre); border-radius: 999px;
  background: var(--pb-blanc); color: var(--pb-encre); font-weight: 700; text-decoration: none;
  transform: rotate(-1deg);
}
.alerte-demandes svg {
  width: 22px; height: 22px; flex-shrink: 0;
  fill: none; stroke: var(--pb-outremer); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.alerte-demandes:hover { background: var(--pb-papier-clair); }

/* --- Pages diverses ------------------------------------------------------------------------- */

.tete-page p { margin-bottom: 4px; }
.inspiration .exemples { margin: 6px 0 0; padding-left: 18px; }
.regles { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.regles .carte { margin: 0; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.chiffres .carte { margin: 0; }
.chiffres dt { font-size: 13px; color: var(--pb-mousse); }
.chiffres dd { margin: 4px 0 0; font-family: var(--pb-titre); font-size: 28px; }
.invitation h1 { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Résultats sous un formulaire de recherche */
.formulaire + .pile, .formulaire + .alerte, .formulaire + .feuille-simple, .formulaire + .carte { margin-top: 28px; }

/* --- Simulation (administrateur) ------------------------------------------------------------ */

.bandeau-simulation {
  position: sticky; top: 0; z-index: 6;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px;
  padding: 6px 16px; background: var(--pb-outremer); color: var(--pb-blanc); font-size: 14px;
}
.bandeau-simulation form { margin: 0; }
.bandeau-simulation .bouton-lien { color: var(--pb-blanc); text-decoration-color: rgba(255, 255, 255, .5); min-height: 36px; padding: 4px 0; }
.personnages { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.personnage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.personnage form { margin: 0; }
.personnage .actions-personnage { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.boutons-temps { display: flex; flex-wrap: wrap; gap: 6px; }
.boutons-temps .bouton-secondaire { min-height: 40px; padding: 0 12px; font-size: 14px; }
.courrier { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin: 8px 0 0; }
.lien-prive input { font-size: 13px; }

/* --- Petit chronomètre des durées ----------------------------------------------------------- */

.cadran { width: 22px; height: 22px; flex-shrink: 0; transform: rotate(-8deg); overflow: visible; }
.cadran-fond { fill: var(--pb-papier-clair); }
.cadran-part { fill: var(--pb-mimosa); }
.cadran-bord { fill: none; stroke: var(--pb-encre); stroke-width: 1.6; }
.cadran-graduations { fill: none; stroke: var(--pb-encre); stroke-width: 1.3; stroke-linecap: round; }
.cadran-centre, .cadran-bouton { fill: var(--pb-encre); }
.papier-mimosa .cadran-part { fill: var(--pb-outremer); }
.papier-outremer .cadran-fond { fill: var(--pb-outremer); }
.papier-outremer .cadran-part { fill: var(--pb-mimosa); }
.papier-outremer .cadran-bord, .papier-outremer .cadran-graduations { stroke: var(--pb-blanc); }
.papier-outremer .cadran-centre, .papier-outremer .cadran-bouton { fill: var(--pb-blanc); }
.avec-cadran { display: flex; align-items: center; gap: 6px; }
.pastille-choix span { gap: 6px; }
.pastille-choix input:checked + span .cadran-part { fill: var(--pb-outremer); }
.bande-details { font-size: 14px; line-height: 1.45; margin: 6px 0 0; white-space: pre-line; }

/* --- Liens vers les applis (GPS, agenda) ---------------------------------------------------- */

.lien-appli { gap: 8px; }
.icone-trait { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --- Ressources mises en forme, vidéos, émojis ---------------------------------------------- */

.texte-riche p { margin: 0 0 8px; }
.texte-riche ul, .texte-riche ol { margin: 0 0 8px; padding-left: 22px; }
.texte-riche li { margin-bottom: 4px; }
.video { margin: 10px 0; }
.video-facade {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 16 / 9; border-radius: 14px; background: var(--pb-encre); color: var(--pb-blanc);
  text-decoration: none; font-weight: 700;
}
.video-facade:hover { color: var(--pb-blanc); }
.video-facade svg { width: 56px; height: 56px; }
.video-facade svg circle { fill: var(--pb-mimosa); }
.video-facade svg path { fill: var(--pb-encre); }
.video .petit { margin: 6px 0 0; }
.papier-outremer .video-facade { background: var(--pb-papier-clair); color: var(--pb-encre); }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; }
.emojis { display: flex; flex-wrap: wrap; gap: 4px; }
.emojis button {
  min-width: 40px; min-height: 40px; font-size: 20px; line-height: 1;
  background: var(--pb-blanc); border: 1.5px solid var(--pb-trait); border-radius: 10px; cursor: pointer;
}

/* Texte saisi tel quel (présentation) : les retours à la ligne sont gardés. */
.texte-libre { white-space: pre-line; }
/* Photo et prénom en tête d'une carte (demandes) : un peu d'air avant la présentation. */
.tete-personne { margin-bottom: 12px; }
/* Le texte à côté de la photo se centre sur elle, sans marge qui le décale vers le haut. */
.tete-personne > p { margin: 0; }

/* --- Retour en haut de page : une pastille-flèche, comme les ronds du logo -------------------- */
.retour { margin: 0 0 6px; }
.retour a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--pb-encre); font-weight: 700; font-size: 15px; line-height: 1.25; text-decoration: none;
}
.retour a::before {
  content: ""; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--pb-encre);
  background: var(--pb-mimosa) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23213D33' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12.4c-4.2-.5-8.6-.4-12.6-.3M11.2 6.4 5.6 12l5.8 5.6'/%3E%3C/svg%3E") center / 18px no-repeat;
  transform: rotate(-8deg);
  transition: transform .15s ease;
}
.retour a:hover { text-decoration: underline 2px var(--pb-dragee); text-underline-offset: 4px; }
.retour a:hover::before { transform: rotate(-8deg) translateX(-3px); }
@media (prefers-reduced-motion: reduce) { .retour a::before { transition: none; } }

/* --- Adresses proposées pendant la frappe ----------------------------------------------------- */

.saisie-adresse { position: relative; }
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5;
  margin: 0; padding: 6px 0; list-style: none;
  max-height: 300px; overflow-y: auto;
  background: var(--pb-blanc);
  border: 1.5px solid var(--pb-outremer);
  border-radius: var(--pb-coin-champ);
  box-shadow: 0 12px 28px rgba(33, 61, 51, .16);
}
.suggestions [role="option"] {
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  min-height: 52px; padding: 8px 14px 8px 18px;
  cursor: pointer;
}
.suggestions [role="option"] + [role="option"] { border-top: 1px solid var(--pb-papier); }
.suggestions [role="option"]:hover, .suggestions [aria-selected="true"] {
  background: var(--pb-papier-clair);
  box-shadow: inset 4px 0 0 var(--pb-outremer);
}
.suggestion-voie { font-weight: 700; }
.suggestion-ville { font-size: 14px; color: var(--pb-mousse); }

/* --- Bas du profil : compte, puis outils d'administration ------------------------------------- */

.compte { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.compte form { margin-bottom: 12px; }
.compte .bouton-lien { display: inline-flex; align-items: center; }
.compte-admin {
  align-self: stretch;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--pb-trait);
}
.rangee + .apport { margin-top: 16px; }
.programme-devoile + .bouton { margin-top: 20px; }
.section > .rangee + .petit, .apport + .petit, form.rangee + .petit { margin-top: 14px; }
.bouton + .petit { margin-top: 10px; }

/* --- Inviter au prochain rendez-vous : des personnes à toucher ------------------------------- */

.sous-legende { margin: 14px 0 8px; font-size: 14px; font-weight: 700; color: var(--pb-mousse); }
.rangee.sous-legende { justify-content: space-between; align-items: center; }
.invites { display: flex; flex-wrap: wrap; gap: 10px; }
.invite { position: relative; }
.invite input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.invite > span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  padding: 4px 14px 4px 5px; border: 1.5px solid var(--pb-encre); border-radius: 999px;
  background: var(--pb-blanc); font-weight: 600;
}
.invite .pastille { width: 36px; height: 36px; font-size: 14px; transform: none; }
.invite .coche {
  width: 18px; height: 18px; display: none;
  fill: none; stroke: var(--pb-encre); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.invite input:checked + span { background: var(--pb-mimosa); border-color: var(--pb-mimosa); font-weight: 700; transform: rotate(-1.5deg); }
.invite input:checked + span .coche { display: block; }
.invite input:focus-visible + span { outline: 3px solid var(--pb-outremer); outline-offset: 2px; }
.invites-attente { margin-top: 10px; }

/* --- Notifications : interrupteurs et appareil ----------------------------------------------- */

.interrupteurs { list-style: none; margin: 0; padding: 0; }
.interrupteur {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; padding: 8px 0; cursor: pointer;
}
.interrupteurs li + li .interrupteur { border-top: 1px solid var(--pb-trait); }
.interrupteur input {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; margin: 0; cursor: pointer;
  position: relative; width: 48px; height: 28px; border-radius: 14px;
  background: var(--pb-blanc); border: 1.5px solid var(--pb-encre);
  transition: background .15s;
}
.interrupteur input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--pb-encre); transition: transform .15s;
}
.interrupteur input:checked { background: var(--pb-outremer); border-color: var(--pb-outremer); }
.interrupteur input:checked::after { background: var(--pb-blanc); transform: translateX(20px); }
.interrupteur input:focus-visible { outline: 3px solid var(--pb-outremer); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .interrupteur input, .interrupteur input::after { transition: none; } }

.appareil p { margin: 0 0 12px; }
.appareil .rangee { align-items: center; }

/* --- Rendez-vous passés, sous le prochain ----------------------------------------------------- */
.titre-passes { margin-top: 24px; }
.passes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ligne-passe {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 10px 12px 10px 16px;
  background: var(--pb-blanc); border-radius: var(--pb-coin-c);
  color: var(--pb-encre); text-decoration: none;
}
.ligne-passe:hover { color: var(--pb-encre); }
.ligne-passe-texte { display: flex; flex-direction: column; gap: 2px; }
/* Pastille-flèche vers l'avant : l'outremer des rendez-vous terminés. */
.ligne-passe::after {
  content: ""; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--pb-encre);
  background: var(--pb-outremer) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11.6c4.2.5 8.6.4 12.6.3M12.8 6.4l5.6 5.6-5.8 5.6'/%3E%3C/svg%3E") center / 17px no-repeat;
  transform: rotate(6deg);
  transition: transform .15s ease;
}
.ligne-passe:hover::after { transform: rotate(6deg) translateX(3px); }

.voir-plus { margin-top: 12px; }
.voir-plus summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--pb-encre); border-radius: var(--pb-coin-bouton);
  font-weight: 700; font-size: 15px; color: var(--pb-encre); cursor: pointer; list-style: none;
}
.voir-plus summary::-webkit-details-marker { display: none; }
.voir-plus summary:hover { background: rgba(33, 61, 51, .06); }
.voir-plus summary .icone-trait { width: 18px; height: 18px; transition: transform .15s ease; }
.voir-plus[open] summary { margin-bottom: 12px; }
.voir-plus[open] summary .icone-trait { transform: rotate(180deg); }
.voir-plus-fermer, .voir-plus[open] .voir-plus-ouvrir { display: none; }
.voir-plus[open] .voir-plus-fermer { display: inline; }

/* --- Actions avec une icône dans un rond (pour l'hôte, quitter, signaler) --------------------- */
.actions-icones { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.actions-icones form { margin: 0; }
.action-icone {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0;
  background: none; border: 0; font: inherit; font-weight: 700; text-align: left;
  color: var(--pb-encre); text-decoration: none; cursor: pointer;
}
.action-icone:hover { color: var(--pb-encre); text-decoration: underline 2px var(--pb-dragee); text-underline-offset: 4px; }
.rond-icone {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pb-blanc); border: 1.5px solid var(--pb-encre);
}
.rond-icone .icone-trait { width: 18px; height: 18px; }
.details-actions summary { list-style: none; }
.details-actions summary::-webkit-details-marker { display: none; }
.retirer { list-style: none; margin: 0 0 6px 48px; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .ligne-passe::after, .voir-plus summary .icone-trait { transition: none; }
}

/* --- Le dernier rendez-vous passé, sur la carte d'une bulle ------------------------------------ */
.dernier-passe { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 14px; }
.dernier-passe .ligne-passe { align-self: stretch; min-height: 52px; }
/* Sur une carte de couleur, la ligne blanche garde l'encre du site, et se détache d'une carte claire. */
.carte .ligne-passe, .carte .ligne-passe strong { color: var(--pb-encre); }
.carte .ligne-passe .petit { color: var(--pb-mousse); }
.papier-clair .ligne-passe { box-shadow: 0 0 0 1.5px var(--pb-trait); }

/* --- Note de confirmation en bas de l'écran (quand le message du haut est hors de vue) ---------- */
.note-confirmation {
  position: fixed; z-index: 20; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  width: max-content; max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px;
  background: var(--pb-mimosa); color: var(--pb-encre); font-weight: 700; text-align: center;
  border-radius: var(--pb-coin-b); box-shadow: 0 10px 24px rgba(33, 61, 51, .22);
  transform: translateX(-50%) rotate(-1deg); animation: note-arrive .25s ease-out;
  transition: opacity .3s ease;
}
.note-confirmation.note-partie { opacity: 0; }
@keyframes note-arrive { from { opacity: 0; transform: translate(-50%, 12px) rotate(-1deg); } }
@media (min-width: 1024px) { .note-confirmation { bottom: 28px; } }

/* Les invitations reçues passent avant ses propres bulles, avec un peu d'air en dessous. */
.invitations-recues { margin-bottom: 26px; }
.invitations-recues form { margin: 0; }

/* --- Inviter des personnes de ses autres bulles ------------------------------------------------- */
.autres-bulles { margin-top: 18px; padding-top: 10px; border-top: 1.5px dashed var(--pb-trait); }
.autres-bulles .formulaire { gap: 14px; margin-top: 4px; }
.autres-bulles .sous-legende { margin: 0 0 8px; }

/* --- Photo de profil : la cadrer dans le cercle, comme un gabarit à découper ------------------ */
.recadrage { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.recadrage-zone {
  position: relative; width: min(280px, 100%); aspect-ratio: 1; overflow: hidden;
  border-radius: var(--pb-coin-a); background: var(--pb-blanc);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.recadrage-zone:active { cursor: grabbing; }
.recadrage-zone img {
  position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0;
  pointer-events: none; -webkit-user-drag: none;
}
/* Autour du cercle, un voile d'encre : on voit tout de suite ce qui restera, quelle que soit la photo. */
.recadrage-zone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle closest-side, transparent calc(100% - 1px), rgba(33, 61, 51, .5) 100%);
}
.recadrage-zone::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: 50%; border: 2px dashed var(--pb-blanc);
}
.recadrage-zone:focus-visible { outline: 3px solid var(--pb-outremer); outline-offset: 3px; }
.recadrage-zoom { display: flex; align-items: center; gap: 10px; width: min(280px, 100%); color: var(--pb-mousse); }
.recadrage-zoom input { flex: 1; min-width: 0; min-height: 44px; accent-color: var(--pb-outremer); }
.recadrage .aide { max-width: 34em; }
canvas.pastille { display: block; box-shadow: 0 0 0 1.5px var(--pb-trait); }

/* --- Après la connexion : installer l'appli, activer les notifications ------------------------ */
.encart-appli { margin: 4px 0 22px; }
.encart-appli + .encart-appli { margin-top: -6px; }
.encart-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.encart-tete img { border-radius: 12px; flex-shrink: 0; }
.encart-appli .titre-section { margin: 0 0 6px; }
.encart-tete .titre-section { margin: 0; }
.encart-appli .rangee { margin-top: 4px; }
.icone-texte { width: 18px; height: 18px; vertical-align: -3px; }
@media (min-width: 1024px) { .encart-appli { max-width: 640px; } }

/* --- Page d'un rendez-vous : trois conteneurs pour l'ordinateur -------------------------------- */
/* Sur téléphone, les conteneurs s'effacent : les sections se suivent dans leur ordre d'origine. */
.disposition-rdv { display: flex; flex-direction: column; gap: 28px; margin: 28px 0; }
.disposition-rdv > div { display: contents; }
.disposition-rdv .section { margin: 0; }
.zone-venir { order: 1; }
.zone-ou { order: 2; }
.zone-qui { order: 3; }
.zone-hote { order: 4; }
.zone-programme { order: 5; }
.zone-moment { order: 6; }
.zone-repas { order: 7; }
.zone-mot { order: 8; }

/* --- Grand écran : le menu monte dans un bandeau en haut, la feuille s'élargit ----------------- */
@media (min-width: 1024px) {
  body.avec-barre { padding-bottom: 0; }
  .entete { max-width: 1180px; padding: 18px 40px 0; gap: 24px; }
  .barre { position: static; gap: 6px; padding: 0; background: none; border: 0; }
  .barre a {
    flex-direction: row; gap: 9px; min-width: 0; min-height: 44px; padding: 0 18px;
    border-radius: 999px; font-size: 15px; font-weight: 700;
  }
  .barre a:hover { background: var(--pb-papier-clair); color: var(--pb-encre); }
  .barre a[aria-current="page"] { background: var(--pb-mimosa); }
  .barre a[aria-current="page"] .libelle-barre { box-shadow: none; }
  .barre svg { width: 20px; height: 20px; }
  .barre .compteur { top: -8px; right: -10px; }
  .barre a[aria-current="page"] .compteur { box-shadow: 0 0 0 2px var(--pb-mimosa); }

  /* Les pages de formulaire gardent une feuille à leur mesure ; les pages à parcourir prennent la largeur. */
  .page { max-width: 760px; }
  .page.large { max-width: 1180px; padding: 36px 52px 48px; }
  .pied { max-width: 1180px; padding-left: 40px; padding-right: 40px; }
  h1 { font-size: 44px; }
  .page > .message { width: fit-content; max-width: 100%; }

  /* Tes bulles, Trouver : les cartes posées en grille. */
  .large .pile:not(.une) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 24px; align-items: start; }
  .large .actions-bas { flex-direction: row; flex-wrap: wrap; margin-top: 34px; }
  .large .actions-bas a { width: auto; }
  .large .formulaire[data-recherche] { max-width: 640px; }

  /* Page d'une bulle : le prochain rendez-vous à gauche ; inviter, les membres et les actions à droite. */
  .colonnes { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0 52px; align-items: start; margin-top: 28px; }
  .colonnes > div > :first-child { margin-top: 0; }

  /* Page d'un rendez-vous : le titre et les trois temps sur une ligne, l'essentiel en trois encadrés,
     puis le déroulé à gauche et ce qui me concerne (hôte, mon moment, le repas) à droite. */
  .tete-rdv { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
  .tete-rdv .trois-temps { margin: 0 0 14px; }
  .disposition-rdv { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px 52px; align-items: start; margin-top: 16px; }
  .disposition-rdv > div { display: flex; flex-direction: column; gap: 28px; }
  .disposition-rdv > .essentiel { grid-column: 1 / -1; flex-direction: row; align-items: stretch; gap: 18px; }
  .essentiel > .section { flex: 1 1 0; min-width: 0; padding: 18px 22px; background: var(--pb-blanc); border-radius: var(--pb-coin-a); }
  .essentiel > .zone-ou { border-radius: var(--pb-coin-b); }
  .essentiel > .zone-qui { flex-grow: 1.4; border-radius: var(--pb-coin-c); }
  .disposition-rdv .feuille { margin-top: 0; }

  /* Accueil public : le texte à gauche, le collage de papiers à droite, les trois temps côte à côte. */
  .large .ouverture { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 18px 0 8px; }
  .large .collage { order: 2; flex-direction: column; align-items: flex-start; gap: 18px; margin: 0; }
  .large .collage li { font-size: 22px; padding: 14px 26px; }
  .large .collage li:nth-child(2) { margin-left: 52px; }
  .large .collage li:nth-child(3) { margin-left: 18px; }
  .large .collage li:nth-child(4) { margin-left: 70px; }
  .titre-ouverture { font-size: 60px; }
  .large .ouverture .actions { flex-direction: row; flex-wrap: wrap; }
  .large .ouverture .actions a { width: auto; }
  .temps-explication.grand { flex-direction: row; gap: 24px; }
  .temps-explication.grand > li { flex: 1 1 0; }
  .large > .section.carte { max-width: 640px; }
}
