/* Pairfolio, vitrine : la grille suisse de l'app, à l'échelle de l'affiche. */
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 400 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --outremer: #1838d6;
  --outremer-fonce: #1029a8;
  --outremer-clair: #dce3ff;
  --encre: #111111;
  --encre-2: #45453f;
  --neutre: #eeefea;
  --blanc: #ffffff;
  --orange: #e8480c;
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --marge: clamp(16px, 4vw, 64px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Schibsted Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.5; color: var(--encre); background: var(--blanc);
  -webkit-font-smoothing: antialiased; caret-color: var(--outremer);
}
::selection { background: var(--outremer); color: var(--blanc); }
.affiche ::selection, .cloture ::selection { background: var(--blanc); color: var(--outremer); }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--outremer); outline-offset: 3px; }
.affiche :focus-visible, .cloture :focus-visible { outline-color: var(--blanc); }
.evitement { position: absolute; left: -999px; top: 8px; background: var(--blanc); color: var(--encre); padding: 8px 12px; z-index: 10; }
.evitement:focus { left: 8px; }

.grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); padding-inline: var(--marge); max-width: 1440px; margin-inline: auto; }

/* ---------- Commandes ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px;
  font-weight: 700; text-decoration: none; border: 2px solid currentColor; white-space: nowrap;
  transition: background-color 160ms var(--sortie), color 160ms var(--sortie);
}
.bouton-clair { color: var(--blanc); }
.bouton-clair:hover { background: var(--blanc); color: var(--outremer); }
.bouton-large { min-height: 56px; padding-inline: 32px; font-size: 1.125rem; }
.lien-clair { color: var(--blanc); font-weight: 600; }
.lien-clair:hover { color: var(--outremer-clair); }

/* ---------- Affiche d'ouverture ---------- */
.affiche { background: var(--outremer); color: var(--blanc); min-height: 100svh; display: flex; flex-direction: column; }
.barre { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px var(--marge); max-width: 1440px; width: 100%; margin-inline: auto; }
.marque { font-weight: 900; font-size: 2rem; letter-spacing: -0.04em; text-decoration: none; line-height: 1; }
.barre-liens { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.barre-liens a:not(.bouton) { text-decoration: none; font-weight: 500; color: var(--outremer-clair); }
.barre-liens a:not(.bouton):hover { color: var(--blanc); }

.affiche-grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: end; padding: clamp(32px, 6vh, 80px) var(--marge) clamp(40px, 7vh, 88px); max-width: 1440px; width: 100%; margin: auto auto 0; row-gap: 32px; }
.titre { grid-column: 1 / -1; font-weight: 900; font-size: clamp(3rem, 8.4vw, 8.5rem); line-height: 0.9; letter-spacing: -0.045em; padding-bottom: clamp(24px, 4vh, 48px); border-bottom: 2px solid var(--blanc); }
.titre span { color: var(--outremer-clair); }
.accroche { grid-column: 1 / 6; font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.45; color: var(--outremer-clair); max-width: 38ch; align-self: start; padding-top: 8px; }
.affiche-grille .actions { grid-column: 1 / 6; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; align-self: start; }

/* La colonne d'échéances, en blanc sur outremer */
.tableau-affiche { grid-column: 7 / -1; grid-row: 2 / 4; align-self: start; }
.tableau-affiche figcaption { display: flex; justify-content: space-between; font-size: 0.8125rem; font-weight: 700; padding-bottom: 10px; color: var(--outremer-clair); }
.tableau-affiche ol { list-style: none; border-top: 2px solid var(--blanc); }
.tableau-affiche li { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid rgb(255 255 255 / 0.35); overflow: hidden; }
.jour { font-weight: 900; font-size: 3.25rem; line-height: 0.8; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.jour small { display: block; font-size: 0.75rem; letter-spacing: 0.04em; margin-top: 7px; font-weight: 700; }
.jour.proche { color: #ffb08f; }
.objet { min-width: 0; }
.objet b { display: block; font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.objet small { display: block; font-size: 0.875rem; color: var(--outremer-clair); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.somme { font-weight: 500; text-align: right; white-space: nowrap; }
.somme.fort { font-weight: 900; }

/* Signature : la première chose est réglée, son chiffre quitte la colonne, la ligne se replie */
@media (prefers-reduced-motion: no-preference) {
  .tableau-affiche li.regle { animation: replie 7s var(--sortie) 1.6s infinite; }
  .tableau-affiche li.regle .jour { animation: sort 7s var(--sortie) 1.6s infinite; }
}
@keyframes sort {
  0%, 8% { transform: none; opacity: 1; }
  16%, 86% { transform: translateX(-140%); opacity: 0; }
  94%, 100% { transform: none; opacity: 1; }
}
@keyframes replie {
  0%, 14% { max-height: 120px; padding-block: 16px; opacity: 1; }
  24%, 84% { max-height: 0; padding-block: 0; opacity: 0; border-bottom-color: transparent; }
  94%, 100% { max-height: 120px; padding-block: 16px; opacity: 1; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 12vh, 144px); }
.section-neutre { background: var(--neutre); }
.titre-section { grid-column: 1 / 10; font-weight: 900; font-size: clamp(2.25rem, 4.6vw, 4.25rem); line-height: 0.98; letter-spacing: -0.035em; padding-bottom: clamp(32px, 5vh, 56px); text-wrap: balance; }

.temps { grid-column: 1 / -1; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); border-top: 2px solid var(--encre); }
.temps li { padding-top: 24px; }
.temps .n { display: block; font-weight: 900; font-size: clamp(4rem, 8vw, 7.5rem); line-height: 0.8; letter-spacing: -0.06em; color: var(--outremer); }
.temps h3 { font-size: 1.75rem; font-weight: 900; letter-spacing: -0.02em; margin: 20px 0 8px; }
.temps p { color: var(--encre-2); max-width: 34ch; }

.exemple { margin-top: clamp(56px, 9vh, 104px); align-items: center; }
.lettre { grid-column: 1 / 6; background: var(--neutre); padding: 32px; font-size: 0.9375rem; color: var(--encre-2); line-height: 1.6; }
.lettre-tete { font-weight: 700; color: var(--encre); margin: 12px 0 8px; }
.fleche { grid-column: 6 / 7; height: 2px; background: var(--encre); position: relative; }
.fleche::after { content: ''; position: absolute; right: -2px; top: -6px; border: 7px solid transparent; border-left: 10px solid var(--encre); border-right: 0; }
.ticket { grid-column: 7 / -1; border-top: 2px solid var(--encre); padding-top: 20px; }
.ticket h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; margin: 12px 0 20px; }
.etiquette { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 8px; background: var(--blanc); }
.lettre .etiquette { background: var(--blanc); }
.etiquette-bleue { background: var(--outremer); color: var(--blanc); }
.faits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--encre); }
.faits div { padding-top: 12px; }
.faits dt { font-size: 0.8125rem; color: var(--encre-2); order: 2; }
.faits dd { font-size: 1.375rem; font-weight: 900; letter-spacing: -0.02em; white-space: nowrap; }
.faits div { display: flex; flex-direction: column-reverse; }
.action { margin-top: 20px; font-weight: 700; color: var(--outremer); }

.finances-texte { grid-column: 1 / 6; display: flex; flex-direction: column; gap: 16px; color: var(--encre-2); font-size: 1.125rem; max-width: 44ch; }
.budget { grid-column: 7 / -1; }
.budget figcaption { display: flex; justify-content: space-between; font-size: 0.875rem; font-weight: 700; padding-bottom: 10px; }
.budget figcaption span:last-child { font-weight: 500; color: var(--encre-2); }
.barre-budget { display: flex; height: 56px; background: var(--blanc); }
.barre-budget i { width: var(--l); background: var(--c); }
.barre-budget .b1 { --l: 26%; --c: #1838d6; }
.barre-budget .b2 { --l: 13%; --c: #4f6bf0; }
.barre-budget .b3 { --l: 16%; --c: #8fa3f7; }
.barre-budget .b4 { --l: 24%; --c: #111111; }
.barre-budget .b5 { --l: 14%; --c: #7a7a74; }
.barre-budget i + i { box-shadow: inset 2px 0 0 var(--neutre); }
.parts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; margin-top: 32px; }
.parts div { border-top: 2px solid var(--encre); padding-top: 12px; }
.parts b { display: block; font-size: clamp(2.5rem, 4.4vw, 4rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.parts span { font-size: 0.875rem; color: var(--encre-2); }

.garanties { grid-column: 1 / -1; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }
.garanties li { border-top: 2px solid var(--encre); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.garanties b { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.01em; }
.garanties span { color: var(--encre-2); font-size: 0.9375rem; }

.cloture { background: var(--outremer); color: var(--blanc); padding-block: clamp(80px, 14vh, 160px); }
.cloture .titre-section { grid-column: 1 / -1; font-size: clamp(2.75rem, 7vw, 7rem); line-height: 0.9; letter-spacing: -0.045em; padding-bottom: 40px; border-bottom: 2px solid var(--blanc); margin-bottom: 32px; }
.cloture .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }

.pied { padding-block: 28px; font-size: 0.875rem; color: var(--encre-2); border-top: 2px solid var(--encre); }
.pied .grille { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; }
.marque-petite { font-size: 1.25rem; color: var(--encre); margin-right: auto; }
.pied a { color: var(--encre); }

/* ---------- Adaptation ---------- */
@media (max-width: 1080px) {
  .accroche, .affiche-grille .actions { grid-column: 1 / -1; }
  .tableau-affiche { grid-column: 1 / -1; grid-row: auto; margin-top: 16px; }
  .titre-section { grid-column: 1 / -1; }
  .lettre, .ticket, .finances-texte, .budget { grid-column: 1 / -1; }
  .fleche { grid-column: 1 / -1; width: 2px; height: 48px; margin: 16px 0 16px 32px; }
  .fleche::after { right: auto; top: auto; left: -6px; bottom: -2px; border: 7px solid transparent; border-top: 10px solid var(--encre); border-bottom: 0; }
  .budget { margin-top: 40px; }
  .garanties { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}
@media (max-width: 700px) {
  .barre-liens a:not(.bouton) { display: none; }
  .affiche { min-height: auto; }
  .temps { grid-template-columns: 1fr; border-top: 0; }
  .temps li { border-top: 2px solid var(--encre); padding-bottom: 32px; display: grid; grid-template-columns: 72px 1fr; column-gap: 16px; }
  .temps .n { grid-row: 1 / 3; font-size: 4rem; }
  .temps h3 { margin-top: 0; }
  .tableau-affiche li { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; }
  .jour { font-size: 2.5rem; }
  .garanties { grid-template-columns: 1fr; }
  .faits dd { font-size: 1.125rem; }
  .bouton-large { width: 100%; }
}
