/* AJ Photo Archives — pages clients (galeries et Media Rooms) */
:root {
  --ink: #1c1f22;
  --paper: #e6e8e5;
  --sheet: #f4f5f3;
  --rule: #cdd1ce;
  --muted: #676e74;
  --pencil: #e03a2f;
  --accent: #1c1f22;
  --sans: "Archivo AJ", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Source Serif AJ", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ajc { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
.ajc img { user-select: none; -webkit-user-drag: none; }
.ajc a { color: inherit; }
.ajc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ajc-muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 2px; }

/* Barre ------------------------------------------------------------------ */
.ajc-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 3vw, 40px); background: rgba(230, 232, 229, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.ajc-bar__brand { font-weight: 700; font-stretch: 80%; font-size: 17px; }
.ajc-bar__brand img { max-height: 38px; max-width: 200px; display: block; }
.ajc-bar__meta { display: flex; align-items: center; gap: 16px; font-size: 13px; }

.ajc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: 600 14px/1 var(--sans); text-decoration: none; cursor: pointer; }
.ajc-btn:hover { filter: brightness(1.15); }
.ajc-btn[disabled] { opacity: .4; cursor: not-allowed; filter: none; }
.ajc-btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.ajc-btn--ghost:hover { background: var(--ink); color: #fff; filter: none; }

/* Intro ------------------------------------------------------------------ */
.ajc-main { padding: 0 clamp(16px, 3vw, 40px) 140px; max-width: 1760px; margin: 0 auto; }
.ajc-intro { padding: clamp(40px, 7vw, 96px) 0 32px; max-width: 1100px; }
.ajc-client { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.ajc-intro h1 { margin: 0; font-size: clamp(44px, 8vw, 116px); line-height: .9; font-weight: 700; font-stretch: 68%; letter-spacing: -.015em; text-wrap: balance; }
.ajc-lead { font-family: var(--serif); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; max-width: 62ch; margin-top: 22px; }
.ajc-lead p { margin: 0 0 .7em; }
.ajc-count { margin: 20px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }

.ajc-notice { background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 8px; margin: 0 0 24px; max-width: 760px; }
.ajc-tools { display: flex; justify-content: flex-end; margin: 0 0 16px; }
.ajc-search input { width: min(360px, 100%); height: 42px; border: 1px solid var(--rule); border-radius: 999px; padding: 0 16px; font: 15px var(--sans); background: var(--sheet); }
.ajc-empty { padding: 60px 0; max-width: 60ch; }
.ajc-empty h2 { font-stretch: 75%; font-size: 30px; margin: 0 0 8px; }
.ajc-noresult { color: var(--muted); }

/* Planche contact -------------------------------------------------------- */
.ajc-sheet { list-style: none; margin: 0; padding: clamp(10px, 1.5vw, 22px); background: var(--sheet); border: 1px solid var(--rule); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(14px, 2vw, 28px) clamp(10px, 1.4vw, 20px); }
.ajc-frame { position: relative; margin: 0; display: flex; flex-direction: column; }
.ajc-frame[hidden] { display: none; }
.ajc-frame__open { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; width: 100%; padding: 0; border: 0; background: #d9dcd9; cursor: zoom-in; overflow: hidden; }
.ajc-frame__open img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ajc-frame__missing { color: var(--muted); font-size: 13px; }
.ajc-frame__line { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 34px; padding-top: 6px; font-size: 13px; }
.ajc-ref { font-variant-numeric: tabular-nums; color: var(--muted); letter-spacing: .02em; margin: 0; }
.ajc-dl { display: flex; gap: 10px; }
.ajc-dl a { text-decoration: none; border-bottom: 1px solid currentColor; }
.ajc-dl a:hover { color: var(--pencil); }

.ajc-pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 2px; }
.ajc-pick input { width: 18px; height: 18px; accent-color: var(--pencil); margin: 0; cursor: pointer; }

/* Le trait de crayon gras : seule marque de couleur de la planche. */
.ajc-loop { position: absolute; inset: -12px -14px 18px; width: calc(100% + 28px); height: calc(100% - 6px); pointer-events: none; overflow: visible; }
.ajc-loop path { fill: none; stroke: var(--pencil); stroke-width: 3.2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .45s ease-out, opacity .1s; }
.ajc-frame.is-picked .ajc-loop path { stroke-dashoffset: 0; opacity: .92; }
.ajc-frame.is-picked .ajc-pick span { color: var(--pencil); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ajc-loop path { transition: none; } }

/* Tiroir de sélection ---------------------------------------------------- */
.ajc-tray { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; width: min(1100px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px 12px 20px; background: var(--ink); color: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.ajc-tray__count { font-size: 14px; white-space: nowrap; }
.ajc-tray__count strong { font-size: 22px; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.ajc-tray .ajc-muted { color: #aab0b4; }
.ajc-tray__fields { display: flex; gap: 8px; flex: 1 1 360px; }
.ajc-tray__fields input { flex: 1; min-width: 0; height: 42px; border-radius: 999px; border: 1px solid #454b51; background: #2b3035; color: #fff; padding: 0 16px; font: 14px var(--sans); }
.ajc-tray__fields input::placeholder { color: #9aa1a6; }
.ajc-tray .ajc-btn { background: #fff; color: var(--ink); border-color: #fff; margin-left: auto; }
.ajc-packs { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 360px; }
.ajc-pack { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid #454b51; border-radius: 999px; cursor: pointer; font-size: 13px; }
.ajc-pack:has(input:checked) { border-color: #fff; background: #2b3035; }
.ajc-pack input { accent-color: var(--pencil); margin: 0; }
.ajc-pack em { font-style: normal; color: #fff; }
.ajc-pack small { color: #aab0b4; }
.ajc-pack .woocommerce-Price-currencySymbol { margin-left: 1px; }
@media (max-width: 700px) { .ajc-tray { border-radius: 14px; bottom: 8px; } .ajc-tray .ajc-btn { width: 100%; } }

/* Visionneuse ------------------------------------------------------------ */
.ajc-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #151719; color: #eef0ee; }
.ajc-lightbox[open] { display: grid; grid-template-columns: 1fr 340px; }
.ajc-lightbox::backdrop { background: #151719; }
.ajc-lightbox__stage { display: flex; align-items: center; justify-content: center; padding: 56px 64px; min-height: 0; min-width: 0; overflow: hidden; }
/* L'image reste à son ratio natif (portrait ou paysage), sans étirement du thème. */
.ajc-lightbox__stage img { display: block; width: auto !important; height: auto !important; max-width: 100% !important; max-height: calc(100vh - 112px) !important; aspect-ratio: auto !important; object-fit: contain; object-position: center; }
.ajc-lightbox__side { padding: 72px 28px 28px; border-left: 1px solid #2b3035; overflow: auto; }
.ajc-lightbox__side h2 { font-size: 28px; line-height: 1.05; font-stretch: 75%; margin: 6px 0 14px; }
.ajc-lightbox__side .ajc-ref, .ajc-lightbox__side .ajc-muted { color: #9aa1a6; }
.ajc-lightbox__caption { font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.ajc-lightbox__dl { display: flex; gap: 8px; flex-wrap: wrap; }
.ajc-lightbox__dl a { color: #fff; border: 1px solid #5a6167; border-radius: 999px; padding: 8px 14px; text-decoration: none; font-size: 13px; }
.ajc-lightbox__dl a:hover { border-color: #fff; }
.ajc-lightbox .ajc-btn--ghost { color: #fff; border-color: #fff; }
.ajc-lightbox .ajc-btn--ghost.is-picked { background: var(--pencil); border-color: var(--pencil); }
.ajc-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; border: 0; background: transparent; color: #fff; font-size: 44px; cursor: pointer; opacity: .6; }
.ajc-lightbox__nav:hover { opacity: 1; }
.ajc-lightbox__nav--prev { left: 6px; }
.ajc-lightbox__nav--next { right: 346px; }
.ajc-lightbox__close { position: absolute; top: 16px; right: 20px; background: transparent; border: 1px solid #5a6167; color: #fff; border-radius: 999px; padding: 7px 14px; font: 13px var(--sans); cursor: pointer; }
@media (max-width: 900px) {
  .ajc-lightbox[open] { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .ajc-lightbox__stage { padding: 56px 8px 8px; }
  .ajc-lightbox__stage img { max-height: 60vh !important; }
  .ajc-lightbox__side { border-left: 0; border-top: 1px solid #2b3035; padding: 16px 20px 24px; max-height: 40vh; }
  .ajc-lightbox__nav--next { right: 6px; }
  .ajc-lightbox__nav { top: 32vh; }
}

/* Pied ------------------------------------------------------------------- */
.ajc-foot { padding: 28px clamp(16px, 3vw, 40px) 120px; color: var(--muted); font-size: 12px; max-width: 80ch; }

/* Portail mot de passe --------------------------------------------------- */
body.ajc--gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink); color: #fff; }
.ajc-gate { width: min(460px, 100%); }
.ajc-gate__brand { font-weight: 700; font-stretch: 80%; font-size: 17px; margin-bottom: 40px; color: #c9cdcb; }
.ajc-gate__brand img { max-height: 40px; }
.ajc-gate h1 { font-size: clamp(36px, 7vw, 56px); line-height: .95; font-stretch: 70%; margin: 0 0 16px; }
.ajc-gate p { color: #c9cdcb; font-family: var(--serif); font-size: 17px; }
.ajc-gate label { display: block; font-size: 13px; margin: 22px 0 6px; color: #c9cdcb; }
.ajc-gate input { width: 100%; height: 48px; border-radius: 10px; border: 1px solid #454b51; background: #2b3035; color: #fff; padding: 0 14px; font: 17px var(--sans); }
.ajc-gate .ajc-btn { margin-top: 12px; width: 100%; background: #fff; color: var(--ink); border-color: #fff; }
.ajc-gate .ajc-error { color: #ff8a80; font-family: var(--sans); font-size: 14px; }

/* Restrictions de diffusion */
.ajc-restrict-pill { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--pencil); color: #fff; font-size: 11px; line-height: 18px; letter-spacing: 0; }
.ajc-restrict { border-left: 3px solid var(--pencil); padding: 4px 0 4px 12px; margin: 14px 0; }
.ajc-restrict p { margin: 0 0 6px; font-size: 13px; color: #eef0ee; }
