:root {
  --bg: #120c07;
  --panel: rgba(34, 22, 13, 0.74);
  --panel-strong: rgba(20, 13, 8, 0.86);
  --line: rgba(238, 183, 98, 0.34);
  --text: #f5e4c5;
  --muted: #d5b98d;
  --gold: #e8aa48;
  --ember: #a64e22;
  --shadow: rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  background: #090604;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.site-background,
.site-background picture,
.site-background img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
.site-background { z-index: -3; background: #090604; }
.site-background picture { display: block; }
.site-background img {
  max-width: none;
  object-fit: cover;
  object-position: center center;
}
.background-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,.12) 35%, rgba(0,0,0,.42) 100%),
    radial-gradient(circle at 50% 8%, rgba(0,0,0,.14), transparent 22%);
}
body.home-page .background-shade { background: transparent; }
.smoke-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.030), transparent),
    radial-gradient(circle at 30% 15%, rgba(255,255,255,.045), transparent 18%);
  mix-blend-mode: screen;
  opacity: .62;
}
body.home-page .smoke-layer { display: none; }

/* V0G4 : bandeau fixe avec la même image que le haut du fond.
   Les pages peuvent défiler derrière ce bandeau sans passer visuellement sous les icônes. */
.menu-image-band {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(132px, 15vh, 166px);
  z-index: 24;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.18) 55%, rgba(0,0,0,.62)),
    url('../img/hero/accueil-desktop.jpg');
  background-size: cover;
  background-position: center top;
  border-bottom: 1px solid rgba(238,183,98,.32);
  box-shadow: 0 12px 34px rgba(0,0,0,.52);
}
.menu-image-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 28px;
  background: linear-gradient(180deg, rgba(0,0,0,.36), transparent);
}

/* V0F : icônes agrandies pour rendre le bandeau texte lisible */
.global-icon-menu {
  position: fixed;
  top: clamp(12px, 2vh, 22px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(96vw, 1040px);
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
  align-items: start;
  justify-items: center;
  pointer-events: auto;
}
.global-icon-link {
  display: block;
  width: min(118px, 100%);
  text-decoration: none;
  border-radius: 999px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.62));
  transition: transform .16s ease, filter .16s ease;
}
.global-icon-link:hover,
.global-icon-link:focus-visible {
  transform: translateY(3px) scale(1.04);
  filter: drop-shadow(0 10px 18px rgba(233, 152, 56, .38));
  outline: none;
}
.global-icon-link img {
  width: 100%;
  height: auto;
  margin: 0;
}

.content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(188px, 22vh, 230px) 0 44px;
}
.content.home-content {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}
.home-blank {
  min-height: 100dvh;
}

h1, h2 { margin: 0 0 12px; line-height: 1.08; }
h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #ffedc4;
  text-shadow: 0 4px 20px rgba(0,0,0,.75);
}
h2 { font-size: clamp(1.35rem, 3vw, 2rem); color: #ffd28a; }

/* V0G2 : titres de panneaux moins imposants sur les pages internes */
.page-title-panel h1,
.login-panel h1,
.info-card h1,
.print-header h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.65rem);
  letter-spacing: .02em;
  line-height: 1.12;
}
.page-title-panel h2,
.info-card h2,
.result-block h2,
.participant-box h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
}
p { line-height: 1.62; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 900;
  font-size: .82rem;
}

.page-title-panel, .login-panel, .info-card {
  margin-top: 22px;
  padding: clamp(18px, 3vw, 30px);
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0,0,0,.30);
  backdrop-filter: blur(6px);
}
.page-title-panel, .login-panel { background: var(--panel-strong); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.info-card { margin-top: 0; }
.info-card.wide { grid-column: 1 / -1; }
.button-link, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 214, 143, .45);
  background: linear-gradient(180deg, #9b4b21, #5d2a13);
  color: #fff0c8;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 10px 20px rgba(0,0,0,.24);
}
.button-link.muted {
  background: rgba(255,255,255,.07);
  color: var(--muted);
}
.return-row { margin-top: 18px; }

.photo-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1fr;
  gap: 18px;
  margin-top: 20px;
}
.photo-placeholder {
  min-height: 360px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 40%, rgba(236, 164, 70, .20), transparent 45%),
    linear-gradient(145deg, rgba(0,0,0,.58), rgba(70,35,15,.47));
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  backdrop-filter: blur(4px);
}

.form-card {
  display: grid;
  gap: 10px;
  max-width: 420px;
}
label { color: #ffd28a; font-weight: 900; }
input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.42);
  color: var(--text);
  font: inherit;
}
.small-note { color: var(--muted); font-size: .95rem; }
.flash-stack { display: grid; gap: 8px; margin: 0 0 16px; }
.flash {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.45);
}
.flash-error { border-color: rgba(255, 102, 76, .55); }
.flash-success { border-color: rgba(152, 222, 127, .55); }

.admin-panels { display: grid; gap: 18px; margin-top: 18px; }
.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.26);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid rgba(238,183,98,.18); text-align: left; }
th { color: #ffd28a; }
.log-list { padding-left: 18px; }

.footer {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 18px;
  padding: 14px 18px 18px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(238,183,98,.18);
  border-radius: 18px;
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(4px);
}
.footer-version { opacity: .75; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.password-form { max-width: 560px; }

@media (max-width: 980px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .photo-detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-image-band {
    height: clamp(196px, 23vh, 232px);
    background-image:
      linear-gradient(180deg, rgba(0,0,0,.44), rgba(0,0,0,.20) 55%, rgba(0,0,0,.66)),
      url('../img/hero/accueil-mobile.jpg');
    background-position: center top;
  }
  .global-icon-menu {
    width: min(96vw, 520px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 12px;
  }
  .global-icon-link { width: min(98px, 100%); }
  .content { padding-top: clamp(254px, 29vh, 286px); }
  .content.home-content { padding: 0; }
  .site-background img { object-position: center center; }
}
@media (max-width: 620px) {
  .content { width: min(100% - 18px, 1180px); }
  h1 { font-size: clamp(2rem, 12vw, 3.5rem); }
  .card-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
@media (max-width: 420px) {
  .global-icon-menu {
    top: 8px;
    width: min(98vw, 420px);
  }
  .global-icon-link { width: min(88px, 100%); }
}

/* V0G : sondages administrables */
/* V0G3 : questions du sondage détachées des bordures */
textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.42);
  color: var(--text);
  font: inherit;
}
select option { color: #1b120b; }
.survey-form,
.admin-form {
  display: grid;
  gap: 22px;
}
.survey-question {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 3.2vw, 34px);
  background: rgba(20, 13, 8, .80);
  box-shadow: 0 18px 45px rgba(0,0,0,.30);
  backdrop-filter: blur(6px);
  margin: 0;
  overflow: visible;
}
.survey-question-heading {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  width: 100%;
  color: #ffedc4;
  font-weight: 900;
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  line-height: 1.32;
  padding: 0 0 18px;
  margin: 0 0 14px;
  border-bottom: 1px solid rgba(238,183,98,.18);
}
.survey-question-heading .question-text {
  min-width: 0;
  padding-top: 4px;
}
.survey-question-heading em {
  align-self: start;
  margin-top: 4px;
  font-style: normal;
  font-size: .75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}
.question-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #2b1608;
  background: #e8aa48;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.choice-list {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}
.choice-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-height: 50px;
  padding: 14px 16px;
  border: 1px solid rgba(238,183,98,.22);
  border-radius: 16px;
  background: rgba(0,0,0,.24);
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}
.choice-item input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  margin: 1px 0 0;
  accent-color: #e8aa48;
}
.choice-item span {
  display: block;
  min-width: 0;
}
.inline-choice-list { margin: 0; }
.other-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.form-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.section-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.action-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 214, 143, .35);
  background: rgba(0,0,0,.24);
  color: #ffedc4;
  border-radius: 999px;
  padding: 7px 10px;
  text-decoration: none;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 900;
  cursor: pointer;
}
.mini-link.danger { border-color: rgba(255, 102, 76, .55); color: #ffd0c8; }
.inline-form { display: inline; margin: 0; }
.status-pill.ok { color: #d7ffd0; border-color: rgba(152, 222, 127, .55); }
.printable-report {
  display: grid;
  gap: 18px;
}
.print-header,
.result-block {
  padding: clamp(18px, 3vw, 28px);
  border-radius: 24px;
  background: rgba(20, 13, 8, .84);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0,0,0,.30);
  backdrop-filter: blur(6px);
}
.result-table td:nth-child(2),
.result-table td:nth-child(3),
.result-table th:nth-child(2),
.result-table th:nth-child(3) { text-align: right; }
.other-details { margin-top: 12px; color: var(--muted); }
.result-text-list { padding-left: 20px; }
.no-print-soft { opacity: .96; }

@media (max-width: 760px) {
  .form-grid-two { grid-template-columns: 1fr; }
  .action-cell { display: grid; }
  .mini-link { width: 100%; }
  .survey-question-heading {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    font-size: 1rem;
    padding-bottom: 16px;
  }
  .survey-question-heading em {
    grid-column: 2;
    width: fit-content;
    margin-top: 0;
  }
  .choice-item {
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 13px 14px;
  }
}

@media print {
  @page { margin: 1.2cm; }
  body {
    background: #fff !important;
    color: #111 !important;
    font-family: Arial, sans-serif !important;
  }
  .global-icon-menu,
  .site-background,
  .background-shade,
  .smoke-layer,
  .footer,
  .no-print,
  .flash-stack { display: none !important; }
  .content {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .print-header,
  .result-block,
  .page-title-panel,
  .info-card {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  h1, h2, .eyebrow, th, .small-note { color: #111 !important; text-shadow: none !important; }
  table { color: #111 !important; }
  th, td { border-bottom: 1px solid #bbb !important; }
  details > summary { color: #111 !important; }
}
