/* =====================================================================
   Site de la guilde : pages publiques (index.html) et gestion (gestion.html)
   Thème « bleu nuit » (celui des plaques de rue parisiennes) : texte crème,
   bleu et rouge. L'accent aigu penché de « Déglingue » revient en motif
   (puces, logo, bandeau).
   ===================================================================== */

:root {
  --fond: #141b33;
  --surface: #1a2340;
  --surface-2: #222c4c;
  --bord: #28325a;
  --bord-fort: #39446e;
  --bord-survol: #56628f;
  --texte: #f3ede1;
  --texte-doux: #cbc7c2;
  --attenue: #a9afc6;
  --faible: #767d9b;
  --bleu: #4a63f0;
  --rouge: #ff5b45;
  --accent: var(--bleu); /* Alliance par défaut */
  --accent-2: var(--rouge);
  --accent-texte: #fbf8f2;
  --accent-2-texte: var(--fond);
  --danger: #ff7a6b;
  --succes: #4fc386;

  --rayon: 16px;
  --rayon-petit: 10px;
  --largeur: 1080px;
  --hauteur-barre: 61px;

  --police: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --titre: 'Bagel Fat One', 'Bricolage Grotesque', ui-rounded, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --ressort: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: dark;
}

body[data-faction='horde'] {
  --accent: var(--rouge);
  --accent-2: var(--bleu);
  --accent-texte: var(--fond);
  --accent-2-texte: #fbf8f2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background: var(--fond);
  color: var(--texte);
  font: 400 16px/1.55 var(--police);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-texte);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 16px;
  font-weight: 700;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mono {
  font-family: var(--mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.attenue {
  color: var(--attenue);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Barre du haut et onglets
   --------------------------------------------------------------------- */

.barre {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord);
}

.barre__interieur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.marque {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 400 19px/1 var(--titre);
  text-decoration: none;
  white-space: nowrap;
}

.marque img {
  transition: rotate 0.35s var(--ressort);
}

.marque:hover img {
  rotate: -14deg;
}

.marque__tag {
  font: 600 12px/1 var(--police);
  color: var(--attenue);
  padding: 4px 8px;
  border: 1px solid var(--bord-fort);
  border-radius: 99px;
}

.onglets {
  display: flex;
  gap: 4px;
  height: 100%;
  flex: 1;
}

.onglets a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--attenue);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.15s;
}

.onglets a:hover {
  color: var(--texte);
}

.onglets a[aria-current='page'] {
  color: var(--texte);
}

/* Soulignement de l'onglet actif, un poil de travers */
.onglets a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 13px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  rotate: -2deg;
}

.compte {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--attenue);
  background: var(--surface-2);
  border-radius: 99px;
  padding: 0 6px;
}

.compte:empty {
  display: none;
}

.moi {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  white-space: nowrap;
}

.moi img {
  border-radius: 50%;
}

@media (max-width: 720px) {
  .barre__interieur {
    height: auto;
    flex-wrap: wrap;
    row-gap: 0;
    padding: 0 16px;
  }

  .marque {
    height: 52px;
    flex: 1;
  }

  .onglets {
    order: 3;
    flex-basis: 100%;
    height: 44px;
    margin: 0 -12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .onglets a[aria-current='page']::after {
    bottom: 6px;
  }

  .moi span {
    display: none;
  }
}

/* ---------------------------------------------------------------------
   Mise en page
   --------------------------------------------------------------------- */

.page {
  flex: 1;
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.vue--etroite {
  max-width: 640px;
}

.vue__entete {
  margin-bottom: 32px;
}

.vue__entete p {
  margin-top: 12px;
  font-size: 17px;
  color: var(--attenue);
  max-width: 60ch;
}

.vue__entete--ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  padding: 28px 24px;
  font-size: 13px;
  color: var(--faible);
  border-top: 1px solid var(--bord);
}

@media (max-width: 720px) {
  .page {
    padding: 36px 16px 56px;
  }

  h1 {
    font-size: 34px;
  }
}

.carte {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 24px;
}

.carte__titre {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.grille-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 720px) {
  .grille-2 {
    grid-template-columns: 1fr;
  }

  .carte {
    padding: 20px;
  }
}

/* ---------------------------------------------------------------------
   Boutons et liens
   --------------------------------------------------------------------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 99px;
  border: 1px solid var(--bord-fort);
  background: var(--surface);
  color: var(--texte);
  font: 600 14.5px/1 var(--police);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, filter 0.15s, rotate 0.3s var(--ressort);
}

.bouton:hover {
  border-color: var(--texte);
}

.bouton:disabled {
  opacity: 0.55;
  cursor: progress;
}

.bouton--principal {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-texte);
}

/* Le bouton principal se déglingue un peu au survol */
.bouton--principal:hover {
  border-color: var(--accent);
  filter: brightness(1.1);
  rotate: -2deg;
}

.bouton--discret {
  background: transparent;
}

.bouton--danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  color: var(--danger);
}

.bouton--danger:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-color: var(--danger);
}

.bouton--petit {
  height: 32px;
  padding: 0 13px;
  font-size: 13px;
}

.bouton--grand {
  height: 50px;
  padding: 0 26px;
  font-size: 16px;
}

.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--attenue);
  text-decoration: none;
  white-space: nowrap;
}

.lien-fleche::after {
  content: '→';
  transition: translate 0.2s var(--ressort);
}

.lien-fleche:hover {
  color: var(--texte);
}

.lien-fleche:hover::after {
  translate: 3px 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Icône de classe ou de spécialisation */
.icone-classe {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1);
}

/* Couleur de classe, si l'icône est introuvable */
.point {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--classe);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.25);
}

/* ---------------------------------------------------------------------
   Accueil : grand titre déglingué
   --------------------------------------------------------------------- */

.vue--accueil {
  margin-top: -56px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - var(--hauteur-barre) - 104px);
  padding: 48px 0 72px;
  text-align: center;
}

.hero__surtitre {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--attenue);
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 99px;
}

.hero__surtitre:empty {
  visibility: hidden;
}

.hero__surtitre::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faible);
}

.hero__surtitre[data-ouvert='true']::before {
  background: var(--succes);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--succes) 20%, transparent);
}

.hero__titre {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 36px auto 0;
}

.titre-deglingue {
  font: 400 clamp(64px, 12vw, 172px) / 1 var(--titre);
  letter-spacing: -0.01em;
  text-shadow: 0.035em 0.035em 0 var(--accent);
  overflow-wrap: normal;
}

.titre__mot {
  display: inline-block;
  white-space: nowrap;
}

.titre__lettre {
  position: relative;
  display: inline-block;
  rotate: var(--r);
  translate: 0 var(--y);
  transition: rotate 0.4s var(--ressort), translate 0.4s var(--ressort);
  animation: tombe 0.75s var(--ressort) backwards;
  animation-delay: calc(var(--i) * 50ms + 120ms);
}

.titre__lettre:hover {
  rotate: calc(var(--r) * -2.5);
  translate: 0 calc(var(--y) - 0.07em);
}

@keyframes tombe {
  from {
    opacity: 0;
    translate: 0 -0.6em;
    rotate: calc(var(--r) * 5);
  }
}

/* L'accent aigu du « é », dévissé, qui ballotte */
.titre__accent {
  position: absolute;
  left: 0.25em;
  top: -0.07em;
  width: 0.13em;
  height: 0.3em;
  border-radius: 0.07em;
  background: var(--accent-2);
  box-shadow: 0.035em 0.035em 0 var(--accent);
  transform-origin: 50% 100%;
  rotate: 24deg;
  animation: ballotte 2.4s ease-in-out 1.4s infinite alternate;
}

@keyframes ballotte {
  to {
    rotate: 46deg;
  }
}

/* Étiquette collée en biais sur le titre */
.etiquette {
  position: absolute;
  top: 2%;
  right: -3%;
  padding: 9px 14px 10px;
  font: 800 14px/1 var(--police);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent-2-texte);
  background: var(--accent-2);
  border-radius: 8px;
  rotate: 8deg;
  animation: colle 0.5s var(--ressort) 1.1s backwards;
}

@keyframes colle {
  from {
    opacity: 0;
    scale: 1.8;
    rotate: -12deg;
  }
}

.hero__texte {
  max-width: 54ch;
  margin: 44px auto 32px;
  font-size: 18px;
  color: var(--attenue);
  text-wrap: balance;
}

.hero .actions {
  justify-content: center;
}

.hero__renvoi {
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--faible);
}

/* Bandeau qui défile sous le titre (décoratif : tout est repris plus bas) */
.bandeau {
  width: 106vw;
  margin-left: calc(50% - 53vw);
  padding: 15px 0;
  overflow: hidden;
  background: var(--texte);
  color: var(--fond);
  rotate: -1.5deg;
}

.bandeau__piste {
  display: flex;
  width: max-content;
  animation: defile 50s linear infinite;
}

.bandeau__groupe {
  display: flex;
}

.bandeau__element {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding-right: 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.bandeau__element::after {
  content: '';
  width: 5px;
  height: 15px;
  border-radius: 3px;
  background: var(--accent-2);
  rotate: 34deg;
}

@keyframes defile {
  to {
    translate: -50% 0;
  }
}

.accueil__suite {
  margin-top: 80px;
}

@media (max-width: 720px) {
  .vue--accueil {
    margin-top: -36px;
  }

  .hero {
    min-height: 0;
    padding: 40px 0 56px;
  }

  .hero__titre {
    margin-top: 32px;
  }

  .titre-deglingue {
    font-size: clamp(52px, 21vw, 120px);
  }

  .etiquette {
    top: -18px;
    right: -4px;
    font-size: 12px;
    padding: 7px 11px 8px;
  }

  .hero__texte {
    font-size: 16.5px;
    margin-top: 28px;
  }

  .accueil__suite {
    margin-top: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .titre__lettre,
  .titre__accent,
  .etiquette,
  .bandeau__piste {
    animation: none;
  }
}

/* Horaires présentés comme un menu de brasserie */
.horaires {
  list-style: none;
  margin: 0;
  padding: 0;
}

.horaires li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--bord);
}

.horaires li:first-child {
  border-top: 0;
  padding-top: 0;
}

.horaires li:last-child {
  padding-bottom: 0;
}

.horaires li::before {
  content: '';
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-bottom: 0.4em;
  border-bottom: 2px dotted var(--bord-fort);
}

.horaires__jour {
  grid-column: 1;
  grid-row: 1;
  font-size: 17px;
  font-weight: 700;
}

.horaires .mono {
  grid-column: 3;
  grid-row: 1;
}

.horaires .attenue {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 14px;
}

.jetons {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jetons li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 14px 4px 7px;
  font-size: 15px;
  font-weight: 600;
  background: var(--fond);
  border: 1px solid var(--bord);
  border-radius: 99px;
}

.jetons li .icone-classe {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.jetons li .attenue {
  font-size: 13px;
  font-weight: 400;
}

.jetons li.attenue {
  border: 0;
  padding: 0;
  background: none;
  font-weight: 400;
}

/* ---------------------------------------------------------------------
   Recrutement
   --------------------------------------------------------------------- */

.segmente {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 16px;
  background: var(--surface-2);
  border-radius: 99px;
}

.segmente button {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--attenue);
  font: 600 13.5px/1 var(--police);
  cursor: pointer;
}

.segmente button:hover {
  color: var(--texte);
}

.segmente button[aria-checked='true'] {
  background: var(--surface);
  color: var(--texte);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 0 0 1px var(--bord-fort);
}

.lignes {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
}

.ligne {
  display: grid;
  grid-template-columns: 180px 1fr 150px auto;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 10px 20px;
  border-top: 1px solid var(--bord);
}

.ligne:first-child {
  border-top: 0;
}

.ligne__nom {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.ligne__roles {
  font-size: 14.5px;
  color: var(--attenue);
}

/* Spécialisations d'une classe et leur besoin : recherchées en clair, fermées barrées */
.specs-public {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.spe-puce {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.spe-puce .icone-classe {
  width: 18px;
  height: 18px;
}

.spe-puce--haute {
  color: var(--texte);
  font-weight: 600;
}

.spe-puce--haute::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.spe-puce--ferme {
  color: var(--faible);
  text-decoration: line-through;
}

.spe-puce--ferme .icone-classe {
  opacity: 0.4;
  filter: grayscale(1);
}

.statut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--attenue);
}

.statut::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faible);
}

.ligne--haute .statut {
  color: var(--texte);
}

.ligne--haute .statut::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.ligne--moyenne .statut::before {
  background: var(--attenue);
}

.ligne--basse .statut::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--faible);
}

.ligne--ferme {
  color: var(--faible);
}

.ligne--ferme .ligne__roles,
.ligne--ferme .statut,
.ligne--ferme .lien-fleche {
  color: var(--faible);
}

@media (max-width: 720px) {
  .ligne {
    grid-template-columns: 1fr auto;
    row-gap: 6px;
    padding: 14px 16px;
  }

  .ligne__roles {
    grid-row: 2;
  }

  .statut {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .ligne .lien-fleche {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

/* Édition (page de gestion) */
.lignes--edition .ligne {
  display: block;
}

.lignes--edition .ligne__nom {
  flex-direction: row;
  align-items: center;
  font-size: 16px;
}

.lignes--edition .ligne__nom select {
  margin-left: auto;
  width: 200px;
}

.lignes--edition .specs {
  list-style: none;
  margin: 6px 0 2px;
  padding: 0 0 0 32px;
}

.spe {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 400;
}

.spe .icone-classe {
  width: 18px;
  height: 18px;
}

.spe__role {
  font-size: 13px;
  color: var(--faible);
}

.spe select {
  margin-left: auto;
  width: 200px;
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .lignes--edition .specs {
    padding-left: 0;
  }

  .lignes--edition .ligne__nom select,
  .spe select {
    width: 160px;
  }
}

.enregistrer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

/* ---------------------------------------------------------------------
   Règlement
   --------------------------------------------------------------------- */

.prose {
  max-width: 680px;
  font-size: 16.5px;
  color: var(--texte-doux);
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--texte);
}

.prose > p:first-child {
  font-size: 19px;
  color: var(--attenue);
}

.prose p {
  margin: 12px 0;
}

.prose ul {
  margin: 0;
  padding-left: 26px;
  list-style: none;
}

/* Puces en accent aigu */
.prose li {
  position: relative;
  margin: 10px 0;
}

.prose li::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 0.42em;
  width: 4px;
  height: 11px;
  border-radius: 2px;
  background: var(--accent-2);
  rotate: 34deg;
}

.prose strong {
  color: var(--texte);
  font-weight: 700;
}

.prose em {
  color: var(--attenue);
}

/* ---------------------------------------------------------------------
   Formulaires
   --------------------------------------------------------------------- */

.formulaire fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.formulaire fieldset,
.formulaire > label,
.champ {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.champs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
}

.champ-large {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .champs {
    grid-template-columns: 1fr;
  }
}

label,
.champ {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
}

.champ__libelle {
  font-size: 14.5px;
  font-weight: 600;
}

label small,
small {
  font-size: 13px;
  font-weight: 400;
  color: var(--faible);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon-petit);
  background: var(--surface);
  color: var(--texte);
  font: 400 15.5px/1.4 var(--police);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: var(--faible);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--bord-survol);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

select {
  appearance: none;
  padding-right: 36px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23a9afc6' stroke-width='1.5'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 13px center;
  cursor: pointer;
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type='date'],
input[type='time'] {
  color-scheme: dark;
}

/* Jours de disponibilité */
.jours {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.puce {
  position: relative;
  display: block;
}

.puce input {
  position: absolute;
  opacity: 0;
  inset: 0;
  min-height: 0;
  cursor: pointer;
}

.puce span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon-petit);
  background: var(--surface);
  color: var(--attenue);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s, rotate 0.3s var(--ressort);
}

.puce:hover span {
  border-color: var(--bord-survol);
  color: var(--texte);
}

.puce input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-texte);
  rotate: -3deg;
}

.puce input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Case à cocher */
.case {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  color: var(--attenue);
  cursor: pointer;
}

.case input {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--accent);
}

.case a {
  color: var(--texte);
}

.note {
  font-size: 13.5px;
  color: #f2c46d;
  padding: 10px 13px;
  border-radius: var(--rayon-petit);
  background: rgb(242 196 109 / 0.08);
  border: 1px solid rgb(242 196 109 / 0.28);
}

.message {
  margin-top: 20px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  border-radius: var(--rayon-petit);
}

.page > .message {
  margin: 0 0 24px;
}

.formulaire__pied {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--bord);
}

.piege {
  position: absolute;
  left: -9999px;
}

/* Étapes de la candidature */
.etapes {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.etapes li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 3px solid var(--bord);
  font-size: 14px;
  font-weight: 600;
  color: var(--faible);
}

.etapes span {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 12px;
  font-weight: 700;
}

.etapes li.faite {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--attenue);
}

.etapes li[aria-current='step'] {
  border-color: var(--accent);
  color: var(--texte);
}

.etapes li[aria-current='step'] span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-texte);
}

.succes {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
}

.succes h2 {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.succes h2::before {
  content: '✓';
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 12px;
  border-radius: 50%;
  font-size: 15px;
  color: var(--surface);
  background: var(--succes);
  rotate: -8deg;
}

.succes p {
  color: var(--attenue);
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------------
   Gestion : raids
   --------------------------------------------------------------------- */

.maitre-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 800px) {
  .maitre-detail {
    grid-template-columns: 1fr;
  }
}

.liste-raids {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ligne-raid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 13px 16px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-petit);
  color: var(--texte);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ligne-raid:hover {
  border-color: var(--bord-fort);
}

.ligne-raid.actif {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ligne-raid__nom {
  font-weight: 700;
}

.ligne-raid__date {
  grid-row: 2;
  font-size: 13.5px;
  color: var(--attenue);
  text-transform: capitalize;
}

.ligne-raid__places {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--attenue);
}

.vide {
  padding: 32px 16px;
  text-align: center;
  color: var(--faible);
  border: 1.5px dashed var(--bord-fort);
  border-radius: var(--rayon);
}

.panneau {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panneau__titre {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panneau__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--bord);
}

.panneau__actions .bouton--danger {
  margin-left: auto;
}

.panneau .formulaire__pied {
  margin-top: 0;
}

.pastilles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.pastille {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--attenue);
  border: 1px solid var(--bord-fort);
  border-radius: 99px;
}

.pastille--active {
  color: var(--texte);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.infos {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  margin: 0 0 16px;
  font-size: 14.5px;
}

.infos dt {
  color: var(--attenue);
}

.infos dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.infos dd:first-of-type::first-letter {
  text-transform: uppercase;
}

.description {
  margin-bottom: 16px;
  padding: 12px 14px;
  font-size: 14.5px;
  white-space: pre-line;
  background: var(--fond);
  border-radius: var(--rayon-petit);
  color: var(--texte-doux);
}

/* Boîte de dialogue */
dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  background: var(--surface);
  color: var(--texte);
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon);
  box-shadow: 0 24px 60px -12px rgb(0 0 0 / 0.5);
}

dialog::backdrop {
  background: rgb(8 11 22 / 0.65);
}

dialog form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

dialog h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

dialog .formulaire__pied {
  margin-top: 8px;
  padding-top: 0;
  border: 0;
}

.panneau__actions:empty {
  display: none;
}

.ligne--ferme .icone-classe {
  opacity: 0.4;
  filter: grayscale(1);
}
