/* ============================================================================
   Page RELOCATION (« tes photos de location, en propre ») — styles SPÉCIFIQUES.
   Le socle vient de styles.css (hero, tool-card, btn, modale, registre, tokens).
   On ajoute : la zone de dépôt (toujours visible + compteur), la galerie de
   cartes photo (slider avant/après, téléchargement unitaire), le verrou email
   affiché À LA PLACE de la carte, la relance et le « tout télécharger ».
   ============================================================================ */

/* -------------------- Atelier -------------------- */
.etape {
  animation: fadein 0.3s ease;
}
.etape__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--ink);
}

/* -------------------- Zone de dépôt (toujours en haut) -------------------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 30px 20px;
  border: 2px dashed #c6d0de;
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover,
.dropzone:focus-within,
.dropzone--over {
  border-color: var(--green);
  background: var(--green-bg);
}
.dropzone__ic {
  width: 34px;
  height: 34px;
  color: var(--green);
}
.dropzone__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.dropzone__hint {
  font-size: 0.86rem;
  color: var(--steel);
  max-width: 40ch;
}

/* Ligne honnête sous la galerie (form-note vient de styles.css) */
.form-note--solo {
  margin-top: 16px;
}

/* -------------------- Galerie : cartes photo -------------------- */
.photo-cards {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.photo-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: fadein 0.3s ease;
}

/* Croix « supprimer » (coin haut-droit, au-dessus du slider et du verrou) */
.photo-del {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(16, 26, 46, 0.72);
  color: #fff;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}
.photo-del:hover {
  background: var(--risk);
  transform: scale(1.06);
}
.photo-del .ic {
  width: 17px;
  height: 17px;
}
.photo-card__pending {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  color: var(--steel-d);
  font-weight: 500;
}

/* État « en traitement » : la photo déposée est dévoilée TOUT DE SUITE sous un
   voile sombre + spinner → feedback immédiat (fini le doute « ça charge ou pas ? »). */
.photo-pending {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0d1526;
}
.photo-pending__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(0.85);
}
.photo-pending__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  color: #fff;
}
.photo-pending__overlay .loader__spin {
  width: 26px;
  height: 26px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}
.photo-pending__label {
  font-weight: 600;
  font-size: 0.95rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* La zone de dépôt (.dropzone) est placée EN BAS de l'atelier, après la galerie :
   on ajoute une photo juste sous la dernière, sans remonter en haut de page. */

/* Comparateur : "après" en base, "avant" par-dessus, coupé au niveau du curseur. */
.ba {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0d1526;
  --pos: 50%;
}
.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}
.ba__before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba__tag {
  position: absolute;
  top: 10px;
  z-index: 3;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(16, 26, 46, 0.72);
  border-radius: 999px;
  padding: 3px 10px;
}
.ba__tag--before {
  left: 10px;
}
.ba__tag--after {
  right: 48px; /* laisse la place à la croix « supprimer » (coin haut-droit) */
  background: rgba(14, 159, 110, 0.9);
}
.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(16, 26, 46, 0.25);
}
.ba__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 26, 46, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.ba__grip .ic {
  width: 20px;
  height: 20px;
}
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
}

/* Barre sous l'image : légende + bouton télécharger */
.photo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px 12px;
}
.photo-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--steel-d);
}
.photo-caption .ic {
  width: 15px;
  height: 15px;
  color: var(--green);
  flex: 0 0 auto;
}
.photo-caption__synthid {
  color: var(--steel);
}
.photo-dl {
  padding: 8px 14px;
  font-size: 0.86rem;
}
.photo-dl .ic {
  width: 16px;
  height: 16px;
}

/* -------------------- Verrou email (À LA PLACE de la carte) -------------------- */
.photo-card--locked {
  border-color: var(--green-line);
}
.photo-lock {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0d1526;
}
.photo-lock__blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) brightness(0.55) saturate(1.05);
  transform: scale(1.08);
}
.photo-lock__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 22px 20px;
  color: #fff;
  background: linear-gradient(180deg, rgba(11, 21, 38, 0.35), rgba(11, 21, 38, 0.72));
}
.photo-lock__ic {
  width: 30px;
  height: 30px;
  color: var(--green-bright);
}
.photo-lock__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  margin: 4px 0 0;
}
.photo-lock__sub {
  font-size: 0.92rem;
  color: var(--sub-dark);
  margin: 0 0 6px;
  max-width: 34ch;
}
.photo-lock__form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 380px;
}
.photo-lock__form input {
  flex: 1 1 180px;
  min-width: 0;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #2b3a56;
  border-radius: 10px;
  background: var(--ink-soft);
  color: #fff;
}
.photo-lock__form input::placeholder {
  color: #7f8ca6;
}
.photo-lock__form input:focus {
  outline: none;
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(47, 208, 143, 0.2);
}
.photo-lock__msg {
  font-size: 0.86rem;
  color: #ffd7d7;
  margin: 4px 0 0;
}
.photo-lock__fine {
  font-size: 0.8rem;
  color: #9aa6bd;
  margin: 4px 0 0;
}

/* -------------------- Relance + tout télécharger -------------------- */
.photo-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--green-bg);
  border: 1px solid var(--green-line);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--green-d, #0b7a54);
}
.photo-hint[hidden] {
  display: none;
}
.photo-hint .ic {
  width: 17px;
  height: 17px;
  color: var(--green);
  flex: 0 0 auto;
  margin-top: 1px;
}
.dl-all {
  margin-top: 16px;
}
.dl-all[hidden] {
  display: none;
}
.dl-all .btn {
  width: 100%;
}

/* Bandeau limite (dégradation douce) */
.limit-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 10px;
  color: var(--warn);
  font-size: 0.9rem;
  font-weight: 500;
}
.limit-note[hidden] {
  display: none;
}

/* -------------------- Bouton fantôme (téléchargements) -------------------- */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--line);
  color: var(--steel-d);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 16px;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}
.btn-ghost:disabled {
  opacity: 0.5;
  cursor: default;
}

/* -------------------- Méthode : note au lieu d'une date -------------------- */
.reg-row__note {
  color: var(--steel);
  font-size: 0.84rem;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .reg-row__note {
    white-space: normal;
    text-align: right;
  }
}
