/* https://ceryprog63.org by Polux63 */
@font-face {
  font-family: "Modern Romance";
  src: url("../fonts/ModernRomance.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --noir: #0a0a0a;
  --anthracite: #2b2b2b;
  --or: #c9a227;
  --or-clair: #e0c35a;
  --blanc: #f5f5f5;
  --font-titre: "Modern Romance", "Segoe UI", Georgia, serif;
  --font-roman: "EB Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --roman-page-w: 900px;
  --roman-page-h: 1350px;
  --roman-spine-w: 14px;
  --roman-marge-haut: 1.6rem;
  --roman-marge-bas: 1.1rem;
  --roman-marge-cote: 1.55rem;
  --roman-marge-gouttiere: 1.2rem;
  --roman-font-size: 16px;
  --roman-titre-size: 20px;
  --roman-num-size: 14px;
  --roman-paper: #f7f1e3;
  --roman-ink: #1c1814;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", Georgia, serif;
  color: var(--blanc);
  background:
    radial-gradient(ellipse at top, #3a3a3a 0%, transparent 55%),
    linear-gradient(160deg, var(--noir) 0%, var(--anthracite) 55%, #1a1a1a 100%);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--or-clair);
  text-decoration: none;
}

a:hover {
  color: var(--or);
}

.site-header {
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(10, 10, 10, 0.85);
}

.menu {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-titre);
}

.menu a {
  font-family: var(--font-titre);
}

.menu__brand {
  color: var(--or);
  font-family: var(--font-titre);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 1.35rem;
}

.menu__list {
  list-style: none;
  display: flex;
  gap: 1.25rem;
}

.menu__list a {
  font-family: var(--font-titre);
  font-size: 1.15rem;
}

.site-main {
  flex: 1;
  width: min(60rem, 100%);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.accueil {
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(10, 10, 10, 0.72);
  padding: 2.75rem 2rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.accueil__brand {
  color: var(--or);
  font-family: var(--font-titre);
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  line-height: 1.1;
}

.accueil__title,
.accueil h1 {
  color: var(--blanc);
  font-family: var(--font-titre);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
  font-weight: 500;
}

.accueil__lead,
.accueil p {
  line-height: 1.55;
  opacity: 0.9;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.accueil__actions {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

.accueil__swap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.accueil__swap[hidden],
.accueil__btn[hidden] {
  display: none !important;
}

.accueil__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--or);
  background: rgba(201, 162, 39, 0.15);
  color: var(--blanc);
  text-decoration: none;
  letter-spacing: 0.03em;
  font-family: var(--font-titre);
  font-size: 1.55rem;
  font-weight: 500;
  text-align: center;
  margin: 0;
  cursor: pointer;
}

button.accueil__btn {
  appearance: none;
  -webkit-appearance: none;
}

.accueil__btn:hover,
a.accueil__btn:hover {
  background: var(--or);
  color: var(--noir);
}

.site-footer__copyright {
  text-align: center;
  margin: 0;
  color: rgba(245, 245, 245, 0.7);
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(10, 10, 10, 0.85);
  padding: 1rem 1.5rem;
  text-align: center;
  color: rgba(245, 245, 245, 0.65);
  font-size: 0.9rem;
}

.auth {
  max-width: 24rem;
  margin: 0 auto;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(10, 10, 10, 0.72);
  padding: 2rem 1.75rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.55);
}

.auth h1 {
  color: var(--or);
  font-family: var(--font-titre);
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.auth__erreur {
  color: #ffb4b4;
  background: rgba(120, 20, 20, 0.35);
  border: 1px solid rgba(255, 100, 100, 0.35);
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth__label {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(245, 245, 245, 0.85);
}

.auth__input {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: var(--anthracite);
  color: var(--blanc);
  font-size: 1rem;
}

.auth__input:focus {
  outline: 1px solid var(--or);
}

.auth__password {
  position: relative;
  display: flex;
  align-items: center;
}

.auth__input--password {
  padding-right: 2.75rem;
}

.auth__eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--or-clair);
  padding: 0.35rem;
  cursor: pointer;
  line-height: 0;
}

.auth__eye:hover {
  color: var(--or);
}

.auth__eye-icon[hidden] {
  display: none;
}

.auth__remember {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  width: 100%;
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: rgba(245, 245, 245, 0.8);
  cursor: pointer;
  user-select: none;
}

.auth__remember input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--or);
  cursor: pointer;
}

.auth__remember span {
  font-weight: 600;
  color: rgba(245, 245, 245, 0.85);
}

.cery-turnstile {
  margin: 1rem 0 0.35rem;
  min-height: 65px;
  width: 100%;
}

.auth__btn {
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--or);
  background: rgba(201, 162, 39, 0.15);
  color: var(--blanc);
  font-family: var(--font-titre);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.auth__btn:hover {
  background: var(--or);
  color: var(--noir);
}

.dashboard {
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(10, 10, 10, 0.72);
  padding: 2rem 1.75rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.55);
}

.dashboard h1 {
  color: var(--or);
  font-family: var(--font-titre);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.dashboard__intro {
  opacity: 0.85;
  margin-bottom: 1.75rem;
  line-height: 1.45;
}

.dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.dashboard__card {
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(43, 43, 43, 0.55);
  padding: 1.25rem;
}

.dashboard__card h2 {
  color: var(--or-clair);
  font-family: var(--font-titre);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.dashboard__card p {
  opacity: 0.85;
  line-height: 1.45;
  font-size: 0.95rem;
}

.dashboard__btn,
.exes__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 14rem;
  height: 2.5rem;
  margin-top: 1rem;
  padding: 0 0.75rem;
  border: 1px solid var(--or);
  background: rgba(201, 162, 39, 0.15);
  color: var(--blanc);
  text-decoration: none;
  letter-spacing: 0.03em;
  font-family: var(--font-titre);
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard__btn:hover,
.exes__btn:hover {
  background: var(--or);
  color: var(--noir);
}

.dashboard__back {
  margin-bottom: 1.25rem;
}

.dashboard__back a {
  color: var(--or-clair);
}

.dashboard__empty {
  opacity: 0.75;
}

.exes__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.exes__btn {
  margin-top: 0;
}

.app-liste {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.app-ligne {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-sizing: border-box;
  width: 100%;
  padding: 1.35rem 1.25rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(43, 43, 43, 0.55);
}

.app-ligne__haut {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
  width: 100%;
}

.app-ligne__icone {
  flex: 0 0 auto;
  width: 10rem;
  height: 10rem;
  object-fit: contain;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: #0a0a0a;
  image-rendering: auto;
}

.app-ligne__icone--vide {
  border-style: dashed;
  opacity: 0.35;
}

.app-ligne__infos {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.app-ligne__titre {
  margin: 0;
  color: var(--or-clair);
  font-family: var(--font-titre);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.app-ligne__texte {
  margin: 0;
  opacity: 0.88;
  line-height: 1.45;
  font-size: 0.98rem;
  color: var(--blanc);
}

.app-ligne__dl {
  margin-top: 0.25rem;
}

.app-ligne__journal {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.1);
}

.journal-btn__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: none;
  background: transparent;
  color: var(--or-clair);
  font-family: var(--font-titre);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.journal-btn__toggle::after {
  content: "+";
  flex: 0 0 auto;
  margin-left: 0.75rem;
  color: var(--or);
  font-size: 1.2rem;
  line-height: 1;
}

.app-ligne__journal[data-ouvert="1"] .journal-btn__toggle::after {
  content: "-";
}

.journal-btn__toggle:hover {
  color: var(--or);
}

.journal-btn__panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.25);
}

.journal-btn__panel[hidden] {
  display: none !important;
}

.journal-entree__version {
  margin: 0 0 0.35rem;
  color: var(--or);
  font-family: var(--font-titre);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.journal-btn__liste {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--blanc);
  opacity: 0.9;
  line-height: 1.45;
  font-size: 0.92rem;
}

.journal-btn__liste li + li {
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .menu {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
  }

  .menu__brand {
    font-size: 1.15rem;
  }

  .menu__list {
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    width: 100%;
  }

  .menu__list a {
    font-size: 1rem;
  }

  .site-main {
    padding: 1.25rem 0.85rem;
  }

  .accueil {
    padding: 1.5rem 0.9rem;
  }

  .accueil__btn {
    font-size: 1.25rem;
    height: auto;
    min-height: 2.85rem;
  }

  .site-footer {
    padding: 0.85rem 0.75rem;
  }

  .site-footer__copyright {
    font-size: 0.75rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .app-ligne__haut {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-ligne__infos {
    align-items: center;
  }

  .app-ligne__icone {
    width: 8.5rem;
    height: 8.5rem;
  }
}
