/* Nos engagements — refonte du 1er octobre 2026. */
/* Couleurs des objets physiques : contrat, archive et compte rendu restent clairs. */
:root {
  --papier: #fff;
  --encre-papier: #303044;
  --papier-accent: #69598f;
  --papier-lavande: #eeebf6;
  --papier-barre: #f6f6fa;
  --papier-points: #dcd9e4;
  --papier-icone: #f6f5f9;
  --papier-succes: #3e6a54;
  --papier-succes-fond: #e8f0eb;
  --papier-ombre-legere: #00000033;
  --papier-ombre-profonde: #000000b3;
}
:root[data-theme="dark"] { --papier: #fbfaf7; }

/* ---------- Commun aux pages intérieures (à mutualiser dans site-halo.css) ---------- */
.page-hero { position: relative; isolation: isolate; overflow-x: clip; padding-block: clamp(32px, 5vw, 72px) clamp(56px, 7vw, 104px); }
.page-hero::before {
  content: ''; position: absolute; z-index: -1; right: -10%; top: 4%; width: min(1000px, 90vw); height: 90%;
  border-radius: 50%; pointer-events: none; filter: blur(10px);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
}
.page-hero h1 { font-size: clamp(42px, 5.2vw, 72px); line-height: 1.04; }
.page-hero .kicker { margin-bottom: 22px; }

/* ---------- 1. Ouverture : l'archive d'export ---------- */
.pe-hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px clamp(40px, 6vw, 96px); align-items: center; }
.pe-hero-copy { display: grid; gap: 26px; justify-items: start; }
.pe-hero-copy .kicker { margin-bottom: -4px; }

.pe-export { display: grid; animation: rise .9s cubic-bezier(.2,.7,.2,1) .22s both; }
.pe-window {
  background: var(--papier); color: var(--encre-papier); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-paper); border: 1px solid var(--ink-line); font-size: 14px;
}
.pe-window-bar { display: flex; align-items: center; gap: 14px; padding: 11px 16px; background: var(--papier-barre); border-bottom: 1px solid var(--ink-line); }
.pe-window-bar .app-dots i { background: var(--papier-points); }
.pe-window-name { font-size: 12.5px; color: var(--ink-muted); margin-inline: auto; padding-right: 48px; min-width: 0; overflow-wrap: anywhere; }
.pe-window-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; padding: 20px 22px 16px; }
.pe-zip { width: 44px; height: 44px; border-radius: 12px; background: var(--papier-lavande); color: var(--papier-accent); display: grid; place-items: center; }
.pe-zip svg { width: 22px; height: 22px; }
.pe-window-head b { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.15; }
.pe-window-head small { display: block; font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.pe-tree { margin: 0 22px; border-top: 1.5px solid var(--encre-papier); }
.pe-tree li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--ink-line); animation: slide .5s cubic-bezier(.2,.7,.2,1) both; }
.pe-tree li.pe-csv { margin-left: 22px; }
.pe-tree b { display: block; font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pe-tree small { display: block; font-size: 12.5px; color: var(--ink-muted); line-height: 1.4; }
.pe-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--papier-icone); color: var(--ink-muted); display: grid; place-items: center; }
.pe-ico.dir { background: var(--papier-lavande); color: var(--papier-accent); }
.pe-ico svg { width: 17px; height: 17px; }
.pe-window-foot { padding: 16px 22px 20px; }
.pe-window-foot .pill { white-space: normal; }


/* Contraste de la copie sur le halo et l'ombre du visuel, en clair. */
:root:not([data-theme="dark"]) .pe-hero-copy .lede,
:root:not([data-theme="dark"]) .pe-export .visual-caption {
  color: color-mix(in srgb, var(--muted) 70%, var(--text));
}

/* ---------- 2. Les garanties : quatre sceaux ---------- */
.assurance svg { width: 22px; height: 22px; padding: 9px; box-sizing: content-box; border-radius: 50%; background: var(--wash); }

/* ---------- 3. Les cinq engagements : la feuille du contrat ---------- */
.pe-contract {
  --pad: clamp(28px, 5vw, 72px); --margin: 112px;
  position: relative; background: var(--papier); color: var(--encre-papier); border-radius: 6px;
  box-shadow: var(--shadow-paper), 0 0 0 1px color-mix(in srgb, var(--encre-papier) 4%, transparent); padding: clamp(24px, 3.4vw, 44px) var(--pad) clamp(28px, 4vw, 52px);
}
/* La marge du contrat */
.pe-contract::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--pad) + var(--margin) - 28px); width: 1px;
  background: color-mix(in srgb, var(--papier-accent) 18%, transparent);
}
.pe-contract-top { display: flex; align-items: center; gap: 12px; padding-bottom: clamp(18px, 2.4vw, 28px); }
.pe-contract-mark { width: 16px; height: 20px; color: var(--papier-accent); flex: none; }
.pe-contract-word { width: 82px; height: 17px; color: var(--encre-papier); flex: none; }
.pe-contract-rule { flex: 1; height: 1px; background: var(--ink-line); }
.pe-contract-count { font-size: 12.5px; letter-spacing: .14em; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

.pe-list { display: grid; border-top: 1.5px solid var(--encre-papier); }
.pe-eng {
  display: grid; grid-template-columns: var(--margin) minmax(0, 6fr) minmax(0, 4fr); gap: 16px clamp(24px, 3.5vw, 56px);
  padding: clamp(26px, 3vw, 38px) 0; border-bottom: 1px solid var(--ink-line); align-items: start; position: relative;
}
.pe-eng > :first-child { margin-right: calc(-1 * clamp(24px, 3.5vw, 56px)); }
.pe-n { font-family: var(--serif); font-size: clamp(54px, 5vw, 72px); line-height: .82; color: var(--papier-accent); letter-spacing: -0.03em; }
.pe-eng-main { display: grid; gap: 12px; }
.pe-eng h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(27px, 2.6vw, 36px); line-height: 1.08; letter-spacing: -0.012em; color: var(--encre-papier); }
.pe-eng-main p { color: var(--ink-muted); font-size: 16.5px; line-height: 1.6; max-width: 40em; }
.pe-eng-main p b {
  display: inline-block; margin-right: 10px; padding: 1px 8px; border-radius: 6px; vertical-align: 1px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--papier-accent); background: var(--papier-lavande);
}
.pe-checks { display: grid; padding: 4px 0 0 clamp(18px, 2vw, 28px); border-left: 1px solid var(--ink-line); }
.pe-checks li { position: relative; padding: 8px 0 8px 32px; font-size: 15px; line-height: 1.45; color: var(--encre-papier); }
.pe-checks li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--papier-succes-fond);
}
.pe-checks li::after {
  content: ''; position: absolute; left: 5px; top: 13px; width: 12px; height: 12px;
  background: var(--papier-succes);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Le pied de la feuille : la ligne de signature et le sceau */
.pe-contract-foot { display: flex; align-items: center; justify-content: flex-end; gap: 24px; padding-top: clamp(24px, 3vw, 36px); }
.pe-sign { width: min(240px, 40%); height: 1px; background: var(--ink-line); }
.pe-seal {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--papier-accent);
  border: 1.5px solid var(--papier-accent); box-shadow: inset 0 0 0 5px var(--papier), inset 0 0 0 6px color-mix(in srgb, var(--papier-accent) 40%, transparent); transform: rotate(-10deg);
}
.pe-seal svg { width: 26px; height: 32px; }

/* ---------- 4. La preuve, chaque mois (bande sombre) ---------- */
.pe-proof { background: var(--band); color: var(--band-text); overflow: hidden; }
.pe-proof .kicker { color: var(--band-accent); }
.pe-proof h2 { color: var(--band-text); }
.pe-proof .lede { color: var(--band-muted); }
.pe-proof-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 104px); align-items: center; }
.pe-proof-copy { display: grid; gap: 22px; }
.pe-proof-copy .kicker { margin-bottom: -2px; }
.pe-report {
  display: grid; justify-items: center; position: relative; padding: clamp(20px, 3vw, 40px) 0;
  background: radial-gradient(50% 55% at 50% 45%, color-mix(in srgb, var(--band-accent) 24%, transparent), transparent 75%);
}
.pe-report .visual-caption { margin-top: 36px; text-align: center; color: var(--band-muted); }
/* La pile : les comptes rendus des mois précédents, sous celui d'octobre */
.pe-report-pile { position: relative; width: 100%; max-width: 520px; }
.pe-report-pile::before, .pe-report-pile::after {
  content: ''; position: absolute; inset: 0; background: var(--papier); border-radius: 4px; box-shadow: var(--shadow-paper);
}
.pe-report-pile::before { transform: rotate(-6deg) translate(-18px, 14px); opacity: .55; }
.pe-report-pile::after { transform: rotate(-2.6deg) translate(-8px, 6px); opacity: .8; }
.pe-report-sheet {
  position: relative; z-index: 1;
  background: var(--papier); color: var(--encre-papier); border-radius: 4px; box-shadow: 0 2px 4px var(--papier-ombre-legere), 0 40px 80px -30px var(--papier-ombre-profonde);
  padding: clamp(22px, 3vw, 36px); width: 100%; transform: rotate(1.2deg);
}
.pe-report-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-muted); }
.pe-report-from { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--encre-papier); font-size: 13px; }
.pe-report-from svg { width: 13px; height: 16px; color: var(--papier-accent); }
.pe-report-title { font-family: var(--serif); font-size: clamp(25px, 2.5vw, 32px); line-height: 1.1; margin-top: 22px; }
.pe-report-sub { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.pe-report-rows { margin-top: 18px; border-top: 1.5px solid var(--encre-papier); }
.pe-report-rows li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--ink-line); font-size: 14px; line-height: 1.4; }
.pe-report-rows small { font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; }
.pe-report-rows .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--papier-succes-fond); color: var(--papier-succes); display: grid; place-items: center; }
.pe-report-rows .tick svg { width: 15px; height: 15px; }
.pe-report-done { margin-top: 16px; display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 10px; background: var(--papier-succes-fond); color: var(--papier-succes); font-size: 14px; font-weight: 500; }
.pe-report-done svg { width: 18px; height: 18px; flex: none; }

/* ---------- 5. Hébergé, entretenu, surveillé : trois mots ---------- */
.pe-care-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--text); }
.pe-care-col { display: grid; gap: 14px; align-content: start; padding: 32px clamp(24px, 2.8vw, 40px) 8px 0; }
.pe-care-col + .pe-care-col { padding-left: clamp(24px, 2.8vw, 40px); border-left: 1px solid var(--line); }
.pe-care-col .ic { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--wash); color: var(--accent); display: grid; place-items: center; }
.pe-care-col .ic svg { width: 21px; height: 21px; }
.pe-care-col .ic.live::after {
  content: ''; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--st-green); box-shadow: 0 0 0 2px var(--bg); animation: pe-ping 2.4s ease-out infinite;
}
@keyframes pe-ping { 0% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 2px color-mix(in srgb, var(--st-green) 50%, transparent); } 80%, 100% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 10px transparent; } }
.pe-care-col h3 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -0.016em;
  margin: 8px 0 6px; text-wrap: balance;
}
.pe-care-col p { color: var(--muted); font-size: 15.5px; }
.pe-care-col p + p { padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- 6. Si vous partez : la ligne de sortie ---------- */
.pe-leave { background: var(--wash); }
:root:not([data-theme="dark"]) .pe-leave { --muted: color-mix(in srgb, var(--ink-muted) 80%, var(--text)); }
.pe-leave-copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.pe-leave-copy .kicker { grid-column: 1 / -1; margin-bottom: 0; }
.pe-leave-copy h2 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.04; }
.pe-leave-copy p:not(.kicker) { color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; }

.pe-steps { --n: 64px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.pe-step { position: relative; display: grid; gap: 22px; align-content: start; padding-right: clamp(16px, 2.4vw, 36px); }
.pe-step:not(:last-child)::after {
  content: ''; position: absolute; top: calc(var(--n) / 2 - 1px); left: calc(var(--n) + 10px); right: 10px; height: 2px;
  background: color-mix(in srgb, var(--accent) 50%, transparent);
}
.pe-step-n {
  width: var(--n); height: var(--n); border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--accent);
  background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent);
}
/* La confirmation : le point d'arrêt, rien ne s'efface avant */
.pe-step-gate .pe-step-n { border: 2px solid var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent); }
.pe-step:last-child .pe-step-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pe-step b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(23px, 2vw, 28px); line-height: 1.1; }
.pe-step span:not(.pe-step-n) { display: block; font-size: 15.5px; color: var(--muted); line-height: 1.5; margin-top: 8px; max-width: 22em; }

/* ---------- Mouvement ---------- */
.pe-hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.pe-hero-copy > :nth-child(2) { animation-delay: .06s; }
.pe-hero-copy > :nth-child(3) { animation-delay: .12s; }
.pe-hero-copy > :nth-child(4) { animation-delay: .18s; }
.pe-tree li:nth-child(1) { animation-delay: .55s; }
.pe-tree li:nth-child(2) { animation-delay: .63s; }
.pe-tree li:nth-child(3) { animation-delay: .71s; }
.pe-tree li:nth-child(4) { animation-delay: .79s; }

/* ---------- Adaptations ---------- */
@media (max-width: 1020px) {
  .pe-hero-grid, .pe-proof-grid { grid-template-columns: minmax(0, 1fr); }
  .pe-export { max-width: 620px; }
  .pe-contract { --margin: 76px; }
  .pe-eng { grid-template-columns: var(--margin) minmax(0, 1fr); }
  .pe-checks { grid-column: 2; padding-top: 0; }
  .pe-n { font-size: 50px; }
  .pe-report-pile { max-width: 560px; }
  .pe-care-grid { grid-template-columns: minmax(0, 1fr); }
  .pe-care-col, .pe-care-col + .pe-care-col { grid-template-columns: 44px minmax(0, 1fr); column-gap: 22px; padding: 28px 0 14px; border-left: 0; }
  .pe-care-col + .pe-care-col { border-top: 1px solid var(--line); }
  .pe-care-col .ic { grid-row: span 3; }
  .pe-care-col > :not(.ic) { grid-column: 2; }
  .pe-care-col h3 { margin-top: 0; }
  .pe-leave-copy { grid-template-columns: minmax(0, 1fr); }
  .pe-steps { --n: 56px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 40px; }
  .pe-step:nth-child(2)::after { display: none; }
}

@media (max-width: 720px) {
  .pe-hero-copy .actions { width: 100%; }
  .pe-hero-copy .actions .btn { flex: 1 1 auto; }
  .pe-window-head { padding: 16px 16px 14px; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .pe-zip { width: 40px; height: 40px; }
  .pe-window-name { padding-right: 0; }
  .pe-tree { margin: 0 16px; }
  .pe-tree li.pe-csv { margin-left: 12px; }
  .pe-window-foot { padding: 14px 16px 18px; }

  .pe-contract { --pad: 20px; --margin: 0px; padding: 20px var(--pad) 24px; }
  .pe-contract::before { display: none; }
  .pe-contract-count { display: none; }
  .pe-eng { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 26px 0; }
  .pe-eng > :first-child { margin-right: 0; }
  .pe-checks { grid-column: auto; border-left: 0; padding: 6px 0 0; border-top: 1px dashed var(--ink-line); }
  .pe-n { font-size: 46px; }
  .pe-eng h3 { font-size: 27px; }
  .pe-seal { width: 68px; height: 68px; }
  .pe-seal svg { width: 22px; height: 27px; }

  .pe-report { padding: 12px 8px 0; }
  .pe-report-pile::before { transform: rotate(-4deg) translate(-6px, 10px); }
  .pe-report-pile::after { transform: rotate(-2deg) translate(-3px, 5px); }
  .pe-report-sheet { transform: none; padding: 20px 16px; }
  .pe-report-rows li { grid-template-columns: 26px minmax(0, 1fr); }
  .pe-report-rows small { grid-column: 2; margin-top: -8px; }

  .pe-care-col, .pe-care-col + .pe-care-col { grid-template-columns: minmax(0, 1fr); padding: 26px 0 10px; }
  .pe-care-col .ic { grid-row: auto; }
  .pe-care-col > :not(.ic) { grid-column: auto; }
  .pe-care-col h3 { font-size: 36px; }

  .pe-steps { --n: 48px; grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .pe-step { grid-template-columns: var(--n) minmax(0, 1fr); gap: 18px; padding: 0 0 30px; }
  .pe-step:nth-child(2)::after { display: block; }
  .pe-step:not(:last-child)::after { top: calc(var(--n) + 6px); bottom: 6px; left: calc(var(--n) / 2 - 1px); right: auto; width: 2px; height: auto; }
  .pe-step:last-child { padding-bottom: 0; }
  .pe-step-n { font-size: 24px; }
  .pe-step span:not(.pe-step-n) { margin-top: 4px; }
}

/* À largeur intermédiaire, le texte occupe aussi la partie claire de la photo. */
@media (min-width: 721px) and (max-width: 1020px) {
  .cta::before {
    background: linear-gradient(90deg,
      color-mix(in srgb, var(--band) 94%, transparent),
      color-mix(in srgb, var(--band) 80%, transparent) 70%,
      color-mix(in srgb, var(--band) 65%, transparent));
  }
}
