/* Antichità Biolchini — feuille de style (kit WIDE Edizioni, 30/11/2026)
   1. Jetons : à régler d'après le style graphique choisi (_lavoro/direction.txt) — le reste suit.
   2. Règles WIDE intégrées : icônes dans les menus, boutons animés, entrée du héros, apparitions au défilement,
      effets d'images, composition éditoriale ; version immobile avec prefers-reduced-motion. */

/* ---------- 1. jetons ---------- */
:root {
  --bg: #f7f4ef; --surface: #ffffff; --ink: #1c1a17; --muted: #5d574f; --line: #e2dcd2;
  --accent: #9a2b1f; --accent-ink: #ffffff; --accent-soft: #f1e4de;
  --f-display: Georgia, "Times New Roman", serif;           /* police d'affichage (woff2 auto-hébergé dans assets/fonts) */
  --f-text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: clamp(.84rem, .8rem + .15vw, .92rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + .45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.6vw, 5.2rem);
  --radius: 4px; --wrap: 1200px; --gap: clamp(1rem, .6rem + 2vw, 2.5rem);
  --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
  --top-h: 72px;
}
/* popup WIDE Edizioni (wide-credit.js) : à l'ambiance du site */
wide-credit { --wc-bg: var(--surface); --wc-fg: var(--ink); --wc-muted: var(--muted); --wc-line: var(--line); --wc-accent: var(--accent); --wc-accent-ink: var(--accent-ink); --wc-em: var(--accent); --wc-display: var(--f-display); --wc-body: var(--f-text); --wc-radius: var(--radius); }

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-0)/1.65 var(--f-text); font-kerning: normal; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 400; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); padding: .6rem 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }

/* composition éditoriale : surtitre, titres, chapeau, lettrine */
.kicker { font: 600 var(--step--1)/1.3 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem; }
.display { font: 400 var(--step-4)/1.02 var(--f-display); letter-spacing: -.01em; }
.h2 { font: 400 var(--step-3)/1.08 var(--f-display); }
.h3 { font: 500 var(--step-1)/1.25 var(--f-display); }
.lead { font: italic 400 var(--step-1)/1.5 var(--f-display); color: var(--muted); max-width: 60ch; }
.prose { max-width: 65ch; }
.prose p { margin-bottom: 1.1em; }
@supports (initial-letter: 3) { .lettrine::first-letter { initial-letter: 3; margin-inline-end: .12em; font-family: var(--f-display); color: var(--accent); } }
.link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link:hover { background-size: 0 1px; background-position: 100% 100%; } }

/* ---------- bandeau de démo (règle WIDE : noir, gris clair, serif élégante) ---------- */
.demo-bar { background: #000; color: #cfcfcf; font: 400 .92rem/1.4 "EB Garamond", Garamond, Georgia, serif; text-align: center; padding: .45rem 1rem; }
.demo-bar a { color: #fff; }

/* ---------- en-tête : menu avec icônes ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.top.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgb(0 0 0 / .35); }
.top-in { display: flex; align-items: center; gap: 1.2rem; min-height: var(--top-h); }
.brand { text-decoration: none; margin-right: auto; display: flex; align-items: center; }
.brand-t { font: 500 1.3rem/1 var(--f-display); }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav-list, .langs, .foot-nav ul, .foot-contact { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; gap: 1.3rem; }
.nav-link { display: inline-flex; align-items: center; gap: .5em; text-decoration: none; font-size: var(--step--1); letter-spacing: .02em; padding-block: .35rem; position: relative; }
.nav-link .ic { color: var(--accent); }
.nav-list .nav-link::after { content: ""; position: absolute; left: 1.65em; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.nav-list .nav-link[aria-current="true"]::after { transform: scaleX(1); }
.langs { display: flex; gap: .2rem; font-size: var(--step--1); }
.langs a { text-decoration: none; padding: .3rem .45rem; border-radius: var(--radius); }
.langs a[aria-current] { background: var(--ink); color: var(--bg); }
.burger { display: none; background: none; border: 0; padding: .5rem; color: inherit; cursor: pointer; }
.burger .ic { width: 1.6rem; height: 1.6rem; }
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .nav-link .ic { transition: transform .3s var(--ease-out); }
  .nav-link:hover .ic { transform: translateY(-2px) rotate(-6deg); }
  .nav-list .nav-link:hover::after { transform: scaleX(1); }
}
@media (max-width: 980px) {
  .burger { display: inline-flex; }
  .top-cta span { display: none; }
  .nav { position: fixed; inset: var(--top-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 1rem; background: var(--bg); padding: 1.2rem var(--gap) 1.6rem; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgb(0 0 0 / .4); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s; }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .3s var(--ease-out); }
  .nav-list { flex-direction: column; gap: .2rem; }
  .nav-link { font-size: var(--step-1); padding-block: .55rem; }
}

/* ---------- boutons animés (remplissage qui glisse, icône qui avance, appui) ---------- */
.btn { position: relative; isolation: isolate; overflow: clip; display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 48px; padding: .8rem 1.5rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 600 var(--step--1)/1 var(--f-text); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.btn--ghost { background: transparent; color: var(--ink); border-color: currentColor; }
.btn--ghost::before { background: var(--ink); }
.btn--small { min-height: 40px; padding: .55rem 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .15s ease-out, color .3s, border-color .3s; }
  .btn::before { transition: transform .45s var(--ease-io); }
  .btn .ic { transition: transform .3s var(--ease-out); }
  .btn:active { transform: scale(.97); }
  @media (hover: hover) and (pointer: fine) {
    .btn:hover { border-color: var(--ink); }
    .btn:hover::before { transform: scaleX(1); }
    .btn--ghost:hover { color: var(--bg); }
    .btn:hover .ic { transform: translateX(4px); }
  }
}

/* ---------- ouverture ---------- */
.hero { position: relative; }
.hero--type { padding-block: clamp(4rem, 10vw, 9rem) clamp(3rem, 7vw, 6rem); }
.hero--photo { min-height: min(88svh, 900px); display: grid; align-items: end; color: #fff; }
.hero-img { position: absolute; inset: 0; overflow: clip; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 35%, rgb(0 0 0 / .55)); pointer-events: none; }
.hero-txt { position: relative; z-index: 1; padding-block: 4rem; }
.hero--photo .kicker { color: #fff; }
.hero--photo .lead { color: rgb(255 255 255 / .9); }
.hero .display { max-width: 16ch; margin-bottom: 1.2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero--photo .btn--ghost { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes unveil { from { clip-path: inset(0 0 100% 0); transform: scale(1.06); } }
  [data-enter] { animation: rise .8s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .hero-img img { animation: unveil 1.2s var(--ease-io) backwards; }
}

/* ---------- sections ---------- */
.sec { padding-block: clamp(4rem, 9vw, 8rem); }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); max-width: 60ch; }
.sec-head .lead { margin-top: 1rem; }
.chi-in { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
@media (max-width: 860px) { .chi-in { grid-template-columns: 1fr; } }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.6rem; }
.card-ic { width: 2rem; height: 2rem; color: var(--accent); margin-bottom: 1rem; }
.card .h3 { margin-bottom: .6rem; }
.card p { color: var(--muted); margin: 0; }
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .card { transition: transform .35s var(--ease-out), box-shadow .35s; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -24px rgb(0 0 0 / .35); }
}
.gal { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.frame { overflow: clip; border-radius: var(--radius); background: var(--line); }
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .frame img { transition: transform .8s var(--ease-out); }
  @media (hover: hover) and (pointer: fine) { .frame:hover img { transform: scale(1.04); } }
}

/* apparitions au défilement (amélioration progressive : sans prise en charge, tout reste visible) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal { from { opacity: 0; transform: translateY(28px); } }
    .reveal { animation: reveal linear backwards; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes img-in { from { clip-path: inset(10% 0 10% 0); } }
    .reveal-img { animation: img-in linear backwards; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  }
}

/* ---------- contacts et formulaire ---------- */
.con-in { display: grid; gap: calc(var(--gap) * 1.5); grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
@media (max-width: 860px) { .con-in { grid-template-columns: 1fr; } }
.con-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.con-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .9rem; }
.con-list .ic { width: 1.4rem; height: 1.4rem; color: var(--accent); margin-top: .2rem; }
.con-list b { display: block; font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; }
.con-list p { margin: .2rem 0 0; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.4rem); display: grid; gap: 1rem; align-content: start; }
.form label span { display: block; font-size: var(--step--1); margin-bottom: .35rem; }
.form input, .form textarea { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; transition: border-color .2s; }
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form .trap { position: absolute; left: -9999px; }
.form-note { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--step--1); color: var(--muted); margin: 0; }
.form-note .ic { color: var(--accent); margin-top: .15rem; }
.form-msg { margin: 0; font-size: var(--step--1); min-height: 1.4em; }
.form-msg.is-ok { color: #2f6b3a; } .form-msg.is-err { color: #a3261a; }

/* ---------- pied de page : menu avec icônes, mentions, crédit ---------- */
.foot { background: var(--ink); color: var(--bg); padding-top: clamp(3rem, 6vw, 5rem); }
.foot a { color: inherit; }
.foot-in { display: grid; gap: 2rem var(--gap); grid-template-columns: 1.3fr 1fr 1fr; padding-bottom: 2.5rem; }
@media (max-width: 860px) { .foot-in { grid-template-columns: 1fr; } }
.foot-name { font: 400 var(--step-2)/1.1 var(--f-display); margin-bottom: 1rem; }
.foot-line { display: flex; gap: .6rem; color: color-mix(in srgb, var(--bg) 75%, transparent); }
.foot .nav-link .ic, .foot-line .ic { color: color-mix(in srgb, var(--accent) 55%, var(--bg)); }
.foot-nav ul, .foot-contact { display: grid; gap: .35rem; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.4rem 2rem; border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); font-size: var(--step--1); color: color-mix(in srgb, var(--bg) 70%, transparent); }
.foot-legal p { margin: 0; }
.wide { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.wide b { font-weight: 600; color: var(--bg); }
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) { .wide b { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease-out); } .wide:hover b { background-size: 100% 1px; } }

/* ---------- page secondaire (confidentialité) ---------- */
.legal { padding-block: clamp(3rem, 7vw, 6rem); max-width: 760px; }
.legal-upd { color: var(--muted); font-size: var(--step--1); }
.legal-sec { margin-top: 2.4rem; }
.legal-sec .h3 { margin-bottom: .8rem; }

/* ---------- agrandissement des photos ---------- */
.lb { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lb::backdrop { background: rgb(0 0 0 / .86); }
.lb img { max-height: 88vh; width: auto; }
.lb-x { position: fixed; top: 1rem; right: 1rem; background: rgb(0 0 0 / .5); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; cursor: pointer; }
