/* Espace photographe et espace direction.
   Meme famille que les galeries des familles : papier chaud, encre profonde,
   titres en serif. L'interface s'efface derriere les photographies. */

:root {
  --bg: #f5f2ed;
  --panel: #faf8f4;
  --card: #ffffff;
  --ink: #1d1b18;
  --ink-2: #565049;
  --ink-3: #8c857c;
  --line: #e6e0d6;
  --line-2: #efeae3;
  --hover: #f8f5f0;
  --accent: #1d1b18;
  --accent-2: #36312b;
  --brand: #9a6a4e;
  --brand-soft: rgba(154, 106, 78, .14);
  --good: #2e7656;
  --good-bg: #eef6f1;
  --good-line: #cfe4d8;
  --warn: #9b5f1b;
  --warn-bg: #fbf4e8;
  --warn-line: #eedcbd;
  --bad: #a33a3a;
  --bad-bg: #fbf0ef;
  --bad-line: #efd0cd;
  --info: #3a5670;
  --info-bg: #f1f4f7;
  --info-line: #d6e0e9;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(29, 27, 24, .05), 0 10px 30px rgba(29, 27, 24, .06);
  --shadow-sm: 0 1px 2px rgba(29, 27, 24, .05);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  --sidebar: 248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration-color: rgba(29, 27, 24, .28); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.2;
  margin: 0 0 12px;
}
h1 { font-size: 31px; }
h2 { font-size: 20px; }
h3 {
  font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 10px; line-height: 1.3;
}
p { margin: 0 0 12px; }
small, .small { font-size: 13px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small.muted a, .muted a { color: var(--ink-2); }
strong { font-weight: 620; }
hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: var(--brand-soft); }

/* ---------------------------------------------------------------- menu lateral */

body:has(> .sidebar) { padding-left: var(--sidebar); }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px 16px; background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.sidebar svg {
  width: 19px; height: 19px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

.sidebar .studio {
  display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px;
  text-decoration: none; color: var(--ink);
}
.sidebar .monogramme {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--ink); color: #faf8f4;
  font-family: var(--serif); font-size: 15px; letter-spacing: .06em;
}
.sidebar .studio-texte { display: flex; flex-direction: column; min-width: 0; }
.sidebar .studio-texte strong {
  font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar .studio-texte span { font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em; }

.sidebar .nouvelle { width: 100%; margin: 0 0 14px; }
.sidebar .nouvelle.on { box-shadow: 0 0 0 3px var(--brand-soft); }

.sidebar .menu { display: flex; flex-direction: column; gap: 2px; }
.sidebar .menu a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px;
  position: relative; transition: background .12s ease, color .12s ease;
}
.sidebar .menu a:hover { background: rgba(29, 27, 24, .045); color: var(--ink); }
.sidebar .menu a.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.sidebar .menu a.on::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.sidebar .menu a.on svg { color: var(--brand); }

.sidebar .sortie {
  margin: auto 0 0; padding: 14px 8px 0; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar .compte-email {
  font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar .sortie button {
  display: flex; align-items: center; gap: 10px; padding: 7px 3px;
  background: none; border: none; font: inherit; font-size: 13.5px; color: var(--ink-2); cursor: pointer;
}
.sidebar .sortie button:hover { color: var(--bad); }

/* Sur tablette et telephone, le menu se replie en barre horizontale. */
@media (max-width: 960px) {
  body:has(> .sidebar) { padding-left: 0; }
  .sidebar {
    position: sticky; top: 0; width: auto; height: auto;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 10px 16px; border-right: none; border-bottom: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar .studio { padding: 0; flex: 0 0 auto; }
  .sidebar .monogramme { width: 34px; height: 34px; font-size: 13px; }
  .sidebar .studio-texte { display: none; }
  .sidebar .nouvelle { order: 3; width: auto; margin: 0; padding: 0 12px; }
  .sidebar .nouvelle span { display: none; }
  .sidebar .menu { flex-direction: row; gap: 2px; flex: 0 0 auto; }
  .sidebar .menu a { padding: 8px 9px; white-space: nowrap; font-size: 13.5px; }
  .sidebar .menu a.on::before { display: none; }
  .sidebar .sortie { order: 4; margin: 0; padding: 0; border: none; flex: 0 0 auto; }
  .sidebar .compte-email, .sidebar .sortie button span { display: none; }
}
@media (max-width: 640px) {
  .sidebar { gap: 4px; padding: 9px 12px; }
  .sidebar .menu a span { display: none; }
  .sidebar .nouvelle { padding: 0 11px; min-height: 36px; }
}
/* Un bouton d'en-tete qui double le menu lateral n'apparait que sur telephone. */
@media (min-width: 961px) { .seulement-mobile { display: none !important; } }

/* ---------------------------------------------------------------- barre haute (direction) */

.topbar {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  color: var(--ink); border-bottom: 1px solid var(--line);
  padding: 0 24px; position: sticky; top: 0; z-index: 40;
}
.topbar .inner {
  max-width: 1180px; margin: 0 auto; height: 62px;
  display: flex; align-items: center; gap: 18px;
}
.topbar a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.topbar a:hover, .topbar a.on { color: var(--ink); }
.topbar .brand { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.topbar .inner > span:not(.brand) { color: var(--ink-3); }
.topbar form { margin: 0 0 0 auto; }
@media (max-width: 640px) { .topbar { padding: 0 16px; } .topbar .inner { gap: 10px; } }

/* ---------------------------------------------------------------- mise en page */

.wrap { max-width: 1180px; margin: 0 auto; padding: 34px 32px 88px; }
.wrap.narrow { max-width: 640px; }
@media (max-width: 760px) { .wrap { padding: 22px 16px 72px; } h1 { font-size: 26px; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
}
.card.tight { padding: 14px 18px; }
.card > h2:first-child { margin-bottom: 16px; }
@media (max-width: 640px) { .card { padding: 18px 16px; } }

details.card > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before {
  content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s;
}
details.card[open] > summary::before { transform: rotate(45deg); }
details > summary { cursor: pointer; }

/* Grille de champs : les colonnes gardent la meme largeur d'une ligne a
   l'autre, un champ seul en fin de ligne ne s'etire plus sur toute la carte. */
.row { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.row > .col { min-width: 0; }
.row > .card { margin-bottom: 18px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* En-tete de page : titre, sous-titre et actions sur une meme ligne. */
.wrap > .between:first-child { margin-bottom: 26px !important; align-items: flex-end; }
.wrap > .between:first-child h1 { margin-bottom: 6px; }
.wrap > .between:first-child p.muted { max-width: 640px; }

.section-title {
  margin: 28px 0 12px; font-size: 12px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); font-family: var(--sans);
}

/* ---------------------------------------------------------------- formulaires */

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url],
input[type=tel], input[type=date], input[type=datetime-local], input[type=color], input[type=search],
select, textarea {
  width: 100%; padding: 9px 12px; min-height: 40px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 14.5px; background: #fff; color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { line-height: 1.5; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input:hover, select:hover, textarea:hover { border-color: #d6cec2; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
input[readonly] { background: var(--hover); color: var(--ink-2); }
input[type=color] { padding: 4px; height: 40px; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 16px; height: 16px; }
input[type=file] { font: inherit; font-size: 13.5px; }
input[type=file]::file-selector-button {
  font: inherit; font-size: 13px; font-weight: 600; margin-right: 12px; padding: 7px 13px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
::placeholder { color: #b0a89d; }

.field { margin: 0 0 16px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; font-weight: 400; line-height: 1.45; }
.check { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 10px; }
.check input { margin-top: 2px; flex: 0 0 auto; }
.check label { margin: 0; font-weight: 500; color: var(--ink); }

/* ---------------------------------------------------------------- boutons */

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  min-height: 40px; padding: 8px 17px; border-radius: var(--radius-sm);
  border: 1px solid var(--accent); background: var(--accent); color: #faf8f4;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .005em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft), 0 0 0 1px var(--brand); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); font-weight: 550; }
.btn.ghost:hover { background: var(--hover); border-color: #d3cabd; }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-bg); border-color: #e3b9b5; }
.btn.small { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled], .btn:disabled { opacity: .45; pointer-events: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
form { margin: 0; }

/* ---------------------------------------------------------------- etiquettes */

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 560; line-height: 1.4;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--panel);
  white-space: nowrap; vertical-align: middle;
}
.tag.on, .tag.off, .tag.warn, .tag.bad { padding-left: 9px; }
.tag.on::before, .tag.off::before, .tag.warn::before, .tag.bad::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto;
}
.tag.on { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.tag.off { color: var(--ink-3); }
.tag.off::before { background: #c4bcb1; }
.tag.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.tag.bad { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }

/* ---------------------------------------------------------------- tableaux */

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--line-2);
  font-size: 14px; vertical-align: middle;
}
th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
  font-weight: 650; padding-top: 4px; padding-bottom: 10px; border-bottom-color: var(--line);
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
table tr:not(:first-child) td { transition: background .1s ease; }
table tr:not(:first-child):hover td { background: var(--hover); }
td:first-child, th:first-child { padding-left: 4px; }
td:last-child, th:last-child { padding-right: 4px; }
td a strong { font-weight: 600; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- messages */

.notice {
  position: relative; padding: 12px 16px 12px 18px; border-radius: var(--radius-sm);
  margin: 0 0 18px; font-size: 14px; line-height: 1.5;
  border: 1px solid; overflow: hidden;
}
.notice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: currentColor; opacity: .55; }
.notice.ok { background: var(--good-bg); border-color: var(--good-line); color: #22573f; }
.notice.info { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); color: #77471a; }
.notice.bad { background: var(--bad-bg); border-color: var(--bad-line); color: #7f2b2b; }
.notice a { color: inherit; }

/* ---------------------------------------------------------------- onglets */

.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 22px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: none; background: none; font: inherit; font-size: 14px; font-weight: 550; color: var(--ink-3);
  padding: 11px 14px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: color .12s ease, border-color .12s ease;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.panel { display: none; }
.panel.on { display: block; animation: apparition .18s ease; }
@keyframes apparition { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .panel.on { animation: none; } }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }

code, .mono { font-family: var(--mono); font-size: 12.5px; }
td.mono { letter-spacing: .03em; }
.copyline { display: flex; gap: 8px; align-items: center; }
.copyline input { font-family: var(--mono); font-size: 12.5px; flex: 1 1 auto; min-width: 180px; min-height: 34px; padding: 6px 10px; }
@media (max-width: 760px) { .copyline { flex-wrap: wrap; } .copyline input { min-width: 0; } }

/* ---------------------------------------------------------------- photos dans la fiche galerie */

.grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.cell { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden; background: #ece7df; }
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.cell.ouvrable { cursor: zoom-in; }
.cell.ouvrable:hover img { transform: scale(1.03); }
.cell.ouvrable:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cell .state {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink-3); background: #f0ebe4; text-align: center; padding: 8px;
}
.cell .name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 7px;
  font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell .pin { position: absolute; top: 7px; right: 7px; display: flex; gap: 4px; }
.cell .pin .tag { background: rgba(255, 255, 255, .94); }

.dropzone {
  border: 1.5px dashed #d2c9bc; border-radius: var(--radius); padding: 38px 20px;
  text-align: center; color: var(--ink-2); background: var(--panel); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone strong { font-family: var(--serif); font-weight: 400; font-size: 19px; color: var(--ink); }
.dropzone:hover { border-color: #b9ad9d; }
.dropzone.hot { border-color: var(--brand); background: #fbf6f1; color: var(--ink); }
.progress { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }

/* ---------------------------------------------------------------- galerie cliente (ancienne mise en page) */

.client-head { background: #fff; border-bottom: 1px solid var(--line); }
.client-head .inner { max-width: 1240px; margin: 0 auto; padding: 22px 20px; }
.client-head h1 { margin: 0 0 4px; font-size: 24px; }
.client-wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 120px; }

.bar {
  position: sticky; bottom: 0; z-index: 30; background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(29, 27, 24, .07);
}
.bar .inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.bar .count { font-weight: 700; font-size: 16px; }
.bar .count em { font-style: normal; color: var(--ink-3); font-weight: 500; }
.bar .spacer { margin-left: auto; }

.photos {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
@media (max-width: 560px) { .photos { grid-template-columns: repeat(2, 1fr); gap: 6px; } }

.shot { position: relative; aspect-ratio: 3 / 2; background: #ece7df; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; transition: transform .35s ease; }
.shot:hover img { transform: scale(1.03); }
button.shot { padding: 0; border: none; font: inherit; width: 100%; }
.shot .fav {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .9); cursor: pointer; display: grid; place-items: center;
  font-size: 16px; line-height: 1; color: #8b96a1; padding: 0;
}
.shot .fav.on { background: #fff; color: #c8324b; }
.shot.chosen { outline: 3px solid var(--accent); outline-offset: -3px; }
.shot .num {
  position: absolute; left: 8px; top: 8px; background: rgba(29, 27, 24, .7); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
}

/* ---------------------------------------------------------------- visionneuse (photographe et direction) */

.viewer {
  position: fixed; inset: 0; background: rgba(14, 13, 12, .97); z-index: 100;
  display: none; align-items: center; justify-content: center; flex-direction: column;
  overflow: auto;
}
.viewer.on { display: flex; }
.viewer img { max-width: 94vw; max-height: 82vh; object-fit: contain; -webkit-user-drag: none; cursor: zoom-in; }
.viewer.zoom { align-items: flex-start; }
.viewer.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
.viewer .vbar {
  position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 14px;
  color: #fff; flex-wrap: wrap; justify-content: center;
}
.viewer .vbar button, .viewer .vbar a {
  background: rgba(255, 255, 255, .12); color: #fff; border: none; border-radius: 9px;
  padding: 9px 14px; font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none;
}
.viewer .vbar button:hover { background: rgba(255, 255, 255, .22); }
.viewer .vbar button.on { background: #fff; color: var(--ink); font-weight: 600; }
.viewer .close { position: absolute; top: 14px; right: 18px; font-size: 28px; background: none; border: none; color: #fff; cursor: pointer; z-index: 2; }
.viewer textarea { width: min(460px, 86vw); height: 60px; border-radius: 9px; border: none; padding: 8px 10px; font: inherit; }

.protected img { pointer-events: none; }

.footer-note { max-width: 1240px; margin: 0 auto; padding: 28px 20px 60px; color: var(--ink-3); font-size: 13px; }

/* Cellule d'actions d'un tableau : les boutons passent a la ligne plutot que
   de pousser le tableau hors de l'ecran. */
.cellule-actions {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end;
}
.cellule-actions select { width: auto; min-width: 128px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }

/* Sur petit ecran, un tableau large defile a l'interieur de sa carte plutot
   que de pousser toute la page vers la droite. */
@media (max-width: 1100px) {
  .card table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card table > tbody { display: table; width: 100%; }
}

/* ---------------------------------------------------------------- vitrine : galeries et etablissements en tuiles
   Chaque galerie se montre avec sa couverture ; un etablissement se montre
   comme un dossier qu'on ouvre pour voir les galeries qu'il contient. */

.vitrine {
  display: grid; gap: 20px; margin: 0 0 22px;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
}
@media (max-width: 560px) { .vitrine { grid-template-columns: 1fr 1fr; gap: 12px; } }
.tuile {
  display: block; text-decoration: none; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.tuile:hover, .tuile:focus-visible { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #d9d0c3; outline: none; }
.tuile .image { position: relative; aspect-ratio: 4 / 3; background: #ece7df; display: block; overflow: hidden; }
.tuile .image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.tuile:hover .image img { transform: scale(1.035); }
.tuile .image.mosaique {
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px;
}
.tuile .vide {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-3); font-size: 13px; background: repeating-linear-gradient(135deg, #f1ece5 0 10px, #ede7df 10px 20px);
}
.tuile .compte {
  position: absolute; right: 10px; bottom: 10px; background: rgba(29, 27, 24, .74);
  color: #fff; font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.tuile .dossier {
  position: absolute; left: 10px; top: 10px; background: rgba(255, 255, 255, .94);
  color: var(--ink); font-size: 10.5px; font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 999px;
}
.tuile .corps { padding: 14px 16px 16px; }
.tuile .corps strong {
  display: block; font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.25; margin-bottom: 3px;
}
.tuile .etiquettes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
@media (max-width: 560px) {
  .tuile .corps { padding: 10px 11px 12px; }
  .tuile .corps strong { font-size: 15.5px; }
  .tuile .etiquettes { display: none; }
}

/* Vignette de couverture dans un tableau de galeries. */
.vign {
  width: 64px; height: 50px; object-fit: cover; border-radius: 8px;
  background: #ece7df; display: block; flex: 0 0 auto;
}
.ligne-galerie { display: flex; gap: 12px; align-items: center; }
.ligne-galerie .vide {
  width: 64px; height: 50px; border-radius: 8px; flex: 0 0 auto;
  background: repeating-linear-gradient(135deg, #f1ece5 0 8px, #ede7df 8px 16px);
}

/* ---------------------------------------------------------------- connexion et inscription */

.acces {
  min-height: 100vh; display: grid; place-items: center; padding: 40px 16px;
  background:
    radial-gradient(1200px 600px at 10% -10%, #ece4d8 0, transparent 60%),
    radial-gradient(900px 500px at 110% 110%, #efe6da 0, transparent 55%),
    var(--bg);
}
.acces .boite { width: 100%; max-width: 420px; }
.acces .marque { display: flex; align-items: center; gap: 12px; margin: 0 0 26px; justify-content: center; }
.acces .marque .monogramme {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #faf8f4;
}
.acces .marque .monogramme svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.acces .marque span { font-family: var(--serif); font-size: 22px; }
.acces h1 { text-align: center; font-size: 28px; margin-bottom: 6px; }
.acces .sous-titre { text-align: center; color: var(--ink-3); margin-bottom: 24px; }
.acces .card { padding: 26px 26px 24px; box-shadow: var(--shadow); }
.acces .btn { width: 100%; min-height: 44px; margin-top: 4px; }
.acces .pied { text-align: center; margin-top: 18px; }

/* ---------------------------------------------------------------- fiches etablissement et galerie */

/* Indication sous l'intitule d'une case a cocher. */
.check label .hint { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; }

/* Les onglets restent visibles quand on descend dans un long reglage. */
.tabs {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
}
@media (max-width: 960px) { .tabs { top: 55px; } }
.tabs button .nb {
  display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 5px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-3); font-size: 11.5px; font-weight: 650; text-align: center;
}
.tabs button.on .nb { background: var(--ink); color: #faf8f4; }
.tabs .etat-point { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 6px; vertical-align: 1px; background: #c4bcb1; }
.tabs .etat-point.on { background: var(--good); }
.tabs .etat-point.bad { background: var(--bad); }

/* Barre d'enregistrement : toujours a portee de main en bas de l'ecran. */
.barre-enregistrer {
  position: sticky; bottom: 0; z-index: 15; margin: 6px 0 0; padding: 12px 16px;
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -6px 24px rgba(29, 27, 24, .07);
}
.barre-enregistrer .small { flex: 1 1 260px; }

/* Apercu du filigrane : assez grand pour juger, sans manger la page. */
#wmPreview { max-width: min(640px, 100%); height: auto; border-radius: var(--radius-sm); }

/* QR code affiche directement dans l'onglet. */
.qr-apercu {
  display: block; width: 148px; height: 148px; margin: 4px 0 16px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); image-rendering: pixelated;
}

/* Apercu du message de partage, mis a jour pendant la frappe. */
.apercu-message { margin: 0 0 18px; padding: 16px 18px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.apercu-message pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 14px; color: var(--ink-2); }

/* ---------------------------------------------------------------- page de connexion Galerya
   A gauche la vitrine de la marque sur fond d'encre, a droite le formulaire. */
.entree { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--bg); }
.entree-vitrine {
  position: relative; overflow: hidden; color: #f3eee6;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 60px 0;
  background:
    radial-gradient(70% 60% at 0% 0%, rgba(154, 106, 78, .38), transparent 60%),
    radial-gradient(60% 50% at 100% 100%, rgba(154, 106, 78, .22), transparent 60%),
    #1d1b18;
}
.entree-marque {
  display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none;
  font-family: var(--serif); font-size: 23px; letter-spacing: .01em;
}
.entree-marque .monogramme {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(243, 238, 230, .35); color: #e7c9a9;
}
.entree-marque .monogramme svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.entree-marque.mobile { display: none; }
.entree-titre { max-width: 520px; }
.entree-titre h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.06; color: #faf8f4; margin: 0 0 20px; }
.entree-titre h1 em { color: #e7c9a9; }
.entree-titre > p { color: rgba(243, 238, 230, .72); font-size: 16px; line-height: 1.6; margin: 0 0 28px; }
.entree-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.entree-points li { display: flex; gap: 14px; align-items: flex-start; color: rgba(243, 238, 230, .74); font-size: 14.5px; line-height: 1.5; }
.entree-points strong { color: #faf8f4; font-weight: 600; }
.entree-points svg {
  flex: 0 0 auto; width: 36px; height: 36px; padding: 8px; border-radius: 10px;
  background: rgba(243, 238, 230, .07); border: 1px solid rgba(243, 238, 230, .12);
  fill: none; stroke: #e7c9a9; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Des tirages poses sur la table : uniquement decoratif, sans photo d'enfant. */
.entree-mosaique { position: relative; height: 190px; margin: 0 -20px; }
.entree-mosaique span {
  position: absolute; bottom: -34px; width: 150px; aspect-ratio: 4 / 5; border-radius: 4px;
  border: 8px solid #f6f1e9; box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  animation: poser .9s cubic-bezier(.2, .7, .2, 1) both;
}
.entree-mosaique span:nth-child(1) { left: 2%;  transform: rotate(-9deg); background: linear-gradient(160deg, #d9b99b, #a7745a); animation-delay: .05s; }
.entree-mosaique span:nth-child(2) { left: 20%; bottom: -10px; transform: rotate(4deg); background: linear-gradient(160deg, #c9d2c0, #7f9277); animation-delay: .12s; }
.entree-mosaique span:nth-child(3) { left: 40%; bottom: -40px; transform: rotate(-3deg); background: linear-gradient(160deg, #ecd8c7, #c39b84); animation-delay: .19s; }
.entree-mosaique span:nth-child(4) { left: 60%; bottom: -14px; transform: rotate(7deg); background: linear-gradient(160deg, #d6cfe0, #9c90ad); animation-delay: .26s; }
.entree-mosaique span:nth-child(5) { left: 79%; bottom: -46px; transform: rotate(-6deg); background: linear-gradient(160deg, #f0e2c6, #c9a96b); animation-delay: .33s; }
@keyframes poser { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .entree-mosaique span { animation: none; } }

.entree-formulaire { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px 24px; }
.entree-boite { width: 100%; max-width: 390px; margin: auto 0; }
.entree-boite h2 { font-size: 32px; margin: 0 0 6px; }
.entree-sous { margin: 0 0 28px; }
.entree-boite input[type=email], .entree-boite input[type=password], .entree-boite input[type=text] { min-height: 46px; font-size: 15px; }
.mdp { position: relative; }
.mdp input { padding-right: 92px; }
.mdp-voir {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.mdp-voir:hover { background: var(--hover); color: var(--ink); }
.mdp-maj { margin: 6px 0 0; font-size: 12.5px; color: var(--warn); }
.entree-bouton { width: 100%; min-height: 48px; font-size: 15px; margin-top: 6px; }
.entree-aide { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.entree-aide p { margin: 0 0 8px; line-height: 1.5; }
.entree-pied { margin: 28px 0 0; }

@media (max-width: 900px) {
  .entree { grid-template-columns: 1fr; }
  .entree-vitrine { display: none; }
  .entree-marque.mobile { display: inline-flex; color: var(--ink); margin: 0 0 34px; }
  .entree-marque.mobile .monogramme { border-color: var(--line); color: var(--brand); background: #fff; }
  .entree-formulaire { padding: 40px 20px 20px; justify-content: flex-start; }
  .entree-boite { margin: 0; }
  .entree-boite h2 { font-size: 28px; }
}
