/* Family Life — pages publiques (accueil, connexion, invitation, pages légales) */

body.public { background: var(--creme); }

/* ------------------------------------------------------------------ En-tête et logo */
.entete { background: var(--marine); color: var(--papier); }
.entete-rang {
  max-width: 78rem; margin: 0 auto; padding: var(--e-4) var(--e-5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--e-4);
}
.entete-actions { display: flex; align-items: center; gap: var(--e-2); }
.entete .btn-discret { color: var(--papier); }
.entete .btn-discret:hover { background: rgba(255, 253, 249, 0.14); color: var(--papier); }

.logo {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--cible);
  font-family: var(--f-titre); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.03em;
  color: inherit; text-decoration: none; white-space: nowrap;
}
.logo-image { display: block; height: 2.9rem; width: auto; }

/* ------------------------------------------------------------------ Héros : le fil des générations */
.hero { background: var(--marine); color: var(--papier); overflow: hidden; padding-bottom: var(--e-8); }
.hero-texte { max-width: 78rem; margin: 0 auto; padding: var(--e-7) var(--e-5) var(--e-6); }
.hero h1 {
  font-size: var(--t-3xl); font-weight: 700; letter-spacing: -0.022em; word-spacing: 0.04em; line-height: 1.04;
  max-width: 17ch; font-variation-settings: "opsz" 96;
}
.hero-chapo { margin-top: var(--e-5); max-width: 58ch; font-size: var(--t-l); line-height: 1.45; color: #e4ecee; }
.hero-actions { margin-top: var(--e-6); display: flex; flex-wrap: wrap; gap: var(--e-3); }
.hero-note { margin-top: var(--e-4); display: flex; align-items: center; gap: var(--e-2); color: #c3d2d6; font-size: var(--t-s); }

.corde { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.corde::-webkit-scrollbar { display: none; }
.corde-piste { position: relative; min-width: 1180px; padding: 0 var(--e-6) var(--e-5); }
.corde-fil { position: absolute; inset: 0 0 auto 0; width: 100%; height: 120px; overflow: visible; }
.corde-fil path {
  fill: none; stroke: var(--cuivre-clair); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: fil-tire 1.5s 0.15s var(--courbe) forwards;
}
@keyframes fil-tire { to { stroke-dashoffset: 0; } }

.corde-photos { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--e-4); }
.suspendu {
  /* Le fil suit une parabole : chaque photo descend d'autant que le fil à cet endroit. */
  --pente: calc(22px + 180px * var(--t) * (1 - var(--t)));
  position: relative; flex: 1 1 0; max-width: 13.5rem; margin-top: calc(var(--pente) - 4px);
  transform-origin: 50% 0; scroll-snap-align: center;
  opacity: 0; animation: photo-pose 0.7s calc(0.75s + var(--i) * 0.13s) var(--courbe) forwards;
}
.suspendu.paysage { max-width: 16.5rem; flex-grow: 1.25; }
.suspendu.carre { max-width: 12.5rem; }
.suspendu:nth-child(odd) { --angle: -2.2deg; }
.suspendu:nth-child(even) { --angle: 1.8deg; }
.suspendu:nth-child(3n) { --angle: 3deg; }
@keyframes photo-pose {
  from { opacity: 0; transform: translateY(-18px) rotate(calc(var(--angle) * -2.5)); }
  to { opacity: 1; transform: rotate(var(--angle)); }
}
/* La pince qui tient la photo au fil */
.suspendu::before {
  content: ""; position: absolute; z-index: 2; top: -12px; left: 50%; width: 11px; height: 26px; margin-left: -5.5px;
  border-radius: 3px; background: linear-gradient(#f0c9a8, #c98a62); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
}
.suspendu .tirage { margin: 0; padding: 8px 8px 0; }
.suspendu figcaption { padding: 0.55rem 0.2rem 0.7rem; color: var(--marine); text-align: center; font-size: 0.88rem; }

@media (min-width: 1240px) {
  .corde { overflow: visible; }
  .corde-piste { max-width: 88rem; margin: 0 auto; }
}

/* ------------------------------------------------------------------ Blocs de contenu */
.bloc { max-width: 78rem; margin: 0 auto; padding: var(--e-9) var(--e-5); }
.bloc-tete { max-width: 46rem; margin-bottom: var(--e-7); }
.bloc-tete h2, .confiance h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -0.03em; }
.bloc-tete p { margin-top: var(--e-4); font-size: var(--t-l); color: var(--texte-doux); line-height: 1.45; }

.usages { display: grid; gap: var(--e-8); }
.usage { display: grid; gap: var(--e-5); align-items: center; }
.usage-texte h3 { font-size: var(--t-xl); }
.usage-texte p { margin-top: var(--e-3); max-width: 48ch; color: var(--texte-doux); }
.usage-demo { display: grid; justify-items: center; }
@media (min-width: 860px) {
  .usage { grid-template-columns: 1fr 1fr; gap: var(--e-8); }
  .usage:nth-child(even) .usage-texte { order: 2; }
}

/* Aperçus de l'application */
.demo-carte {
  width: min(100%, 25rem); background: var(--papier); border: 1px solid var(--ligne); border-radius: var(--r-l);
  padding: var(--e-5); box-shadow: 0 30px 60px -40px rgba(24, 52, 67, 0.5);
}
.demo-auteur { display: flex; align-items: center; gap: var(--e-3); margin-bottom: var(--e-4); }
.demo-auteur small, .demo-suggestions small, .demo-choix small, .demo-presents small { display: block; color: var(--texte-doux); font-size: var(--t-xs); }
.demo-photo { transform: rotate(-1.2deg); padding-bottom: 0; }
.demo-photo .manuscrit { display: block; text-align: center; padding: 0.5rem 0 0.65rem; font-size: 0.85rem; }
.demo-titre { margin-top: var(--e-4); font-family: var(--f-titre); font-weight: 650; font-size: var(--t-l); line-height: 1.2; }
.demo-pied { margin-top: var(--e-3); display: flex; gap: var(--e-2); flex-wrap: wrap; }

.demo-question { font-weight: 700; margin-bottom: var(--e-3); }
.demo-choix { display: grid; gap: var(--e-2); }
.demo-choix li {
  display: grid; grid-template-columns: auto 1fr; column-gap: var(--e-3); align-items: center;
  padding: var(--e-3) var(--e-4); border: 2px solid var(--ligne); border-radius: var(--r-s); font-weight: 600;
}
.demo-choix small { grid-column: 2; font-weight: 400; }
.demo-coche { width: 22px; height: 22px; border: 2px solid var(--marine); border-radius: 6px; grid-row: span 2; }
.demo-choix .coche { border-color: var(--marine); background: var(--marine-pale); }
.demo-choix .coche .demo-coche {
  background: var(--marine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffdf9' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.demo-arbre { width: min(100%, 26rem); height: auto; }
.demo-arbre-liens path { fill: none; stroke: var(--cuivre); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.demo-arbre-noeuds rect { fill: var(--papier); stroke: var(--ligne); stroke-width: 1.5; }
.demo-arbre-noeuds rect.moi { fill: var(--marine); stroke: var(--marine); }
.demo-arbre-noeuds text { font-family: var(--f-texte); font-weight: 700; font-size: 14px; fill: var(--marine); text-anchor: middle; }
.demo-arbre-noeuds text.moi { fill: var(--papier); }

.demo-chat { display: grid; gap: var(--e-2); }
.demo-presents { display: flex; align-items: center; gap: var(--e-2); margin-bottom: var(--e-3); }
.demo-presents small { margin-left: var(--e-2); }
.bulle {
  justify-self: start; max-width: 85%; padding: var(--e-3) var(--e-4);
  background: var(--sable); border-radius: 18px 18px 18px 5px; font-size: var(--t-s); line-height: 1.4;
}
.bulle.moi { justify-self: end; background: var(--marine); color: var(--papier); border-radius: 18px 18px 5px 18px; }

.demo-suggestions { display: grid; gap: var(--e-4); }
.demo-suggestions li { display: grid; grid-template-columns: auto 1fr auto; gap: var(--e-3); align-items: center; }
.demo-suggestions strong { display: block; line-height: 1.25; }

/* ------------------------------------------------------------------ Engagements */
.confiance { background: var(--marine); color: var(--papier); }
.confiance-rang { max-width: 78rem; margin: 0 auto; padding: var(--e-9) var(--e-5); }
.confiance h2 { max-width: 18ch; }
.engagements { margin: var(--e-7) 0 0; display: grid; gap: var(--e-6) var(--e-8); }
.engagements dt {
  display: flex; align-items: center; gap: var(--e-3);
  font-family: var(--f-titre); font-weight: 650; font-size: var(--t-l); letter-spacing: -0.01em;
}
.engagements dt .icon { color: var(--cuivre-clair); width: 1.6rem; height: 1.6rem; }
.engagements dd { margin: var(--e-3) 0 0; color: #d6e1e4; max-width: 46ch; }
@media (min-width: 760px) { .engagements { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ Étapes (une vraie séquence, donc numérotée) */
.etapes { counter-reset: etape; display: grid; gap: var(--e-6); }
.etapes li { counter-increment: etape; position: relative; padding-top: var(--e-7); border-top: 2.5px solid var(--cuivre); }
.etapes li::before {
  content: counter(etape); position: absolute; top: var(--e-3); left: 0;
  font-family: var(--f-titre); font-weight: 700; font-size: var(--t-xl); color: var(--cuivre); line-height: 1;
}
.etapes p { margin-top: var(--e-2); color: var(--texte-doux); }
@media (min-width: 760px) { .etapes { grid-template-columns: repeat(3, 1fr); } }
.appel { margin-top: var(--e-7); }

/* ------------------------------------------------------------------ Pied de page */
.pied { background: var(--marine-fonce); color: #cfdbde; }
.pied-rang {
  max-width: 78rem; margin: 0 auto; padding: var(--e-6) var(--e-5);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3) var(--e-6);
}
.pied .logo { color: var(--papier); }
.pied-phrase { font-family: var(--f-main); font-weight: 300; font-size: 0.95rem; color: var(--cuivre-clair); }
.pied nav { margin-left: auto; }
.pied-liens { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); font-size: var(--t-s); }
.pied-liens a { display: inline-flex; align-items: center; min-height: var(--cible); }

/* ------------------------------------------------------------------ Fenêtre d'accès */
.onglets { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: var(--sable); border-radius: var(--r-pilule); }
.onglets button {
  min-height: 44px; border: 0; border-radius: var(--r-pilule); background: transparent; cursor: pointer;
  font-weight: 700; font-size: var(--t-s); color: var(--marine);
}
.onglets button[aria-selected="true"] { background: var(--papier); box-shadow: 0 1px 3px rgba(24, 52, 67, 0.25); }
.volet { margin-top: var(--e-5); }
.volet-intro { color: var(--texte-doux); margin-bottom: var(--e-4); }
.volet .case { margin-top: var(--e-3); }
.volet .btn-large { margin-top: var(--e-4); }
.volet .message { margin-top: var(--e-4); }
.volet-note { margin-top: var(--e-4); text-align: center; }
.cf-turnstile { margin-top: var(--e-4); min-height: 65px; }
.volet-envoye { display: grid; justify-items: center; text-align: center; gap: var(--e-4); padding: var(--e-5) 0 var(--e-3); }
.volet-envoye[hidden] { display: none; }
.envoye-icone { display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 50%; background: var(--ecume); color: var(--ecume-fonce); }

.bandeau-flash { max-width: 46rem; margin: var(--e-5) auto 0; padding: 0 var(--e-5); }

/* ------------------------------------------------------------------ Pages simples : lien de connexion, invitation, message, erreur */
.page-simple { max-width: 34rem; margin: 0 auto; padding: var(--e-8) var(--e-5) var(--e-9); text-align: center; }
.page-simple .carte { padding: var(--e-7) var(--e-5); border-radius: var(--r-l); display: grid; justify-items: center; gap: var(--e-4); }
.page-simple h1 { font-size: var(--t-2xl); }
.page-simple p { color: var(--texte-doux); }
.page-simple form { width: 100%; display: grid; gap: var(--e-4); margin-top: var(--e-2); text-align: left; }
.page-simple .envoye-icone.attention { background: var(--cuivre-pale); color: var(--cuivre-fonce); }

/* ------------------------------------------------------------------ Pages légales */
.prose { max-width: 46rem; margin: 0 auto; padding: var(--e-8) var(--e-5) var(--e-9); }
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--e-5); }
.prose h2 { font-size: var(--t-l); margin: var(--e-6) 0 var(--e-3); }
.prose p, .prose ul { margin-bottom: var(--e-4); }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose li { margin-bottom: var(--e-2); }
.prose .a-completer { background: var(--cuivre-pale); padding: 0.1em 0.4em; border-radius: 4px; font-weight: 700; }
.prose .message { margin-bottom: var(--e-5); }

@media (max-width: 620px) {
  .entete-rang { padding: var(--e-3) var(--e-4); }
  .entete-connexion { display: none; }
  .logo-image { height: 2.4rem; }
  .hero-texte { padding: var(--e-6) var(--e-4) var(--e-5); }
  .hero-chapo { font-size: var(--t-m); }
  .hero-actions .btn { width: 100%; }
  .corde-piste { min-width: 1040px; padding-inline: var(--e-4); }
  .bloc, .confiance-rang { padding: var(--e-8) var(--e-4); }
  .usages { gap: var(--e-7); }
  .pied nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .corde-fil path { stroke-dashoffset: 0; }
  .suspendu { opacity: 1; transform: rotate(var(--angle)); }
}
