/* =====================================================================
   Galerie d'artiste (sites d'aquarellistes, illustrateurs) — page d'accueil « une œuvre à la fois ».
   Paysage aquarellé qui suit les saisons, carrousel 3D de feuilles de papier, fenêtres en verre dépoli.
   Encre : gris de Payne. Couleur d'accent : un pigment par saison (rose garance, outremer, terre de Sienne, indigo).
   ===================================================================== */

.g-app {
  --g-ink: #2b3640;
  --g-soft: #4b5763;
  --g-line: rgb(43 54 64 / .14);
  --g-paper: #fbfaf7;
  --g-sheet: #f9f8f4;
  --g-glass: rgb(250 250 247 / .66);
  --g-glass-2: rgb(255 255 255 / .82);
  --g-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --g-body: 'Jost', ui-sans-serif, system-ui, sans-serif;
  --g-script: 'Great Vibes', 'Cormorant Garamond', cursive;
  --g-brand-ink: #4e5a49;       /* vert de gris, encre du nom manuscrit */
  --g-accent: #a3385c;          /* rose garance */
  --g-accent-ink: #7d2645;
  --g-tint: rgb(163 56 92 / .09);
  --g-pad: clamp(16px, 3.4vw, 48px);
  --g-ease: cubic-bezier(.22, .7, .18, 1);
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  color: var(--g-ink);
  font-family: var(--g-body);
  isolation: isolate;
  overflow: hidden;
}
.g-app[data-season="ete"] { --g-accent: #2c5592; --g-accent-ink: #1f3f70; --g-tint: rgb(44 85 146 / .09); }      /* outremer */
.g-app[data-season="automne"] { --g-accent: #8b4a12; --g-accent-ink: #6c380c; --g-tint: rgb(139 74 18 / .09); }  /* terre de Sienne */
.g-app[data-season="hiver"] { --g-accent: #2c4a75; --g-accent-ink: #1e3657; --g-tint: rgb(44 74 117 / .09); }     /* indigo */

html[data-home="galerie"], html[data-home="galerie"] body.g-body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: #eef1ec; }
.g-app [hidden] { display: none !important; }
.g-app :focus-visible { outline: 2px solid var(--g-accent); outline-offset: 3px; border-radius: 6px; }
:where(.g-app) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:where(.g-app) a { color: inherit; }

/* ------------------------------------------------------------------ Paysage */
.g-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #eef1ec; }
.g-scene__set { position: absolute; inset: -2.5%; transition: opacity 1.2s ease; }
.g-scene__set.is-entering { opacity: 0; }
.g-scene__layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; will-change: transform; transition: transform .9s var(--g-ease); }
.g-scene__layer--back { transform: translate3d(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -4px), 0); }
.g-scene__layer--mid { transform: translate3d(calc(var(--px, 0) * -12px), calc(var(--py, 0) * -6px), 0); }
.g-scene__layer--front { transform: translate3d(calc(var(--px, 0) * -24px), calc(var(--py, 0) * -10px), 0) scale(1.02); }
/* Grain du papier + halo clair derrière l'œuvre */
.g-scene__paper {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 52% at 50% 44%, rgb(255 255 255 / .62), rgb(255 255 255 / 0) 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .2 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .4;
}
.g-scene__fade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgb(246 246 242 / .7) 0%, rgb(246 246 242 / .35) 18%, rgb(246 246 242 / 0) 36%),
    linear-gradient(to bottom, rgb(246 246 242 / .55) 0%, rgb(246 246 242 / 0) 16%);
}
.g-scene__layer--front { opacity: .78; }
.g-scene__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ------------------------------------------------------------------ Verre dépoli (barres, boutons) */
.g-glass, .g-icon-btn, .g-seg, .g-arrow, .g-season {
  background: var(--g-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid rgb(255 255 255 / .7);
  box-shadow: 0 1px 2px rgb(43 54 64 / .06), 0 10px 30px -18px rgb(43 54 64 / .35);
}

/* ------------------------------------------------------------------ En-tête */
.g-top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(12px, 2.2vh, 22px) var(--g-pad) 0; }
.g-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-width: 0; }
.g-brand__logo { width: 48px; height: 48px; flex: none; object-fit: contain; }
.g-brand__text { margin: 0; display: flex; flex-direction: column; min-width: 0; font-weight: 400; }
.g-brand__name { font-family: var(--g-display); font-weight: 600; font-size: clamp(1.45rem, 2.2vw, 1.9rem); line-height: 1; letter-spacing: .005em; }
.g-brand__tag { font-size: .82rem; color: var(--g-soft); margin-top: .3rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Nom en écriture manuscrite (Fond, saisons & ouverture → Écriture du nom) */
.g-app[data-brand="script"] .g-brand__name { font-family: var(--g-script); font-weight: 400; font-size: clamp(2rem, 2.9vw, 2.5rem); line-height: .95; letter-spacing: 0; color: var(--g-brand-ink); padding-right: .15em; }
.g-app[data-brand="script"] .g-brand__tag { margin-top: .1rem; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--g-brand-ink); }
.g-nav { display: flex; align-items: center; gap: .5rem; }
.g-nav__links { display: flex; align-items: center; gap: .25rem; margin-right: .5rem; }
.g-nav__link { position: relative; padding: .55rem .85rem; font-size: .95rem; letter-spacing: .01em; border-radius: 999px; transition: background-color .2s; }
.g-nav__link:hover { background: rgb(255 255 255 / .55); }
.g-icon-btn { width: 42px; height: 42px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; transition: transform .2s, background-color .2s; text-decoration: none; }
.g-icon-btn:hover { background: var(--g-glass-2); transform: translateY(-1px); }
.g-nav__burger { display: none; }

/* ------------------------------------------------------------------ Carrousel */
.g-main { min-height: 0; min-width: 0; display: flex; }
/* minmax(0, 1fr) : une étiquette trop large (petits écrans, ex. écran extérieur d'un téléphone pliant) ne doit jamais
   élargir la galerie au-delà de l'écran, sinon le carrousel se décentre et le bouton est coupé */
.g-gallery { position: relative; flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); }
.g-stage { position: relative; min-height: 0; perspective: 1700px; perspective-origin: 50% 46%; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; outline: none; }
.g-stage.is-dragging { cursor: grabbing; }
.g-ring { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; transform-style: preserve-3d; }
.g-card {
  --w: min(calc(var(--card-h, 520px) * var(--r, .78)), 60vw);
  position: absolute; left: 50%; top: 50%;
  width: var(--w); height: min(var(--card-h, 520px), calc(var(--w) / var(--r, .78)));
  translate: -50% -52%;
  transform-style: preserve-3d; will-change: transform;
}
.g-stage:not(.is-ready) .g-card:not(.is-current) { opacity: 0; }
.g-card__link { display: block; width: 100%; height: 100%; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.g-card.is-current .g-card__link { cursor: zoom-in; }
.g-stage.is-dragging .g-card__link { cursor: grabbing; }
.g-sheet { margin: 0; width: 100%; height: 100%; }
.g-sheet__paper {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 3px; background: var(--g-paper);
  box-shadow: 0 0 0 1px rgb(43 54 64 / .05), 0 2px 3px rgb(43 54 64 / .08), 0 22px 44px -22px rgb(43 54 64 / .55), 0 60px 90px -50px rgb(43 54 64 / .45);
  transition: box-shadow .5s var(--g-ease);
}
.g-sheet__paper img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.g-sheet__paper::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgb(255 255 255 / .16), rgb(255 255 255 / 0) 38%), rgb(236 239 234 / var(--dim, 0)); }
.g-card.is-current .g-sheet__paper { box-shadow: 0 0 0 1px rgb(43 54 64 / .05), 0 3px 4px rgb(43 54 64 / .08), 0 30px 60px -24px rgb(43 54 64 / .6), 0 80px 120px -60px rgb(43 54 64 / .5); }
.g-card::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -4.5%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgb(30 40 50 / .32), rgb(30 40 50 / 0)); filter: blur(5px); pointer-events: none; }
.g-sheet__empty { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--g-soft); }
.g-sheet__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.g-sheet__video.is-on { opacity: 1; }
.g-sheet__anim { position: absolute; left: 10px; bottom: 10px; width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgb(255 255 255 / .8); color: var(--g-ink); opacity: 0; transition: opacity .3s; }
.g-card.is-current .g-sheet__anim { opacity: .9; }
/* Pastille rouge des galeries : œuvre vendue */
/* Œuvre cachée aux visiteurs (vue seulement par l'Espace Pro) */
.g-hid { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem .2rem .45rem; border-radius: 999px; background: rgb(43 54 64 / .82); color: #fff; font-size: .72rem; font-weight: 500; letter-spacing: .02em; transform: translateZ(1px); }
.g-card.is-hidden .g-sheet__paper { outline: 2px dashed rgb(43 54 64 / .45); outline-offset: 4px; }
.g-card.is-hidden .g-sheet__paper img { opacity: .72; }
.g-badge--hidden { gap: .35rem; color: var(--g-ink); background: rgb(43 54 64 / .08); }
.g-dot { position: absolute; top: 12px; right: 12px; width: 15px; height: 15px; border-radius: 999px; background: #c42b2b; box-shadow: 0 0 0 3px rgb(255 255 255 / .9), 0 2px 6px rgb(0 0 0 / .25); transform: translateZ(1px); }

.g-arrow { position: absolute; top: 50%; translate: 0 -50%; z-index: 120; width: 52px; height: 52px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; transition: transform .25s var(--g-ease), background-color .2s; }
.g-arrow:hover { background: var(--g-glass-2); }
.g-arrow--prev { left: clamp(10px, 3vw, 44px); }
.g-arrow--next { right: clamp(10px, 3vw, 44px); }
.g-arrow--prev:hover { transform: translateX(-2px); }
.g-arrow--next:hover { transform: translateX(2px); }

.g-index { order: 2; display: flex; justify-content: center; gap: 6px; margin: 0; padding: clamp(6px, 1.4vh, 14px) 1rem 0; list-style: none; }
.g-index__dot { display: block; width: 18px; height: 18px; position: relative; }
.g-index__dot::before { content: ''; position: absolute; left: 3px; right: 3px; top: 8px; height: 2px; border-radius: 2px; background: rgb(43 54 64 / .28); transition: background-color .3s, left .3s, right .3s; }
.g-index__dot:hover::before { background: rgb(43 54 64 / .6); }
.g-index__dot.is-current::before { background: var(--g-accent); left: -3px; right: -3px; }

/* ------------------------------------------------------------------ Étiquette + achat */
.g-panel { order: 3; position: relative; z-index: 130; width: calc(100% - 2 * var(--g-pad)); max-width: 1180px; margin: clamp(6px, 1.2vh, 12px) auto 0; padding: clamp(12px, 1.8vh, 20px) clamp(18px, 2.4vw, 32px); border-radius: 28px;
  background: rgb(250 250 247 / .74); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgb(255 255 255 / .75); box-shadow: 0 1px 2px rgb(43 54 64 / .05), 0 24px 60px -30px rgb(43 54 64 / .45); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: clamp(1rem, 3vw, 3rem); }
.g-label { display: flex; gap: 1.1rem; align-items: flex-start; min-width: 0; }
.g-label__count { margin: .55rem 0 0; font-family: var(--g-display); font-size: 1.05rem; font-weight: 600; font-variant-numeric: lining-nums; color: var(--g-accent-ink); white-space: nowrap; }
.g-label__count span { color: var(--g-soft); font-weight: 400; }
.g-label__body { min-width: 0; }
.g-label__title { margin: 0; font-family: var(--g-display); font-style: italic; font-weight: 500; font-size: clamp(1.75rem, 3.1vw, 2.75rem); line-height: 1.02; letter-spacing: -.005em; text-wrap: balance; }
.g-label__title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--g-ease); }
.g-label__title a:hover { background-size: 100% 1px; }
.g-label__sub { margin: .3rem 0 0; font-family: var(--g-display); font-style: italic; font-size: 1.12rem; color: var(--g-soft); }
.g-label__meta { margin: .45rem 0 0; font-size: .84rem; line-height: 1.5; color: var(--g-soft); }
.g-badge { display: inline-flex; align-items: center; gap: .45rem; margin: .55rem 0 0; padding: .22rem .65rem .22rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 500; background: rgb(255 255 255 / .7); border: 1px solid var(--g-line); }
.g-badge i { width: 9px; height: 9px; border-radius: 999px; background: #c42b2b; }
.g-badge--reserved { color: var(--g-accent-ink); }

.g-buy { display: flex; flex-direction: column; align-items: flex-end; gap: .65rem; }
.g-seg { display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px; }
.g-seg__opt { display: inline-flex; align-items: baseline; gap: .45rem; padding: .5rem 1rem; border-radius: 999px; font-size: .9rem; transition: background-color .2s, box-shadow .2s; white-space: nowrap; }
.g-seg__opt small { font-size: .78rem; color: var(--g-soft); }
.g-seg__opt[aria-checked="true"] { background: #fff; box-shadow: 0 1px 2px rgb(43 54 64 / .12), 0 4px 14px -6px rgb(43 54 64 / .3); }
.g-seg__opt[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.g-formats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.g-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; font-size: .84rem; border: 1px solid var(--g-line); background: rgb(255 255 255 / .55); transition: background-color .2s, color .2s, border-color .2s; cursor: pointer; }
.g-chip:hover { border-color: rgb(43 54 64 / .35); }
.g-chip[aria-checked="true"], .g-chip--check:has(input:checked) { background: var(--g-ink); border-color: var(--g-ink); color: #fff; }
.g-chip--check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.g-chip--check:has(input:focus-visible) { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.g-buy__row { display: flex; align-items: center; gap: 1.1rem; }
.g-price { margin: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.g-price__v { font-family: var(--g-display); font-weight: 600; font-size: clamp(1.7rem, 2.6vw, 2.2rem); font-variant-numeric: lining-nums; }
.g-price__n { font-size: .78rem; color: var(--g-soft); max-width: 30ch; text-align: right; }
.g-cta, .g-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .95rem 1.6rem; border-radius: 999px; font-size: .98rem; font-weight: 500; letter-spacing: .01em; background: var(--g-accent) !important; color: #fff !important; text-decoration: none; box-shadow: 0 12px 26px -14px var(--g-accent), inset 0 1px 0 rgb(255 255 255 / .18); transition: transform .25s var(--g-ease), background-color .25s, box-shadow .25s; white-space: nowrap; }
.g-cta:hover, .g-btn:hover { background: var(--g-accent-ink) !important; transform: translateY(-2px); }
.g-cta--soft, .g-btn--ghost { background: rgb(255 255 255 / .75) !important; color: var(--g-ink) !important; box-shadow: inset 0 0 0 1px var(--g-line); }
.g-cta--soft:hover, .g-btn--ghost:hover { background: #fff !important; }
.g-btn--link { background: none !important; color: var(--g-ink) !important; box-shadow: none; padding-left: .6rem; padding-right: .6rem; text-decoration: underline; text-underline-offset: 3px; }
.g-btn--link:hover { background: none !important; }

/* ------------------------------------------------------------------ Bas de page */
.g-foot { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(6px, 1.2vh, 12px) var(--g-pad) clamp(10px, 1.8vh, 18px); font-size: .82rem; color: var(--g-soft); }
.g-assure { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; text-align: left; padding: .35rem .2rem; border-radius: 10px; }
.g-assure__item { display: inline-flex; align-items: center; gap: .45rem; }
.g-assure__item svg { color: var(--g-accent); }
.g-assure:hover .g-assure__item span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(43 54 64 / .35); }
.g-foot__end { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.g-season { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 999px; color: var(--g-ink); font-size: .8rem; }
.g-season svg { color: var(--g-accent); }
.g-foot__link { text-decoration: none; }
.g-foot__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ Fenêtres */
:where(.g-app) dialog { border: 0; padding: 0; margin: 0; color: var(--g-ink); background: transparent; max-width: none; max-height: none; font-family: var(--g-body); }
.g-app dialog::backdrop { background: rgb(36 44 52 / .34); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.g-app dialog[open] { animation: g-fade .32s var(--g-ease); }
.g-app dialog[open]::backdrop { animation: g-fade .32s ease; }
.g-app dialog.is-closing { animation: g-fade-out .22s ease forwards; }
.g-app dialog.is-closing::backdrop { animation: g-fade-out .22s ease forwards; }
@keyframes g-fade { from { opacity: 0; } }
@keyframes g-fade-out { to { opacity: 0; } }
@keyframes g-from-left { from { transform: translateX(-40px); opacity: 0; } }
@keyframes g-from-right { from { transform: translateX(40px); opacity: 0; } }
@keyframes g-rise { from { transform: translateY(24px) scale(.985); opacity: 0; } }

.g-sheet-bg, .g-drawer, .g-modal { background: var(--g-sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E") !important; }
.g-drawer { position: fixed; top: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(540px, 94vw); box-shadow: 0 0 80px -20px rgb(43 54 64 / .45); }
.g-drawer--left { left: 0; right: auto; border-radius: 0 26px 26px 0; }
.g-drawer--right { right: 0; left: auto; border-radius: 26px 0 0 26px; }
.g-app .g-drawer--left[open] { animation: g-from-left .38s var(--g-ease); }
.g-app .g-drawer--right[open] { animation: g-from-right .38s var(--g-ease); }
.g-drawer--menu { width: min(380px, 92vw); }
.g-drawer__in { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(24px, 4vh, 40px) clamp(22px, 3vw, 40px) 48px; }
.g-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgb(255 255 255 / .8) !important; box-shadow: inset 0 0 0 1px var(--g-line); }
.g-close:hover { background: #fff !important; }
.g-drawer__title, .g-modal__title { margin: 0; font-family: var(--g-display); font-weight: 500; font-style: italic; font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.05; padding-right: 3rem; text-wrap: balance; }
.g-drawer__kicker, .g-modal__kicker { margin: .5rem 0 0; font-size: .9rem; color: var(--g-accent-ink); }
.g-modal__kicker { margin: 0 0 .25rem; }
.g-drawer__lead, .g-modal__lead { margin: 1rem 0 0; font-family: var(--g-display); font-size: 1.28rem; line-height: 1.45; }
.g-prose { margin-top: 1rem; font-size: .98rem; line-height: 1.72; }
.g-prose p { margin: 0 0 .9em; max-width: 62ch; }
.g-h3 { margin: 2rem 0 .8rem; font-family: var(--g-display); font-weight: 600; font-size: 1.35rem; }
.g-portrait { margin: -.5rem 0 1.4rem; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; }
.g-portrait img { width: 100%; height: 100%; object-fit: cover; }
.g-dl { margin: 0; display: grid; gap: .9rem; }
.g-dl dt { font-weight: 500; }
.g-dl dd { margin: .15rem 0 0; color: var(--g-soft); line-height: 1.6; font-size: .94rem; }
.g-acc details { border-top: 1px solid var(--g-line); }
.g-acc details:last-child { border-bottom: 1px solid var(--g-line); }
.g-acc summary { cursor: pointer; padding: .85rem 2rem .85rem 0; font-weight: 500; list-style: none; position: relative; }
.g-acc summary::-webkit-details-marker { display: none; }
.g-acc summary::after { content: ''; position: absolute; right: .3rem; top: 50%; width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .25s; }
.g-acc details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.g-acc details > div { padding: 0 0 1rem; color: var(--g-soft); line-height: 1.65; font-size: .95rem; }
.g-photos { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); margin-top: 1.6rem; }
.g-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.g-quote { margin: 2rem 0 0; padding-left: 1.2rem; border-left: 2px solid var(--g-accent); font-family: var(--g-display); font-style: italic; font-size: 1.3rem; line-height: 1.45; }
.g-assure-list, .g-ship, .g-contact { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 1rem; }
.g-assure-list li, .g-ship li { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: start; }
.g-assure-list svg, .g-ship svg, .g-contact svg { color: var(--g-accent); margin-top: .15rem; }
.g-assure-list p, .g-ship p { margin: 0; font-size: .93rem; line-height: 1.55; color: var(--g-soft); }
.g-assure-list__t, .g-ship__t { color: var(--g-ink) !important; font-weight: 500; font-size: .98rem !important; }
.g-ship { margin-top: 0; }
.g-ship__p { font-size: .88rem; white-space: nowrap; color: var(--g-ink); }
.g-contact { gap: .6rem; }
.g-contact li { display: flex; gap: .7rem; align-items: center; }
.g-note { margin: .9rem 0 0; font-size: .85rem; line-height: 1.55; color: var(--g-soft); }
.g-menu { margin-top: 1.6rem; display: grid; }
.g-menu > * { display: flex; align-items: center; gap: .9rem; padding: 1rem .2rem; border-bottom: 1px solid var(--g-line); text-decoration: none; font-size: 1.02rem; text-align: left; }
.g-menu svg { color: var(--g-accent); }

/* Fenêtre centrée (commande, sur mesure) */
.g-modal { position: fixed; inset: 0; margin: auto !important; width: min(1000px, 94vw); height: fit-content; max-height: min(92dvh, 800px); border-radius: 26px; box-shadow: 0 40px 120px -30px rgb(43 54 64 / .55); overflow: hidden; }
.g-app .g-modal[open] { animation: g-rise .38s var(--g-ease); }
.g-modal--wizard { width: min(820px, 94vw); }
.g-modal__in { position: relative; display: flex; flex-direction: column; max-height: inherit; overflow: hidden; }
.g-modal__in > * { min-height: 0; flex: none; }
.g-modal__in > div:not(.g-wizard), .g-wizard { overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; }
.g-modal__head { padding: clamp(20px, 3vh, 30px) clamp(20px, 3vw, 36px) 0; }
.g-modal__ref { margin: .35rem 0 0; font-size: .84rem; color: var(--g-soft); }
.g-order__head { display: flex; gap: 1.1rem; align-items: center; }
.g-order__thumb { width: 72px; height: 90px; object-fit: cover; border-radius: 4px; box-shadow: 0 8px 18px -10px rgb(43 54 64 / .6); flex: none; }
.g-order { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); padding: 1.2rem clamp(20px, 3vw, 36px) clamp(20px, 3vh, 30px); }
.g-fs { border: 0; margin: 0 0 1.1rem; padding: 0; min-width: 0; }
.g-fs legend { font-family: var(--g-display); font-weight: 600; font-size: 1.15rem; margin-bottom: .55rem; padding: 0; }
.g-fs legend small { font-family: var(--g-body); font-weight: 400; font-size: .78rem; color: var(--g-soft); margin-left: .35rem; }
.g-opts { display: grid; gap: 8px; }
.g-opts--row { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.g-opt { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: .8rem; padding: .7rem .9rem; border-radius: 14px; background: rgb(255 255 255 / .6); box-shadow: inset 0 0 0 1px var(--g-line); cursor: pointer; transition: box-shadow .2s, background-color .2s; }
.g-opts--row .g-opt { grid-template-columns: 1fr; text-align: left; }
.g-opt:hover { background: #fff; }
.g-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.g-opt:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--g-accent); }
.g-opt:has(input:focus-visible) { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.g-opt__t { font-weight: 500; font-size: .95rem; }
.g-opt__d { grid-column: 1; font-size: .8rem; line-height: 1.4; color: var(--g-soft); }
.g-opt__p { grid-column: 2; grid-row: 1 / span 2; font-size: .9rem; white-space: nowrap; }
.g-opts--row .g-opt__p { grid-column: 1; grid-row: auto; margin-top: .2rem; font-weight: 500; }
.g-order__sum { align-self: start; padding: 1.1rem 1.2rem 1.2rem; border-radius: 20px; background: rgb(255 255 255 / .72); box-shadow: inset 0 0 0 1px var(--g-line); }
.g-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; }
.g-lines li { display: flex; justify-content: space-between; gap: 1rem; }
.g-lines li span:last-child { white-space: nowrap; }
.g-total { display: flex; justify-content: space-between; align-items: baseline; margin: .8rem 0 1rem; padding-top: .8rem; border-top: 1px solid var(--g-line); }
.g-total strong { font-family: var(--g-display); font-weight: 600; font-size: 1.9rem; font-variant-numeric: lining-nums; }
.g-field { display: grid; gap: .3rem; margin-bottom: .7rem; font-size: .84rem; color: var(--g-soft); }
.g-field input, .g-field textarea { font: inherit; font-size: .95rem; color: var(--g-ink); padding: .65rem .8rem; border-radius: 12px; border: 1px solid var(--g-line); background: #fff; width: 100%; }
.g-field input:focus, .g-field textarea:focus { outline: 2px solid var(--g-accent); outline-offset: 0; border-color: transparent; }
.g-field--half { max-width: 260px; }
.g-send { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.g-send .g-btn { flex: 1 1 auto; padding: .8rem 1.1rem; font-size: .92rem; }
.g-send .g-btn--link { flex: 0 0 auto; }

/* Sur mesure */
.g-steps { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; margin: 1.1rem 0 0; padding: 0; font-size: .8rem; color: var(--g-soft); }
.g-steps li { display: inline-flex; align-items: center; gap: .4rem; }
.g-steps li span { width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; box-shadow: inset 0 0 0 1px var(--g-line); }
.g-steps li[aria-current="step"] { color: var(--g-ink); font-weight: 500; }
.g-steps li[aria-current="step"] span, .g-steps li.is-done span { background: var(--g-accent); color: #fff; box-shadow: none; }
.g-wizard { padding: 1.2rem clamp(20px, 3vw, 36px) .4rem; min-height: 0; }
.g-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.g-step__legend { font-family: var(--g-display); font-weight: 600; font-size: 1.2rem; margin: 0 0 .7rem; padding: 0; }
.g-step .g-step__legend:not(:first-child) { margin-top: 1.2rem; }
.g-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 1rem; }
.g-type { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; row-gap: .15rem; align-items: start; padding: .9rem 1rem; border-radius: 16px; background: rgb(255 255 255 / .62); box-shadow: inset 0 0 0 1px var(--g-line); cursor: pointer; transition: box-shadow .2s, background-color .2s; }
.g-type:hover { background: #fff; }
.g-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.g-type:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--g-accent); }
.g-type:has(input:focus-visible) { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.g-type__ico { grid-row: 1 / span 3; width: 38px; height: 38px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--g-tint); color: var(--g-accent-ink); }
.g-type__t { font-weight: 500; }
.g-type__d { font-size: .82rem; line-height: 1.45; color: var(--g-soft); }
.g-type__p { font-size: .8rem; color: var(--g-accent-ink); }
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-inspi { margin: -.2rem 0 .9rem; font-family: var(--g-display); font-style: italic; font-size: 1.1rem; color: var(--g-accent-ink); }
.g-message { white-space: pre-wrap; font-family: var(--g-body); font-size: .9rem; line-height: 1.6; padding: 1rem 1.1rem; border-radius: 16px; background: rgb(255 255 255 / .7); box-shadow: inset 0 0 0 1px var(--g-line); max-height: 34vh; overflow: auto; margin: 0 0 .9rem; }
.g-modal__foot { display: flex; align-items: center; gap: .8rem; padding: .9rem clamp(20px, 3vw, 36px) clamp(16px, 2.4vh, 24px); border-top: 1px solid var(--g-line); }
.g-modal__err { flex: 1; margin: 0; font-size: .85rem; color: #a32020; }
.g-modal__foot [data-g-next-step] { margin-left: auto; }

/* Visionneuse */
.g-viewer { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: rgb(244 245 241 / .96) !important; }
.g-viewer::backdrop { background: rgb(36 44 52 / .5); }
.g-viewer__in { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(16px, 3vw, 48px); padding: clamp(16px, 4vh, 48px) clamp(16px, 4vw, 64px); }
.g-viewer__fig { margin: 0; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; border-radius: 6px; }
.g-viewer__fig img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 70px -30px rgb(43 54 64 / .55); transition: transform .35s var(--g-ease); transform-origin: var(--ox, 50%) var(--oy, 50%); }
.g-viewer__fig.is-zoomed { cursor: zoom-out; }
.g-viewer__fig.is-zoomed img { transform: scale(2.4); box-shadow: none; }
.g-viewer__txt { align-self: center; overflow-y: auto; max-height: 100%; padding-right: .3rem; }
.g-viewer__title { margin: 0; font-family: var(--g-display); font-style: italic; font-weight: 500; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.03; }
.g-viewer__txt .g-btn { margin-top: 1rem; }

.g-empty { margin: auto; max-width: 34rem; text-align: center; padding: 2rem; border-radius: 24px; background: var(--g-glass); }
.g-empty__title { font-family: var(--g-display); font-style: italic; font-size: 1.8rem; margin: 0 0 .5rem; }
.g-gallery--empty { display: flex; }

/* Mode édition de l'Espace Pro : rubriques listées dans le menu « Modifier la page » (admin/toolbar.js, base.css)
   La barre de l'Espace ne cache plus le bas de la page : la galerie lui laisse sa place. */
.g-app [data-section] { position: relative; }
body.has-admin-bar .g-app { padding-bottom: 70px; }
body.has-admin-bar .g-foot { padding-bottom: 6px; }
.g-dock-tool { display: grid; gap: 6px; }
.g-dock-tool__t { margin: 0; font-size: 12px; font-weight: 700; color: #475569; }
.g-dock-tool__t small { font-weight: 500; color: #64748b; }
.g-dock-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.g-dock-seg button { padding: 4px 7px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font: 500 12px/1.2 ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.g-dock-seg button:hover { border-color: #cbd5e1; background: #f8fafc; }
.g-dock-seg button[aria-pressed="true"] { background: #1e293b; border-color: #1e293b; color: #fff; }
.g-dock-btn { display: flex; align-items: center; gap: .55rem; width: 100%; padding: 8px 10px; border-radius: 10px; border: 0; background: #f1f5f9; color: #334155; font: 600 13px/1.3 ui-sans-serif, system-ui, sans-serif; cursor: pointer; text-align: left; }
.g-dock-btn:hover:not(:disabled) { background: #e2e8f0; }
.g-dock-btn:disabled { opacity: .6; cursor: default; font-weight: 500; }

/* ------------------------------------------------------------------ Animation d'ouverture (render.js intro, app.js playIntro) */
@property --g-reveal { syntax: '<percentage>'; inherits: false; initial-value: 160%; }
@property --g-write { syntax: '<percentage>'; inherits: false; initial-value: 120%; }
.g-intro { display: none; position: fixed; inset: 0; z-index: 300; place-items: center; padding: 5vh 5vw; cursor: pointer;
  background: var(--g-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  transition: opacity .75s ease;
  animation: g-intro-safety .6s 4.2s forwards; /* sans JavaScript : le papier s'efface quand même */ }
html[data-intro] .g-intro { display: grid; }
html[data-intro], html[data-intro] body { overflow: hidden; }
.g-intro.is-leaving { opacity: 0; pointer-events: none; }
.g-intro__in { position: relative; display: grid; justify-items: center; width: min(820px, 92vw); transition: transform .75s var(--g-ease); }
.g-intro.is-leaving .g-intro__in { transform: translateY(-16px) scale(.97); }
.g-intro__art { display: block; width: min(640px, 84vw); height: auto; max-height: 56vh; object-fit: contain; mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 24% 84%, #000 var(--g-reveal), transparent calc(var(--g-reveal) + 24%));
  mask-image: radial-gradient(circle at 24% 84%, #000 var(--g-reveal), transparent calc(var(--g-reveal) + 24%)); }
/* marges intérieures larges : les boucles des lettres manuscrites (E, P…) débordent de la ligne ; le masque de l'écriture
   ne couvre que la boîte du texte, il les couperait */
.g-intro__name { margin: calc(-1.2rem - .45em) -.1em -.32em 0; justify-self: end; padding: .45em .4em .32em .35em; font-family: var(--g-display); font-style: italic; font-weight: 500; font-size: clamp(3rem, 8.4vw, 6.6rem); line-height: 1.05; color: var(--g-ink); white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--g-write) - 14%), transparent var(--g-write));
  mask-image: linear-gradient(90deg, #000 calc(var(--g-write) - 14%), transparent var(--g-write)); }
.g-app[data-brand="script"] .g-intro__name { font-family: var(--g-script); font-style: normal; font-weight: 400; color: var(--g-brand-ink); font-size: clamp(3.4rem, 9.5vw, 7.4rem); }
.g-intro__art + .g-intro__name { margin-top: calc(-9% - .45em); }
.g-intro__sub { margin: .3rem 0 0; justify-self: end; display: flex; align-items: center; gap: 1.1rem; padding-right: 1.2rem; font-family: var(--g-display); font-weight: 500; font-size: clamp(.8rem, 1.5vw, 1.05rem); letter-spacing: .32em; text-transform: uppercase; color: var(--g-brand-ink); }
.g-intro__sub::before, .g-intro__sub::after { content: ''; width: clamp(28px, 6vw, 80px); height: 1px; background: currentColor; opacity: .55; }
.g-intro:not(:has(.g-intro__art)) .g-intro__name, .g-intro:not(:has(.g-intro__art)) .g-intro__sub { justify-self: center; }
html[data-intro] .g-intro__art { animation: g-intro-paint 2.2s cubic-bezier(.42, .1, .3, 1) both; }
html[data-intro] .g-intro__name { animation: g-intro-write 1.5s 1s cubic-bezier(.45, .12, .3, 1) both; }
html[data-intro] .g-intro__sub { animation: g-intro-sub 1s 1.9s ease both; }
html[data-intro] .g-intro:not(:has(.g-intro__art)) .g-intro__name { animation-delay: .15s; }
html[data-intro] .g-intro:not(:has(.g-intro__art)) .g-intro__sub { animation-delay: .9s; }
@keyframes g-intro-paint { from { --g-reveal: 0%; opacity: 0; filter: blur(10px) saturate(.5); transform: scale(1.035); } 25% { opacity: 1; } to { --g-reveal: 160%; opacity: 1; filter: blur(0) saturate(1); transform: none; } }
@keyframes g-intro-write { from { --g-write: 0%; } to { --g-write: 120%; } }
@keyframes g-intro-sub { from { opacity: 0; letter-spacing: .5em; } to { opacity: 1; letter-spacing: .32em; } }
@keyframes g-intro-safety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
/* Animations CSS dès le premier affichage (sans attendre le JavaScript) ; app.js gère le clic pour passer et la fin */
.g-intro.is-leaving { animation: none; }

/* ------------------------------------------------------------------ Écrans moyens et petits */
@media (max-width: 1023px) {
  .g-nav__link { padding: .5rem .6rem; font-size: .9rem; }
}
@media (max-width: 760px) {
  .g-app { min-height: 0; }
  .g-nav__links, .g-nav [data-action="account"] { display: none; }
  .g-nav__burger { display: inline-flex; }
  .g-brand__tag { font-size: .74rem; max-width: 56vw; }
  .g-arrow { display: none; }
  .g-card { --w: min(calc(var(--card-h, 420px) * var(--r, .78)), 74vw); }
  .g-panel { grid-template-columns: minmax(0, 1fr); gap: .6rem; padding-top: 4px; }
  .g-label { gap: .8rem; }
  .g-label__title { font-size: clamp(1.55rem, 7vw, 2rem); }
  .g-label__meta { display: none; }
  .g-label__sub { font-size: 1rem; }
  .g-buy { align-items: stretch; gap: .5rem; }
  .g-seg { display: flex; }
  .g-seg__opt { flex: 1; justify-content: center; padding: .5rem .6rem; }
  .g-formats { justify-content: flex-start; }
  .g-buy__row { justify-content: space-between; }
  .g-price { align-items: flex-start; }
  .g-price__n { text-align: left; }
  .g-cta { padding: .9rem 1.3rem; }
  .g-index { padding-top: 4px; }
  .g-foot { padding-top: 4px; }
  .g-assure__item span, .g-foot__credit, .g-season [data-g-season-label] { display: none; }
  .g-assure { flex-wrap: nowrap; align-items: center; gap: .55rem; white-space: nowrap; }
  .g-assure::after { content: 'Livraison & garanties'; margin-left: .15rem; }
  .g-foot { gap: .6rem; }
  .g-foot__end { flex-wrap: nowrap; gap: .5rem; }
  .g-brand__logo { width: 42px; height: 42px; }
  .g-app[data-brand="script"] .g-brand__name { font-size: 1.85rem; }
  .g-app[data-brand="script"] .g-brand__tag { font-size: .58rem; letter-spacing: .12em; line-height: 1.35; max-width: 52vw; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .g-intro__name { justify-self: center; }
  .g-intro__sub { justify-self: center; padding-right: 0; }
  body.has-admin-bar .g-app { padding-bottom: 66px; }
  .g-foot__link { white-space: nowrap; }
  .g-season { padding: .3rem .5rem; }
  .g-drawer { width: 100vw; border-radius: 0; }
  .g-modal { width: 100vw; max-height: 94dvh; inset: auto 0 0 0; margin: 0 !important; border-radius: 24px 24px 0 0; }
  .g-app .g-modal[open] { animation: g-rise .35s var(--g-ease); }
  .g-order { grid-template-columns: 1fr; }
  .g-viewer__in { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; overflow-y: auto; }
  .g-viewer__txt { max-height: 40dvh; }
  .g-label__count { display: none; }
}
/* Très petits téléphones (360 px et moins) : tout tient sur la largeur */
@media (max-width: 380px) {
  .g-seg__opt { gap: .3rem; padding: .5rem .45rem; font-size: .84rem; }
  .g-seg__opt small { font-size: .72rem; }
  .g-cta { padding: .85rem 1.05rem; font-size: .92rem; }
  .g-price__v { font-size: 1.55rem; }
  .g-foot { font-size: .76rem; }
  .g-season { display: none; }
}
/* Écrans de 350 px et moins (écran extérieur des téléphones pliants) : le prix reste affiché sous le choix */
@media (max-width: 350px) {
  .g-index { gap: 3px; padding-left: .6rem; padding-right: .6rem; }
  .g-index li { flex: 0 1 18px; min-width: 7px; }
  .g-index__dot { width: 100%; }
  .g-seg__opt { min-width: 0; white-space: normal; text-align: center; }
  .g-cta { white-space: normal; text-align: center; line-height: 1.2; }
  .g-seg__opt small { display: none; }
  .g-cta { padding: .8rem .9rem; }
  .g-buy__row { gap: .6rem; }
  .g-assure__item:nth-child(n+2) { display: none; }
}
/* Écrans très bas : la page défile plutôt que de tasser l'œuvre */
@media (max-height: 600px) and (max-width: 760px), (max-height: 520px) {
  html[data-home="galerie"], html[data-home="galerie"] body.g-body { overflow: auto; height: auto; }
  .g-app { height: auto; min-height: 100dvh; grid-template-rows: auto auto auto; }
  .g-stage { height: 68vh; min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-scene__layer, .g-scene__set, .g-sheet__paper, .g-cta, .g-btn, .g-arrow { transition: none !important; }
  .g-app dialog[open], .g-app dialog[open]::backdrop { animation: none !important; }
}
@media print {
  .g-scene, .g-arrow, .g-index, .g-foot, .g-nav { display: none !important; }
}
/* Visionneuse : apparition propre (l'animation commune restait figée à 0 sous Chromium avec l'image en grand) */
.g-app .g-viewer[open] { animation: g-view-in .3s ease both; }
@keyframes g-view-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
