.qr-activite-page {
  color: var(--c-dark);
  background: linear-gradient(180deg, #ffffff 0%, #f5fcff 55%, #eefcff 100%);
}

.qr-generator-hero {
  position: relative;
}

.qr-generator-hero .noise-canvas {
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.qr-generator-hero .qr-page-shell {
  position: relative;
  z-index: 1;
}

.qr-page-shell {
  margin: 0 auto;
  padding: 38px 32px 64px;
  max-width: 1280px;
}

.qr-activite-page h1 {
  font-size: 2.1rem;
  margin: 0 0 24px;
  font-weight: 700;
  color: var(--link-color);
  text-align: center;
}

.main-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
  margin-top: 24px;
  margin-bottom: 40px;
}

.qr-generator-layout {
  position: relative;
}

.qr-generator-layout .main-layout {
  position: relative;
  z-index: 2;
}

.qr-floating-illustration {
  position: absolute;
  z-index: 1;
  width: clamp(96px, 8vw, 132px);
  height: auto;
  pointer-events: none;
  user-select: none;
}

.qr-floating-illustration--left {
  top: 42%;
  left: -100px;
  transform: translate(calc(-100% - 46px), -50%) rotate(-8deg);
}

.qr-floating-illustration--right {
  top: 72%;
  right: -100px;
  transform: translate(calc(100% + 42px), -50%) rotate(8deg);
}

.qr-examples {
  position: relative;
  --padd-vert: 150px;
  --vert-offset: 118px;
  padding-top: var(--padd-vert);
  padding-bottom: calc(var(--padd-vert) + var(--vert-offset));
  background: var(--c-silver);
}

.qr-examples>.section-offset-cards__title,
.qr-examples>.qr-examples__grid {
  position: relative;
  z-index: 2;
}

.qr-examples>.section-offset-cards__title {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  margin-top: 0;
  margin-bottom: 48px;
  max-width: 670px;
  padding-right: 15px;
  padding-left: 15px;
  text-align: center;
}

.qr-examples>.section-offset-cards__title h3 {
  display: inline-block;
  position: relative;
  font-size: clamp(34px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.qr-examples>.section-offset-cards__title h3 svg {
  --offset: 30px;
  position: absolute;
  bottom: -3px;
  left: calc(var(--offset) * -1);
  width: calc(100% + var(--offset) * 2);
  height: 16px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease-in-out;
}

.qr-examples>.section-offset-cards__title h3.is-highlight-visible svg,
.qr-examples>.section-offset-cards__title h3.inView svg {
  transform: scaleX(1);
}

.qr-examples__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}

.qr-examples .section-wave {
  position: absolute;
  left: 0;
  top: calc(100% - 2.5vw);
  min-width: 100%;
  height: auto;
  z-index: 3;
}

.qr-examples .shapes-wrap {
  --svg-l-width: 285px;
  --svg-l-height: calc(var(--svg-l-width) * 1.59);
  --svg-r-width: 350px;
  --svg-r-height: calc(var(--svg-r-width) * 1.3);
  --top-l: -80px;
  --top-r: auto;
  position: absolute;
  top: var(--top-l);
  left: 0;
  width: var(--svg-l-width);
  height: var(--svg-l-height);
  z-index: 1;
}

.qr-examples .shapes-wrap svg {
  width: 100%;
  height: 100%;
}

.qr-examples .shapes-wrap--right {
  top: var(--top-r);
  left: auto;
  right: 0;
  bottom: -5%;
  width: var(--svg-r-width);
  height: var(--svg-r-height);
}

.qr-examples .offset-card {
  --card-top-pad: 28px;
  width: 100%;
  height: auto;
  min-height: auto;
  margin: 0;
  padding: var(--card-top-pad) 28px 30px;
  display: flex;
  flex-direction: column;
  transform: none;
}

.qr-examples .offset-card::before {
  display: none;
}

.qr-examples .offset-card:nth-of-type(1),
.qr-examples .offset-card:nth-of-type(2),
.qr-examples .offset-card:nth-of-type(even),
.qr-examples .offset-card:not(:nth-of-type(4)) {
  margin: 0;
  transform: none;
}

.qr-examples .offset-card h3 {
  font-size: 28px;
  margin: 0 0 10px;
}

.qr-examples .offset-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.qr-examples .qr-example-qr {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 14px;
}

.qr-examples .qr-example-qr img {
  display: block;
  width: 136px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.qr-examples .qr-example-card {
  border-color: var(--card-accent);
}

.qr-examples .qr-example-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 0 var(--card-top-pad);
  color: var(--card-accent);
}

.qr-examples .qr-example-icon svg {
  width: 42px;
  height: 42px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qr-examples .offset-card h3.ivtr,
.qr-examples .offset-card p.ivtr {
  opacity: 1 !important;
  transform: none !important;
}

.qr-examples .offset-card .main-svg {
  bottom: -12px;
}

.qr-examples .offset-card .main-svg svg {
  width: 100%;
  height: auto;
  max-height: 300px;
}

.card {
  border-radius: 24px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 45px rgba(79, 97, 219, 0.08);
  display: flex;
  flex-direction: column;
  gap: 22px;
  backdrop-filter: blur(14px);
  height: 100%;
}

.card h2 {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1.1;
  font-weight: 700;
  color: #0f172a;
}

.row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  margin-bottom: 14px;
  align-items: flex-start;
}

label {
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  padding-top: 12px;
}

.control {
  position: relative;
  display: block;
  width: 100%;
}

.field-with-counter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.control input:not(.sr-only-date),
.control textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d9dce7;
  border-radius: 16px;
  font-size: 1rem;
  background: #fdfdff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}

.control input:not(.sr-only-date)::placeholder,
.control textarea::placeholder {
  color: #b0b8c6;
}

.control input:not(.sr-only-date) {
  padding-right: 16px;
  min-height: 48px;
  line-height: 1.4;
}

.control input[type="number"] {
  padding-right: 16px;
}

.control input[type="number"]::-webkit-outer-spin-button,
.control input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.control input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.control textarea {
  padding-bottom: 16px;
}

.control input:not(.sr-only-date):focus,
.control textarea:focus {
  outline: none;
  border-color: #0a7aff;
  box-shadow: 0 0 0 3px rgba(10, 122, 255, 0.15);
}

.control textarea {
  min-height: 132px;
  resize: vertical;
}

.control--simple input {
  padding-right: 16px;
}

.counter {
  font-size: 0.75rem;
  color: #6b7280;
  pointer-events: none;
  font-weight: 500;
}

.control .counter {
  position: absolute;
  right: 14px;
}

.control:not(.control--textarea) .counter {
  top: 12px;
}

.counter-inline {
  position: static;
  align-self: flex-end;
  padding-right: 4px;
  color: #6b7280;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions button {
  min-width: 164px;
  min-height: 50px;
  font-family: var(--font-def), sans-serif;
}

.form-card .actions {
  justify-content: center;
}

button:not(.navbar-toggler),
.btn-like {
  position: relative;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: #f5f5f5;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  font-weight: 600;
}

button:not(.navbar-toggler):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

button:not(.navbar-toggler):active {
  transform: translateY(0);
  box-shadow: none;
}

button:not(.navbar-toggler):disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

button.primary {
  background: linear-gradient(135deg, var(--c-brand, #0B8194), #0a6f80);
  color: white;
  border-color: transparent;
  padding: 12px 26px;
}

button.primary:hover {
  background: linear-gradient(135deg, #0a6f80, #085b69);
}

button.secondary {
  background: #ffffff;
  border-color: #d9dce7;
  color: #0f172a;
  padding: 12px 22px;
}

button.secondary:hover {
  background: #f8fafc;
}

.hint {
  color: #64748b;
  font-size: 0.92rem;
}

.qr-preview {
  display: grid;
  place-items: center;
  padding: 32px;
  min-height: 240px;
  border-radius: 22px;
  background: #f8fbff;
  border: 1px dashed rgba(148, 163, 184, 0.35);
}

.qr-preview:empty::before {
  content: "";
  width: 80%;
  max-width: 280px;
  height: 60%;
  background: linear-gradient(145deg, #ffffff 0%, #eef3ff 100%);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.preview-card .actions {
  justify-content: center;
  gap: 14px;
  margin-top: 0;
}

.preview-card .hint {
  text-align: center;
}

.encoded-label {
  margin-top: 4px;
  font-weight: 500;
}

#qr canvas {
  max-width: 100%;
  height: auto;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88rem;
}

pre.mono {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 12px 16px;
  overflow-x: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #1f2933;
  white-space: pre-wrap;
}

.control--date {
  width: 100%;
}

.date-wrap {
  position: relative;
  width: 100%;
}

.date-wrap input[type="text"] {
  width: 100%;
  padding-right: 48px;
}

button.date-picker-proxy {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: #475569;
  transition: background 0.2s ease, color 0.2s ease;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

button.date-picker-proxy svg {
  width: 18px;
  height: 18px;
}

button.date-picker-proxy:hover {
  background: rgba(10, 122, 255, 0.1);
  color: #0a7aff;
  transform: translateY(-50%);
  box-shadow: none;
}

button.date-picker-proxy:active {
  transform: translateY(-50%);
  box-shadow: none;
}

button.date-picker-proxy:focus-visible {
  outline: 2px solid #0a7aff;
  outline-offset: 2px;
}

.sr-only-date {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  opacity: 0;
  pointer-events: none;
  border: none;
}

.sr-only-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.date-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  padding: 12px;
  z-index: 30;
  min-width: 260px;
}

.date-popover[hidden] {
  display: none;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
}

.calendar-nav {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.calendar-nav:hover {
  background: #f0f7ff;
}

.calendar-nav:focus-visible {
  outline: 2px solid #0a7aff;
  outline-offset: 2px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 6px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-cell {
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 0;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.calendar-cell:hover {
  background: #f0f7ff;
}

.calendar-cell.is-selected {
  background: #0a7aff;
  color: white;
}

.calendar-cell.is-today {
  border: 1px solid #0a7aff;
}

.calendar-cell.is-disabled {
  color: #9aa3b2;
  cursor: not-allowed;
  background: #f7f9fc;
}

.calendar-cell.is-disabled:hover {
  background: #f7f9fc;
}

.calendar-cell:focus-visible {
  outline: 2px solid #0a7aff;
  outline-offset: 2px;
}

.calendar-cell--empty {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1020px) {
  .qr-page-shell {
    padding-top: 34px;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 52px;
  }

  .main-layout {
    margin-top: 14px;
  }

  .qr-examples__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 24px;
    padding-right: 24px;
  }

  .qr-examples .shapes-wrap {
    --svg-l-width: 220px;
    --svg-r-width: 240px;
  }

  .qr-examples>.section-offset-cards__title h3 svg {
    --offset: 20px;
    bottom: -2px;
  }

  .card {
    padding: 26px;
  }

  .card h2 {
    font-size: clamp(24px, 4vw, 30px);
  }

  .actions button {
    min-height: 48px;
  }

  .qr-floating-illustration {
    width: clamp(80px, 10vw, 110px);
  }

  .qr-floating-illustration--left {
    transform: translate(calc(-100% - 22px), -50%) rotate(-8deg);
  }

  .qr-floating-illustration--right {
    transform: translate(calc(100% + 18px), -50%) rotate(8deg);
  }
}

@media (max-width: 1280px) {
  .qr-floating-illustration {
    display: none;
  }
}

@media (max-width: 720px) {
  .qr-page-shell {
    padding: 28px 18px 38px;
  }

  .main-layout {
    margin-top: 8px;
    gap: 18px;
  }

  .qr-examples {
    padding-top: 64px;
    padding-bottom: 124px;
  }

  .qr-examples__grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .qr-examples .shapes-wrap {
    display: none;
  }

  .qr-examples .offset-card {
    --card-top-pad: 22px;
    min-height: auto;
    padding: var(--card-top-pad) 24px 30px;
  }

  .qr-examples .offset-card h3 {
    font-size: 24px;
  }

  .qr-examples .offset-card p {
    font-size: 15px;
  }

  .qr-examples .qr-example-qr img {
    width: 122px;
  }

  .qr-examples .qr-example-icon svg {
    width: 38px;
    height: 38px;
  }

  .qr-examples>.section-offset-cards__title h3 {
    font-size: 24px;
  }

  .qr-examples>.section-offset-cards__title h3 svg {
    --offset: 10px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .actions {
    width: 100%;
  }

  .actions button {
    flex: 1 1 100%;
    min-height: 46px;
  }

  .control:not(.control--textarea) .counter {
    top: auto;
    bottom: 12px;
    transform: none;
  }

  label {
    padding-top: 0;
  }

  .card {
    padding: 22px;
  }

  .card h2 {
    font-size: clamp(22px, 7vw, 28px);
  }

  .qr-preview {
    padding: 22px;
    min-height: 210px;
  }
}
