/* ===== Barre des 3 boutons d'action en bas de l'écran AR ===== */
#action-bar {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(96vw, 560px);
  z-index: 1200;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.action-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.action-btn:active {
  transform: scale(0.96);
}

.action-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.action-btn.call {
  background: linear-gradient(135deg, #00e676 0%, #00c48c 100%);
  color: #042112;
}

.action-btn.interview {
  background: linear-gradient(135deg, #00e5ff 0%, #00a8e8 100%);
  color: #041b29;
}

.action-btn.feedback {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
}

/* ===== Popups plein écran (100 % viewport, comportement de page indépendante) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 3000;
  background: linear-gradient(165deg, #0c243a 0%, #05101b 100%);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: none;
  min-height: 100%;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(165deg, #0e2840 0%, #05111d 100%);
  border: none;
  border-radius: 0;
  margin: 0;
  padding:
    max(26px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(36px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
  box-shadow: none;
  position: relative;
  color: var(--text);
  transform: translateY(12px);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: none;
}

.modal-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 3020;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(6, 20, 34, 0.92);
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.modal-close:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--cyan);
}

.modal-close:active {
  transform: scale(0.94);
}

.modal-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--emerald);
  margin-bottom: 6px;
}

.modal-title {
  font-size: 1.42rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-right: 52px;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .modal-dialog {
    padding: 40px max(40px, calc(50% - 340px)) 48px;
  }

  #booking-modal .modal-dialog {
    padding: 40px max(40px, calc(50% - 450px)) 48px;
  }

  .modal-title {
    font-size: 1.7rem;
  }

  .bk-step-slot {
    display: grid;
    grid-template-columns: minmax(310px, 380px) minmax(300px, 1fr);
    gap: 28px 36px;
    align-items: start;
  }

  .bk-cal-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 16px;
    padding: 18px;
  }

  .bk-side-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px;
    gap: 16px;
  }

  .bk-cal-panel .cal-day {
    aspect-ratio: auto;
    height: 44px;
  }

  .bk-side-panel .slots-grid {
    max-height: 240px;
  }
}

.empathy-box {
  background: rgba(0, 229, 255, 0.08);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(236, 247, 255, 0.92);
  margin-bottom: 16px;
}

.empathy-box p + p {
  margin-top: 8px;
}

/* ===== Formulaires ===== */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

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

.field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cde6f7;
}

.field-helper {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.field select option {
  background: #0b1f33;
  color: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--cyan);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.form-error {
  background: rgba(255, 82, 82, 0.14);
  border: 1px solid rgba(255, 82, 82, 0.5);
  color: #ffb3b3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.form-success {
  background: rgba(0, 230, 118, 0.13);
  border: 1px solid rgba(0, 230, 118, 0.55);
  color: #d4ffe8;
  border-radius: 14px;
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-success h3 {
  color: var(--emerald);
  font-size: 1.05rem;
}

.btn-primary-full {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #041826;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-primary-full:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-secondary-full {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Calendrier interactif ===== */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-month-label {
  font-size: 0.96rem;
  font-weight: 800;
  text-transform: capitalize;
}

.cal-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.cal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-weekdays {
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cal-day {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cal-day:hover:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.16);
}

.cal-day.selected {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #041826;
  border-color: transparent;
}

.cal-day:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}

.cal-day.holiday:disabled {
  color: #ff9c9c;
  opacity: 0.45;
  text-decoration: line-through;
}

.cal-legend {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ===== Créneaux horaires ===== */
.duration-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-choice {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.pill-choice.active {
  background: var(--cyan);
  color: #041826;
  border-color: var(--cyan);
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 7px;
  max-height: 170px;
  overflow-y: auto;
  padding-right: 2px;
}

.slot-btn {
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.08);
  color: #ffffff;
  border-radius: 9px;
  padding: 8px 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.slot-btn.selected {
  background: var(--emerald);
  color: #042112;
  border-color: var(--emerald);
}

.slot-empty {
  grid-column: 1 / -1;
  font-size: clamp(0.72rem, 3.1vw, 0.84rem);
  color: var(--text-muted);
  padding: 10px 0;
  white-space: nowrap;
}

/* ===== Type d'entretien ===== */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.type-card {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.type-card.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
}

.selected-slot-summary {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* ===== Popup plein écran « Partager ce CV » (LinkedIn) ===== */
.share-modal-dialog {
  display: flex;
  flex-direction: column;
}

.share-intro {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(236, 247, 255, 0.88);
  margin-bottom: 16px;
}

.share-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.share-reset-btn {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.share-reset-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

.field textarea.share-textarea {
  min-height: 162px;
  line-height: 1.52;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.28);
}

.share-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.share-status-banner {
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 0.82rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.share-status-banner.info {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.45);
  color: #d6ffea;
}

.share-status-banner.warning {
  background: rgba(255, 176, 32, 0.14);
  border: 1px solid rgba(255, 176, 32, 0.5);
  color: #ffe8b8;
}

.share-fallback-link {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  align-self: flex-start;
}

.share-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn-linkedin {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  background: #0a66c2;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(10, 102, 194, 0.38);
  transition: background 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

.btn-linkedin:hover {
  background: #004182;
  box-shadow: 0 10px 26px rgba(10, 102, 194, 0.48);
}

.btn-linkedin:active {
  transform: scale(0.98);
}

.btn-linkedin:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-linkedin svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex-shrink: 0;
}

.share-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-ghost-subtle {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(236, 247, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost-subtle:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
  .field textarea.share-textarea {
    font-size: 16px;
    min-height: 170px;
  }
}

/* ===== Popup plein écran de l'Œuf (Easter Egg) ===== */
.egg-modal-dialog {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at 50% 24%, #13395a 0%, #071726 58%, #040d17 100%);
}

.egg-modal-body {
  width: 100%;
  max-width: 680px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px 0 12px;
}

.egg-hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0 6px;
}

.egg-hero-stage::before {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.24) 0%, rgba(0, 230, 118, 0.08) 48%, transparent 72%);
  pointer-events: none;
  animation: eggHeroPulse 3s ease-in-out infinite;
}

.egg-hero-stage .egg-svg {
  position: relative;
  z-index: 1;
  width: 126px;
  height: 146px;
}

@keyframes eggHeroPulse {
  0%, 100% {
    transform: scale(0.94);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.egg-progress-panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.24);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.egg-progress-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--cyan);
}

.egg-progress-label.hatched {
  color: var(--emerald);
}

.egg-progress-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.egg-progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--emerald) 100%);
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.6);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.egg-progress-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.egg-unlocked-box {
  width: 100%;
  background: rgba(0, 230, 118, 0.13);
  border: 1px solid rgba(0, 230, 118, 0.55);
  border-radius: 14px;
  padding: 14px 16px;
  color: #d6ffea;
  font-size: 0.9rem;
  line-height: 1.5;
}

.egg-story-card {
  width: 100%;
  background: rgba(0, 229, 255, 0.07);
  border: 1px solid rgba(0, 229, 255, 0.26);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.96rem;
  line-height: 1.58;
  color: rgba(240, 248, 255, 0.94);
  text-align: center;
}

.egg-story-card p:first-child {
  font-weight: 800;
  color: #ffffff;
  font-size: 1.04rem;
}

.egg-story-card p:last-child {
  color: var(--cyan);
  font-weight: 700;
}

.egg-modal-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.egg-modal-dialog .modal-title {
  padding-right: 0;
  margin-bottom: 0;
}
