/* BASE CLAIRE */

:root {
  color-scheme: light;
  --intensite-ambiance-personnages: 0.20;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: #f5f4f1;
}

body {
  min-height: 100svh;
  font-family: Arial, sans-serif;
  color: #242424;
  isolation: isolate;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid #656976;
  outline-offset: 4px;
}


/* REFLETS PASTEL */

#ambiance-personnages {
  position: fixed;
  inset: 0;
  z-index: 0;

  overflow: hidden;
  pointer-events: none;
  background: #f5f4f1;
}

.calque-personnages {
  position: absolute;
  inset: -100px;

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  filter: blur(95px) saturate(1.25) brightness(1.35);
  transform: scale(1.15);

  opacity: 0;
  transition: opacity 1000ms ease;
  will-change: opacity;
}

.calque-personnages.est-actif {
  opacity: var(--intensite-ambiance-personnages);
}

#ambiance-personnages::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;

  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(255, 255, 255, 0.65),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(248, 247, 244, 0.25),
      rgba(248, 247, 244, 0.6)
    );
}

.entete-personnages,
.filtres-personnages,
.RP-SECTIONS,
.RP-SECTIONS2 {
  position: relative;
  z-index: 1;
}


/* HEADER */

.entete-personnages {
  display: grid;
  grid-template-columns: 160px minmax(0, 1280px) 160px;
  justify-content: space-between;
  align-items: start;
  gap: 32px;

  padding: 24px 16px 0;
}

.logo-personnages {
  display: block;
  justify-self: end;
  width: 90px;
}

.logo-personnages img {
  display: block;
  width: 100%;
  height: auto;
}


/* BOUTONS EN VERRE */

.retour-personnages,
.filtre-personnages,
.RP-FLECHE {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-height: 52px;
  padding: 14px 24px;

  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;

  background: rgba(32, 32, 32, 0.7);
  color: #ffffff;

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.retour-personnages:hover,
.filtre-personnages:hover,
.RP-FLECHE:hover {
  background: rgba(45, 45, 45, 0.82);
  border-color: rgba(255, 255, 255, 0.8);
}

.retour-personnages {
  justify-self: start;
  min-width: 160px;
  min-height: 64px;

  margin-top: 12px;
  padding: 18px 28px;
  font-size: 18px;
}

.retour-personnages span {
  font-size: 26px;
  font-weight: 400;
}


/* RECHERCHE EN VERRE DÉPOLI */

.RECHERCHE-PERSONNAGES {
  min-width: 0;
  padding-top: 20px;
}

.RECHERCHE-LABEL {
  display: block;
  margin: 0 0 14px 18px;

  color: #565962;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 2px;
}

.RECHERCHE-CHAMP {
  display: flex;
  align-items: center;
  gap: 16px;

  min-height: 88px;
  padding: 0 26px;

  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.65);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 40px rgba(30, 30, 40, 0.07);

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.RECHERCHE-CHAMP:focus-within {
  border-color: rgba(95, 100, 110, 0.45);

  box-shadow:
    0 0 0 3px rgba(95, 100, 110, 0.07),
    0 14px 40px rgba(30, 30, 40, 0.08);
}

.RECHERCHE-ICONE {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;

  fill: none;
  stroke: #737783;
  stroke-width: 1.8;
  stroke-linecap: round;
}

#recherche-personnage {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0;

  border: 0;
  outline: 0;
  background: transparent;

  color: #242629;
  font-size: 19px;
}

#recherche-personnage::placeholder {
  color: #858994;
}

#recherche-personnage::-webkit-search-cancel-button {
  display: none;
}

.RECHERCHE-EFFACER {
  flex: 0 0 34px;

  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;
  padding: 0;

  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #525662;

  font-size: 24px;
  cursor: pointer;
}

.RECHERCHE-EFFACER:hover {
  background: rgba(0, 0, 0, 0.11);
}

.RECHERCHE-STATUT {
  min-height: 18px;
  margin: 18px 0 0 18px;

  color: #656974;
  font-size: 13px;
}

.RECHERCHE-VIDE {
  margin: 18px 0 0;
  color: #555962;
  font-size: 15px;
  line-height: 1.6;
}


/* RACCOURCIS CENTRÉS */

.filtres-personnages {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 12px;

  width: 96%;
  max-width: 1800px;
  margin: 20px auto 44px;
  padding: 8px 8px 16px;

  overflow-x: auto;
  overscroll-behavior-x: contain;

  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.filtre-personnages {
  flex: 0 0 auto;
}

.filtres-personnages > :first-child {
  margin-left: auto;
}

.filtres-personnages > :last-child {
  margin-right: auto;
}

.filtre-personnages[aria-pressed="true"],
.filtre-personnages[aria-pressed="true"]:hover {
  background: #ffffff;
  border-color: #d6d4cf;
  color: #191919;
}


/* GRANDES FICHES */

.RP-SECTIONS,
.RP-SECTIONS2 {
  display: flow-root;
  width: 100%;
  padding: 0 2% 80px;
  background: transparent;
}

.RP-PERSONNAGES {
  position: relative;
  isolation: isolate;

  width: 100%;
  max-width: 2500px;
  height: clamp(480px, 42vw, 800px);
  margin: 0 auto;

  overflow: hidden;
  border-radius: 32px;
  background: #151515;

  box-shadow:
    0 18px 45px rgba(25, 25, 30, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.7);
}

.RP-IMAGE {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
  object-fit: cover;

  transition: transform 0.8s ease;
}

.RP-PERSONNAGES::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0.38) 55%,
    rgba(0, 0, 0, 0.08)
  );

  pointer-events: none;
}

.RP-CONTENU {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;

  width: 100%;
  height: 100%;
  padding: 90px clamp(30px, 4vw, 72px) 72px;

  color: #ffffff;
}

.RP-NUMERO {
  position: absolute;
  top: 35px;
  left: 40px;

  margin: 0;
  color: #dddddd;
  font-size: 12px;
  letter-spacing: 3px;
}

.RP-TITRE {
  max-width: 1100px;
  margin: 0 0 22px;

  font-size: clamp(40px, 5vw, 90px);
  font-weight: 800;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.RP-DESCRIPTION {
  max-width: 550px;
  margin: 0;

  color: #eeeeee;
  font-size: 16px;
  line-height: 1.8;
}

.RP-FLECHE {
  width: 90px;
  height: 90px;
  margin-top: 35px;
  padding: 0;

  border-radius: 50%;
  font-size: 45px;
  font-weight: 400;
}

.RP-FLECHE:focus-visible {
  outline-color: #ffffff;
}

@media (hover: hover) {
  .RP-PERSONNAGES:hover .RP-IMAGE {
    transform: scale(1.04);
  }

  .RP-FLECHE:hover {
    transform: translateX(4px);
  }
}


/* TABLETTES */

@media (max-width: 900px) {
  .entete-personnages {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .retour-personnages {
    grid-column: 1;
    grid-row: 1;
    margin-top: 0;
  }

  .logo-personnages {
    grid-column: 2;
    grid-row: 1;
  }

  .RECHERCHE-PERSONNAGES {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 0;
  }
}


/* TÉLÉPHONES */

@media (max-width: 600px) {
  .entete-personnages {
    padding-top: 20px;
  }

  .retour-personnages {
    min-width: 0;
    min-height: 52px;
    padding: 12px 22px;
    font-size: 15px;
  }

  .logo-personnages {
    width: 72px;
  }

  .RECHERCHE-CHAMP {
    min-height: 70px;
    padding: 0 18px;
    border-radius: 20px;
  }

  #recherche-personnage {
    font-size: 16px;
  }

  .filtres-personnages {
    margin-bottom: 28px;
  }

  .RP-SECTIONS,
  .RP-SECTIONS2 {
    padding-bottom: 48px;
  }

  .RP-PERSONNAGES {
    border-radius: 22px;
  }

  .RP-CONTENU {
    padding: 82px 30px 30px;
  }

  .RP-NUMERO {
    top: 26px;
    left: 30px;
    font-size: 10px;
    letter-spacing: 2px;
  }

  .RP-TITRE {
    font-size: clamp(32px, 8vw, 50px);
  }

  .RP-DESCRIPTION {
    font-size: 14px;
    line-height: 1.7;
  }

  .RP-FLECHE {
    width: 64px;
    height: 64px;
    margin-top: 28px;
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .calque-personnages,
  .RP-IMAGE,
  .retour-personnages,
  .filtre-personnages,
  .RP-FLECHE {
    transition: none;
  }
}



/* AMBIANCE MINÉRALE */

:root {
  --intensite-ambiance-personnages: 0.60;
}

html,
body,
#ambiance-personnages {
  background: #bac2cc;
}

#ambiance-personnages {
  isolation: isolate;
}

/* Mélange les couleurs des images avec le gris. */
.calque-personnages {
  mix-blend-mode: soft-light;

  filter:
    blur(95px)
    saturate(1.65)
    brightness(1.08);
}

/* Voile léger pour conserver une ambiance lumineuse. */
#ambiance-personnages::after {
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(230, 236, 244, 0.22),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(186, 194, 204, 0.05),
      rgba(186, 194, 204, 0.24)
    );
}


/* RECHERCHE EN VERRE GIVRÉ */

.RECHERCHE-CHAMP {
  background: rgba(239, 244, 250, 0.62);
  border-color: rgba(255, 255, 255, 0.65);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 40px rgba(35, 45, 60, 0.1);
}

#recherche-personnage::placeholder {
  color: #4d5867;
}


/* TEXTES LISIBLES SUR LE NOUVEAU FOND */

.RECHERCHE-LABEL,
.RECHERCHE-STATUT,
.RECHERCHE-VIDE {
  color: #303b49;
}