/* Brick'n Collect : site public (brickncollect.setano.fr). Une seule feuille de style, aucune ressource externe.
   Couleurs de la marque (Docs/brand/brickncollect/README.md). L'or doux est réservé au PARFAIT du jeu :
   il ne figure jamais sur ce site. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --nuit: #253448;
  --blanc-chaud: #FBF6EE;
  --terracotta: #E28A6B;
  --ciel: #A9C9D8;
  --filet: rgba(169, 201, 216, 0.28);
  --a-remplir: #34465E;
  --gouttiere: 16px;
  --titres: "Fraunces", Georgia, "Times New Roman", serif;
  --texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--blanc-chaud);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Lien d'évitement, visible au clavier seulement */
.aller {
  position: absolute;
  left: var(--gouttiere);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--blanc-chaud);
  color: var(--nuit);
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}

.aller:focus {
  top: 0.75rem;
}

.cadre {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

/* En-tête */
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.entete .marque {
  display: block;
  width: 168px; /* taille minimale du logo avec les mots : 160 px */
  flex: none;
  border-radius: 4px;
}

.entete .marque img {
  width: 168px;
}

.entete--accueil {
  justify-content: flex-end;
}

.langue {
  font-weight: 600;
  white-space: nowrap;
}

/* Liens */
a {
  color: var(--blanc-chaud);
  text-decoration: underline;
  text-decoration-color: var(--terracotta);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--terracotta);
}

a:focus-visible {
  outline: 3px solid var(--ciel);
  outline-offset: 3px;
  border-radius: 2px;
}

.entete .marque:hover,
.entete .marque:focus-visible {
  color: inherit;
}

/* Accueil */
.accueil {
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.logo {
  margin: 0 auto;
  width: min(100%, 34rem);
  font-size: 1rem;
  line-height: 0;
}

.logo svg {
  width: 100%;
}

.signature {
  margin: 2rem auto 0;
  font-family: var(--titres);
  font-weight: 700;
  font-size: clamp(1.45rem, 1.05rem + 2vw, 2.3rem);
  line-height: 1.25;
}

.signature > span {
  display: block;
}

.signature .seg {
  display: inline-block;
  white-space: nowrap;
}

.accroche {
  margin: 2rem auto 0;
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.5;
  font-weight: 600;
}

.presentation {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: var(--ciel);
}

.bientot {
  margin: 2.25rem 0 0;
  color: var(--ciel);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.bientot::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin: 0 auto 0.9rem;
  background: var(--terracotta);
  border-radius: 2px;
}

/* Pages de texte */
.texte {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

h1,
h2 {
  font-family: var(--titres);
  line-height: 1.15;
  text-wrap: balance;
}

.texte h1 {
  margin: 1.5rem 0 0.75rem;
  font-weight: 900;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 2.8rem);
}

.texte h2 {
  margin: 2.5rem 0 0.6rem;
  font-weight: 700;
  font-size: 1.45rem;
}

.texte h3 {
  margin: 1.75rem 0 0.4rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.texte p,
.texte ul,
.texte dl {
  margin: 0 0 1rem;
}

.texte ul {
  padding-left: 1.25rem;
}

.texte li + li {
  margin-top: 0.35rem;
}

.texte strong {
  font-weight: 700;
}

.maj {
  color: var(--ciel);
}

.chapeau {
  font-size: 1.12rem;
}

.fiche {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--filet);
  border-radius: 10px;
}

.fiche dt {
  font-weight: 700;
  color: var(--ciel);
}

.fiche dd {
  margin: 0 0 0.75rem;
}

.fiche dd:last-child {
  margin-bottom: 0;
}

.chemin {
  font-weight: 600;
}

/* Bandeau « Brouillon à faire valider » */
.brouillon {
  margin: 0.5rem 0 1rem;
  padding: 0.85rem 1rem;
  background: var(--terracotta);
  color: var(--nuit);
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.45;
}

.brouillon strong {
  display: block;
  font-family: var(--titres);
  font-weight: 800;
  font-size: 1.15rem;
}

.brouillon p {
  margin: 0.25rem 0 0;
}

.brouillon a {
  color: var(--nuit);
  text-decoration-color: var(--nuit);
}

/* Texte à remplir avant publication : toujours visible */
.a-remplir {
  background: var(--a-remplir);
  color: var(--blanc-chaud);
  border: 1px dashed var(--terracotta);
  border-radius: 4px;
  padding: 0 0.3em;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Pied de page */
.pied {
  border-top: 1px solid var(--filet);
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  font-size: 0.95rem;
}

.pied ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pied a[aria-current="page"] {
  text-decoration-color: var(--ciel);
}

.pied p {
  margin: 1rem 0 0;
  color: var(--ciel);
}

/* Page introuvable */
.introuvable {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.introuvable .marque {
  display: block;
  width: 200px;
  margin: 0 auto;
}

.introuvable h1 {
  margin: 2rem 0 0.5rem;
  font-weight: 900;
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.4rem);
}

.introuvable h2 {
  margin: 2.5rem 0 0.5rem;
  font-weight: 900;
  font-size: clamp(1.4rem, 1.15rem + 1.4vw, 1.9rem);
}

.introuvable p {
  margin: 0.5rem 0;
}

@media (min-width: 720px) {
  .accueil {
    padding-top: 2.5rem;
  }

  .signature {
    margin-top: 2.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 0.15s ease;
  }
}
