/* JurisViva — bibliothèque de mouvements. Socle commun : NE PAS MODIFIER depuis une page de catégorie. */
@font-face { font-family: "Jost"; src: url("../polices/Jost.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Jetons du site (identiques à index.html) */
  --encre: #0f2a2e; --encre-douce: #4a6267; --fond: #f4f7f6; --surface: #ffffff; --trait: #d8e2e0;
  --teal: #005059; --teal-profond: #003f46; --or: #8a6a26; --or-vif: #edd693;
  --sur-teal: #f3f1eb; --sur-teal-doux: #bbd7db; --alerte: #a33a1f; --ok: #1f6b4a;
  --ombre: 0 18px 50px -24px rgba(0, 63, 70, .35);
  --f-titre: "Jost", "Segoe UI", system-ui, sans-serif; --f-texte: "Jost", "Segoe UI", system-ui, sans-serif;
  --rayon: 14px;
  /* Charte v3 : les trois pôles et le groupe */
  --creance: #005059; --creance-profond: #003f46; --creance-clair: #bbd7db;
  --cession: #6e2639; --cession-profond: #3d1420; --cession-clair: #f0d5dc;
  --locatif: #9a5a1c; --locatif-profond: #4a2a0c; --locatif-clair: #f6e4cc;
  --groupe: #0d3b66; --groupe-profond: #08294a; --groupe-nuit: #071f38; --groupe-clair: #bcd0e4;
  --creme: #f3f1eb;
  /* Mouvement : courbes et durées de la maison */
  --e-ressort: cubic-bezier(.2, .8, .3, 1.2);   /* survol des pavés du site */
  --e-ressort-vif: cubic-bezier(.2, .8, .3, 1.4);
  --e-sortie: cubic-bezier(.16, 1, .3, 1);
  --e-entree-sortie: cubic-bezier(.65, 0, .35, 1);
  --d-vif: .2s; --d-normal: .35s; --d-ample: .6s; --d-scene: 1.1s; --d-halo: 2.6s;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --encre: #e9efee; --encre-douce: #a9bcbf; --fond: #0b2226; --surface: #10303a; --trait: #24464d;
    --teal: #0d6570; --teal-profond: #072c31; --or: #e2c983; --alerte: #f08a6c; --ok: #7fd1a8;
    --ombre: 0 18px 50px -24px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --encre: #e9efee; --encre-douce: #a9bcbf; --fond: #0b2226; --surface: #10303a; --trait: #24464d;
  --teal: #0d6570; --teal-profond: #072c31; --or: #e2c983; --alerte: #f08a6c; --ok: #7fd1a8;
  --ombre: 0 18px 50px -24px rgba(0, 0, 0, .6); color-scheme: dark;
}
/* Couleur du pôle portée par la carte : --p, --p-profond, --p-clair */
[data-pole="creance"] { --p: var(--creance); --p-profond: var(--creance-profond); --p-clair: var(--creance-clair); }
[data-pole="cession"] { --p: var(--cession); --p-profond: var(--cession-profond); --p-clair: var(--cession-clair); }
[data-pole="locatif"] { --p: var(--locatif); --p-profond: var(--locatif-profond); --p-clair: var(--locatif-clair); }
[data-pole="groupe"]  { --p: var(--groupe);  --p-profond: var(--groupe-profond);  --p-clair: var(--groupe-clair); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 1.0625rem/1.65 var(--f-texte); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-titre); font-weight: 300; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--or-vif); outline-offset: 3px; border-radius: 4px; }
.etiquette { font: 500 .75rem/1 var(--f-texte); letter-spacing: .18em; text-transform: uppercase; color: var(--or); }
.pole { font-family: var(--f-titre); font-style: italic; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--teal); background: var(--teal); color: var(--sur-teal);
  font: 500 1rem/1 var(--f-texte); text-decoration: none; cursor: pointer; }
.bouton.clair { background: transparent; color: var(--encre); border-color: var(--trait); }
.bouton.or { background: var(--or-vif); border-color: var(--or-vif); color: #0f2a2e; }

/* Galerie */
.galerie-entete { padding: 40px 20px 8px; width: min(1320px, 100%); margin-inline: auto; display: grid; gap: 10px; }
.galerie-entete h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.galerie-entete p { color: var(--encre-douce); max-width: 46rem; }
.galerie-entete nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .95rem; }
.galerie { width: min(1320px, 100%); margin-inline: auto; padding: 24px 20px 80px; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.effet { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; background: var(--surface); border: 1px solid var(--trait);
  border-radius: 18px; overflow: hidden; box-shadow: var(--ombre); }
.effet.large { grid-column: 1 / -1; }
.effet > header { padding: 16px 18px 12px; display: grid; gap: 4px; }
.effet > header .num { font: 500 .75rem/1 var(--f-texte); letter-spacing: .18em; color: var(--or); }
.effet > header h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: 0; }
.effet > header .usage { font-size: .9rem; line-height: 1.4; color: var(--encre-douce); }
.effet > .scene { position: relative; min-height: 260px; display: grid; place-items: center; padding: 22px; overflow: hidden;
  background: var(--fond); border-block: 1px solid var(--trait); isolation: isolate; }
.effet.large > .scene { min-height: 420px; }
.effet > .scene.sombre { background: var(--teal-profond); color: var(--sur-teal); }
.effet > .scene.pole { background: var(--p-profond); color: var(--creme); font-style: normal; font-family: var(--f-texte); }
.effet > footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; font-size: .8rem; color: var(--encre-douce); }
.effet > footer .tag { padding: 3px 9px; border: 1px solid var(--trait); border-radius: 999px; line-height: 1.3; }
.effet > footer .rejouer { margin-left: auto; font: 500 .82rem/1 var(--f-texte); padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--trait); background: transparent; color: var(--encre); cursor: pointer; }
.effet > footer .rejouer:hover { border-color: var(--teal); }

/* Réduction des animations : tout s'affiche dans son état final, rien ne bouge. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
