/* ===== PAGE ACCÈS RESTREINT ===== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  background-color: #111;
  padding: 60px 10%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Icône cadenas géante en fond */
.error-page__bg-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 45vw, 480px);
  height: auto;
  color: #1c1c1c;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.error-page__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 520px;
}

.error-page__icon {
  width: 80px;
  height: 80px;
  background: #1e1e1e;
  border: 1.5px solid #2e2e2e;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FED900;
  margin-bottom: 8px;
}

.error-page__code {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #FED900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.error-page__title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: #f0f0f0;
  line-height: 1.2;
  text-wrap: balance;
}

.error-page__sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #777;
  line-height: 1.6;
  text-wrap: balance;
}

.error-page__divider {
  width: 48px;
  height: 2px;
  background: #2a2a2a;
  border-radius: 2px;
  margin: 4px 0;
}

.error-page__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  padding: 12px 22px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
}

.error-btn--primary {
  background: #FED900;
  color: #111;
}
.error-btn--primary:hover { background: #ffe333; }

.error-btn--secondary {
  background: #1e1e1e;
  border: 1.5px solid #2e2e2e;
  color: #aaa;
}
.error-btn--secondary:hover { border-color: #444; color: #f0f0f0; }

/* Lien secondaire sous les boutons */
.error-page__hint {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}
.error-page__hint a {
  color: #FED900;
  text-decoration: none;
  font-weight: 600;
}
.error-page__hint a:hover { text-decoration: underline; }

/* Variante auth : un peu plus d'air en bas à cause du footer */
.error-page--auth {
  min-height: calc(100vh - 80px - 120px);
  padding-block: 80px;
}

@media (max-width: 600px) {
  .error-page { padding: 48px 6%; }
  .error-page__actions { width: 100%; flex-direction: column; }
  .error-btn { justify-content: center; width: 100%; }
}


/* =========================================================================
   THÈME CLAIR
   Actif quand <html data-theme="light"> (bouton de l'en-tête ou page « Mon compte »).
   Tokens et principe : voir la section THÈME CLAIR de layout.css.
   :where() garde la spécificité de la règle sombre d'origine : ces règles
   passent devant parce qu'elles sont en fin de fichier.
   ========================================================================= */

:where(:root[data-theme="light"]) .error-page { background-color: #ececec; }
:where(:root[data-theme="light"]) .error-page__icon {
  background-color: #ffffff;
  border-color: #c4c4c4;
  color: var(--accent-text);
}
:where(:root[data-theme="light"]) .error-page__code { color: var(--accent-text); }
:where(:root[data-theme="light"]) .error-page__title { color: #1e1e1e; }
:where(:root[data-theme="light"]) .error-page__sub { color: #575757; }
:where(:root[data-theme="light"]) .error-btn--primary {
  background-color: #FED900;
  color: #111;
}
:where(:root[data-theme="light"]) .error-btn--primary:hover { background-color: #ffe333; }
:where(:root[data-theme="light"]) .error-btn--secondary {
  background-color: #ffffff;
  border-color: #c4c4c4;
  color: #404040;
}
:where(:root[data-theme="light"]) .error-btn--secondary:hover {
  border-color: #adadad;
  color: #1e1e1e;
}
:where(:root[data-theme="light"]) .error-page__hint { color: #575757; }
:where(:root[data-theme="light"]) .error-page__hint a { color: var(--accent-text); }

/* Chiffre / icône géants en filigrane : gris très clair */
:where(:root[data-theme="light"]) .error-page__bg-num,
:where(:root[data-theme="light"]) .error-page__bg-icon {
  color: #d6d6d6;
}
:where(:root[data-theme="light"]) .error-page__divider { background-color: #cccccc; }
