/* cmsms stylesheet: qr_musee_mobile modified: mardi 20 janvier 2026 15:38:42 */
/* =========================================================
   QR Musée – CSS mobile-first sobre (CMSMS)
   Compatible light/dark (prefers-color-scheme)
   ========================================================= */

/* ---- Base reset minimal ---- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

/* ---- Variables (sans couleurs imposées : neutres) ---- */
:root{
  --wrap: 46rem;
  --pad: 1rem;

  --bg: #ffffff;
  --fg: #111111;
  --muted: #666666;

  --card: #f6f6f6;
  --border: #d9d9d9;

  --shadow: 0 6px 18px rgba(0,0,0,.06);
  --radius: 16px;

  --focus: #111111;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b0c0f;
    --fg: #f1f1f1;
    --muted: #b8b8b8;

    --card: #14161c;
    --border: #2a2f3a;

    --shadow: 0 10px 26px rgba(0,0,0,.35);
    --focus: #f1f1f1;
  }
}

.qr-page{
  background: var(--bg);
  color: var(--fg);
}

/* ---- Wrap / layout ---- */
.qr-wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.qr-main{
  padding: 1rem 0 2rem;
}

.qr-article{
  padding: 1rem 0 2rem;
}

/* ---- Skip link ---- */
.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  padding: .6rem .8rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: .6rem;
  z-index: 9999;
}
.skip-link:focus{
  left: 1rem;
  top: 1rem;
}

/* ---- Focus visible ---- */
a, summary, button, input, select, textarea{
  outline: none;
}
a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: .4rem;
}

/* ---- Header ---- */
.qr-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.1) blur(8px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

@supports not (backdrop-filter: blur(8px)){
  .qr-header{ background: var(--bg); }
}

.qr-header .qr-wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.qr-site{
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 1rem;
  white-space: nowrap;
}

/* ---- Lang selector ---- */
.qr-lang{
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qr-lang .lang{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  padding: .38rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--fg);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  font-size: .9rem;
  line-height: 1;
}

.qr-lang .lang:hover{
  border-color: color-mix(in srgb, var(--fg) 22%, var(--border));
}

.qr-lang .lang.active{
  font-weight: 750;
  border-color: color-mix(in srgb, var(--fg) 40%, var(--border));
  background: color-mix(in srgb, var(--fg) 10%, var(--card));
}

/* ---- Head ---- */
.qr-article-head{
  padding-top: .25rem;
  padding-bottom: .75rem;
}

.qr-title{
  font-size: 1.6rem;
  line-height: 1.15;
  margin: .6rem 0 2.4rem;
}

.qr-ref{
  margin: 0 0 .5rem;
  color: var(--muted);
  font-size: .95rem;
}

.qr-meta{
  margin: .25rem 0;
  color: var(--fg);
}

.qr-meta strong{
  font-weight: 650;
}

/* ---- Figure ---- */
.qr-figure{
  margin: 1rem 0 1.25rem;
  padding: .75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.qr-figure img{
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 6px);
}

.qr-caption{
  margin-top: .6rem;
  color: var(--muted);
  font-size: .95rem;
}

/* ---- Content text ---- */
.qr-content{
  margin-top: .75rem;
}

.qr-content p,
.qr-aside p{
  margin: .6rem 0;
}

.qr-content a,
.qr-aside a{
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.qr-content ul,
.qr-content ol,
.qr-aside ul,
.qr-aside ol{
  padding-left: 1.25rem;
  margin: .6rem 0;
}

.qr-content li,
.qr-aside li{
  margin: .25rem 0;
}

/* ---- Aside cards ---- */
.qr-aside{
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.qr-h2,
.qr-aside h2{
  margin: 0 0 .5rem;
  font-size: 1.1rem;
  line-height: 1.25;
}

/* ---- Details ---- */
.qr-details,
details{
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: clip;
}

details > summary{
  cursor: pointer;
  list-style: none;
  padding: .9rem 1rem;
  font-weight: 650;
  user-select: none;
}

details > summary::-webkit-details-marker{ display: none; }

details > summary::after{
  content: "▾";
  float: right;
  opacity: .75;
}

details[open] > summary::after{
  content: "▴";
}

.qr-details-body,
details > *:not(summary){
  padding: 0 1rem 1rem;
}

/* ---- Audio ---- */
audio{
  width: 100%;
  max-width: 100%;
}

/* ---- Footer ---- */
.qr-footer{
  border-top: 1px solid var(--border);
  padding: 1rem 0 2rem;
  color: var(--muted);
}

.qr-footnote{
  margin: 0;
  font-size: .95rem;
}

/* ---- Tables (si contenu WYSIWYG) ---- */
table{
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: .95rem;
}

th, td{
  border: 1px solid var(--border);
  padding: .55rem .6rem;
  vertical-align: top;
}

th{
  background: color-mix(in srgb, var(--card) 80%, transparent);
  font-weight: 650;
}

/* ---- Small screens tweaks ---- */
@media (max-width: 360px){
  .qr-title{ font-size: 1.4rem; }
  .qr-lang .lang{ min-width: 2.4rem; padding: .34rem .55rem; }
}

/* ---- Slightly larger screens ---- */
@media (min-width: 768px){
  :root{ --pad: 1.25rem; }
  .qr-title{ font-size: 1.9rem; }
  .qr-aside{ padding: 1.1rem 1.15rem; }
}
