.stage {
  padding: clamp(80px, 11vh, 110px) clamp(20px, 5vw, 44px) 60px;
}

.tool-stage { max-width: 640px; }

.page-intro { color: var(--text-gray); font-size: 14.5px; line-height: 1.6; margin-bottom: 24px; }

#options-section { display: flex; flex-direction: column; gap: 22px; }

.hidden { display: none !important; }

#duration-result, #qrcode-result { margin-top: 22px; }

.btn-primary { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.icon-copy { width: 16px; height: 16px; -webkit-mask-image: url(../img/icons/copy.svg); mask-image: url(../img/icons/copy.svg); }
.icon-check { width: 16px; height: 16px; -webkit-mask-image: url(../img/icons/check.svg); mask-image: url(../img/icons/check.svg); }
.icon-arrows { width: 20px; height: 20px; -webkit-mask-image: url(../img/icons/arrows-vertical.svg); mask-image: url(../img/icons/arrows-vertical.svg); }
.icon-upload { width: 28px; height: 28px; -webkit-mask-image: url(../img/icons/upload.svg); mask-image: url(../img/icons/upload.svg); }

.tool-icon { width: 22px; height: 22px; flex-shrink: 0; }
.tool-icon-convertisseur { -webkit-mask-image: url(../img/tools/convertisseur.svg); mask-image: url(../img/tools/convertisseur.svg); }
.tool-icon-duree { -webkit-mask-image: url(../img/tools/duree.svg); mask-image: url(../img/tools/duree.svg); }
.tool-icon-password { -webkit-mask-image: url(../img/tools/password.svg); mask-image: url(../img/tools/password.svg); }
.tool-icon-qrcode { -webkit-mask-image: url(../img/tools/qrcode.svg); mask-image: url(../img/tools/qrcode.svg); }
.tool-icon-fisheye { -webkit-mask-image: url(../img/tools/fisheye.svg); mask-image: url(../img/tools/fisheye.svg); }

.nav-logo-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--yellow);
  padding: 3px 8px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease;
}

@media (hover: hover) {
  .nav-logo-tag:hover { background: var(--yellow-dark); }
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .tools-grid { grid-template-columns: 1fr; }
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--navy-card);
  border: 1px solid var(--navy-line-bold);
  color: var(--text-white);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s var(--ease);
}

.tool-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 194, 28, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
}

.tool-card-content { display: flex; flex-direction: column; gap: 3px; }
.tool-card-title { font-family: var(--font-ui); font-weight: 600; font-size: 15px; }
.tool-card-desc { font-size: 12.5px; color: var(--text-faint); line-height: 1.4; }

@media (hover: hover) {
  .tool-card:hover { border-color: var(--yellow); transform: translateY(-3px); }
}

.tool-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--navy-line-bold);
  border-radius: 14px;
  padding: clamp(20px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.field label .field-live { color: var(--yellow); text-transform: none; letter-spacing: normal; }

.field input[type="text"],
.field input[type="number"],
.field input[type="datetime-local"],
.field select {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--navy-line-bold);
  color: var(--text-white);
  transition: border-color 0.15s ease;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.field select option {
  background-color: var(--navy-card);
  color: var(--text-white);
}

.field input:focus,
.field select:focus {
  border-color: var(--yellow);
  outline: none;
}

.field input[readonly] { color: var(--text-gray); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.field-inline-group { display: flex; gap: 10px; }
.field-inline-group input { flex: 1 1 80px; min-width: 0; }
.field-inline-group select { flex: 1 1 100px; min-width: 0; padding-right: 30px; }

.field-with-action { display: flex; gap: 10px; }
.field-with-action input { flex: 1; }

.icon-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--navy-card);
  border: 1px solid var(--navy-line-bold);
  color: var(--text-gray);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (hover: hover) {
  .icon-btn:not(:disabled):hover { border-color: var(--yellow); color: var(--yellow); }
}

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

.btn-quick {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--navy-card);
  border: 1px solid var(--navy-line-bold);
  color: var(--text-gray);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  .btn-quick:hover { border-color: var(--yellow); color: var(--yellow); }
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--navy-line-bold);
  outline: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 1px var(--yellow);
  cursor: pointer;
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 1px var(--yellow);
  cursor: pointer;
}

.range-row { display: flex; align-items: center; gap: 12px; }
.range-bound { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); white-space: nowrap; }

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .checkbox-grid { grid-template-columns: 1fr; }
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-gray);
  cursor: pointer;
}

.checkbox-input { position: absolute; opacity: 0; width: 0; height: 0; }

.checkbox-custom {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--navy-line-bold);
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  inset: 0;
  -webkit-mask-image: url(../img/icons/check.svg);
  mask-image: url(../img/icons/check.svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 70%;
  mask-size: 70%;
  background: var(--navy);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--yellow);
  border-color: var(--yellow);
}

.checkbox-input:checked + .checkbox-custom::after { opacity: 1; }

.checkbox-input:focus-visible + .checkbox-custom { outline: 2px solid var(--yellow); outline-offset: 2px; }

.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="text"] { flex: 1; min-width: 0; }

.color-swatch {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--navy-line-bold);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}

.color-swatch::-webkit-color-swatch-wrapper { padding: 3px; }
.color-swatch::-webkit-color-swatch { border-radius: 5px; border: none; }
.color-swatch::-moz-color-swatch { border-radius: 5px; border: none; }

.upload-zone {
  border: 2px dashed var(--navy-line-bold);
  border-radius: 14px;
  padding: clamp(28px, 6vw, 44px) 20px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-zone.drag-over { border-color: var(--yellow); background: rgba(255, 194, 28, 0.04); }

.upload-label { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }

.upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 194, 28, 0.1);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-text { font-size: 14px; color: var(--text-gray); max-width: 320px; }
.upload-hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }

#file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.picker-hint { font-size: 13px; color: var(--text-gray); text-align: center; }

#picker-canvas {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--navy-line-bold);
  cursor: crosshair;
}

.preview-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.file-name { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

.result-block { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--navy-line-bold);
  border-top-color: var(--yellow);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-row { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-gray); font-size: 13.5px; }

#result-canvas, #qrcode canvas, #qrcode img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--navy-line-bold);
}

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.duration-result { display: flex; flex-direction: column; gap: 22px; }

.result-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.1rem;
}

.result-main {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--yellow);
  padding: 16px;
  border-radius: 10px;
  background: rgba(255, 194, 28, 0.06);
  border: 1px solid rgba(255, 194, 28, 0.2);
}

.result-grid, .alternatives-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.alternatives-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 640px) {
  .result-grid { grid-template-columns: repeat(3, 1fr); }
  .alternatives-grid { grid-template-columns: repeat(2, 1fr); }
}

.result-item, .alternative-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 10px;
  background: var(--navy-card);
  border: 1px solid var(--navy-line-bold);
}

.result-value, .alternative-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-white);
}

.result-label, .alternative-label {
  font-size: 10.5px;
  color: var(--text-faint);
  text-align: center;
}

.alternatives-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.strength-meter { display: flex; flex-direction: column; gap: 8px; }

.strength-label { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-gray); }

.strength-bar-container {
  height: 6px;
  border-radius: 999px;
  background: var(--navy-line-bold);
  overflow: hidden;
}

.strength-bar { height: 100%; width: 0; border-radius: 999px; transition: width 0.25s var(--ease), background 0.25s ease; }

.strength-bar.weak { width: 25%; background: linear-gradient(90deg, #ff4444, #ff4444dd); }
.strength-bar.medium { width: 50%; background: linear-gradient(90deg, #ffaa00, #ffaa00dd); }
.strength-bar.strong { width: 75%; background: linear-gradient(90deg, #00cc66, #00cc66dd); }
.strength-bar.verystrong { width: 100%; background: linear-gradient(90deg, #00ff88, #00ff88dd); }

.strength-text-weak { color: #ff4444; }
.strength-text-medium { color: #ffaa00; }
.strength-text-strong { color: #00cc66; }
.strength-text-verystrong { color: #00ff88; }

.info-box {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 194, 28, 0.06);
  border: 1px solid rgba(255, 194, 28, 0.2);
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--yellow);
}

.conversion-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: end;
}

@media (max-width: 560px) {
  .conversion-grid { grid-template-columns: 1fr; }
}

.conversion-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  padding-bottom: 12px;
}

.conversion-arrow .icon-arrows { transform: rotate(90deg); }

@media (max-width: 560px) {
  .conversion-arrow { padding: 4px 0; }
  .conversion-arrow .icon-arrows { transform: rotate(180deg); }
}

.page-back-cta { display: flex; justify-content: center; margin-top: 40px; }
