/* ==========================================================================
   Intro : écran verrouillé iOS + easter egg Face ID → écran d'accueil
   ========================================================================== */

.lockscreen {
  --lock-text: #1c1c1e;
  --lock-muted: #3c3c4399;
  --lock-notification-bg: #ffffffd9;
  --lock-notification-border: #0000000f;
  --lock-notification-shadow: 0 2px 10px -4px #0000001f;
  --lock-home-indicator: #1c1c1ecc;
  --lock-button-bg: #0000000d;

  grid-column: span 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 24px 14px;
  color: var(--lock-text);
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockscreen {
    --lock-text: #fff;
    --lock-muted: #ffffff99;
    --lock-notification-bg: #ffffff1f;
    --lock-notification-border: transparent;
    --lock-notification-shadow: none;
    --lock-home-indicator: #ffffffe0;
    --lock-button-bg: #ffffff26;
  }
}

:root[data-theme="dark"] .lockscreen {
  --lock-text: #fff;
  --lock-muted: #ffffff99;
  --lock-notification-bg: #ffffff1f;
  --lock-notification-border: transparent;
  --lock-notification-shadow: none;
  --lock-home-indicator: #ffffffe0;
  --lock-button-bg: #ffffff26;
}

/* Le rôle n'est affiché que dans le PDF */
.lockscreen > .mono {
  display: none;
}

/* ---- Cadenas / Face ID ---- */
.lock-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  margin-bottom: 2px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--lock-text);
  cursor: pointer;
}

.lock-button:hover {
  background: transparent;
}

.lock-button:focus-visible {
  outline: 2px solid var(--color-system-blue);
}

.lock-button svg {
  grid-area: 1 / 1;
  transition:
    opacity 0.2s,
    transform 0.3s;
}

.lock-icon {
  width: 14px;
  height: 18px;
  opacity: 0.85;
}

.face-id-icon {
  width: 30px;
  height: 30px;
}

.lock-icon--open,
.face-id-icon {
  opacity: 0;
}

.lock-button.is-scanning .lock-icon {
  opacity: 0;
}

.lock-button.is-scanning .face-id-icon {
  opacity: 1;
  animation: face-id-scan 0.8s ease-in-out;
}

.lockscreen.is-unlocked .lock-icon--closed {
  opacity: 0;
}

.lockscreen.is-unlocked .lock-icon--open {
  opacity: 0.85;
}

@keyframes face-id-scan {
  0% {
    transform: scale(0.7);
  }
  45% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

/* ---- Date et heure (le nom fait office d'horloge) ---- */
.lockscreen-date {
  font: 700 17px var(--font-rounded);
  opacity: 0.85;
}

.lockscreen-date::first-letter {
  text-transform: uppercase;
}

.lockscreen h1 {
  margin: -2px 0 0;
  color: var(--lock-text);
  font: 800 clamp(84px, 9.4vw, 128px) / 1 var(--font-rounded);
  letter-spacing: -0.035em;
  text-indent: -0.035em;
}

.name-part {
  display: block;
}

.name-part--surname {
  margin-top: -0.05em;
  color: var(--lock-text);
  font: 300 0.24em var(--font-rounded);
  letter-spacing: 0.04em;
  text-indent: 0.04em;
  opacity: 0.82;
}

/* ---- Notifications ---- */
.notifications {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 470px;
  margin-top: 24px;
}

.notification {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--lock-notification-border);
  border-radius: 20px;
  background: var(--lock-notification-bg);
  box-shadow: var(--lock-notification-shadow);
  text-align: left;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.notification-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 9px;
  font: 800 10px var(--font-mono);
  font-style: normal;
}

.notification-icon svg {
  width: 34px;
  height: 34px;
}

.notification-icon .logo-bg {
  fill: #000;
}

.notification-icon .logo-glyph {
  fill: #fff;
}

.notification-icon--rts {
  background: var(--color-rts-red);
  color: #fff;
}

.notification b {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 600 13.5px var(--font-sans);
}

.notification em {
  color: var(--lock-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
}

.notification p {
  margin: 2px 0 0;
  color: var(--lock-text);
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.9;
}

.notification .lead {
  letter-spacing: -0.01em;
}

/* ---- Raccourcis bas d'écran (LinkedIn / GitHub) ---- */
.lockscreen-actions {
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  padding: 20px 10px 0;
  transition: opacity 0.3s;
}

.lockscreen-actions a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--lock-button-bg);
  color: var(--lock-text);
  transition: transform 0.2s;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.lockscreen-actions a:hover {
  transform: scale(1.08);
}

.lockscreen-actions a:focus-visible {
  outline: 2px solid var(--color-system-blue);
  outline-offset: 2px;
}

.lockscreen-actions svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.home-indicator {
  width: 134px;
  height: 5px;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--lock-home-indicator);
}

/* ---- Déverrouillage : l'écran verrouillé laisse place à l'écran d'accueil ---- */
.lockscreen h1,
.notifications {
  transition:
    opacity 0.35s,
    transform 0.45s var(--ease-out);
}

.lockscreen.is-unlocked h1,
.lockscreen.is-unlocked .notifications {
  opacity: 0;
  transform: translateY(-28px);
  pointer-events: none;
}

.lockscreen.is-unlocked .lockscreen-actions {
  opacity: 0;
  pointer-events: none;
}

.home-screen {
  position: absolute;
  top: 96px;
  left: 28px;
  right: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 8px;
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
  transition:
    opacity 0.35s 0.12s,
    transform 0.5s 0.12s var(--ease-out);
}

.lockscreen.is-unlocked .home-screen {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.home-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--lock-text);
  font: 500 11.5px var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}

.home-app:hover {
  background: transparent;
}

.home-app i {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: var(--lock-text);
  transition: transform 0.2s;
}

.home-app:hover i {
  transform: scale(1.07);
}

.home-app:focus-visible i {
  outline: 2px solid var(--color-system-blue);
  outline-offset: 3px;
}

.home-app svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--color-card);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Logos de marque (GitHub, LinkedIn) : pleins plutôt qu'en trait */
.home-app svg.is-brand {
  width: 26px;
  height: 26px;
  fill: var(--color-card);
  stroke: none;
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .lockscreen {
    grid-column: span 12;
  }

  .lockscreen h1 {
    font-size: clamp(72px, 24vw, 104px);
  }

  .home-screen {
    top: 90px;
    left: 16px;
    right: 16px;
    gap: 20px 4px;
  }

  .home-app i {
    width: 54px;
    height: 54px;
  }
}
