/* Direction suisse : grille nette, hiérarchie typographique et accents rouges.
   Helvetica est utilisée si disponible, sans distribuer de police propriétaire. */
:root {
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Frutiger, Arial, sans-serif;
  color: #171717;
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --red: #c9141c;
  --line: #d6d6d6;
  --muted: #535353;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

button, input {
  font: inherit;
}

/* Diagnostic réservé à l'administrateur : texte complet et états sans couleur seule. */
.admin-tool { border-top: 1px solid var(--line); padding: 24px 0; }
.key-check { max-width: 800px; overflow-wrap: anywhere; }
.key-result { margin: 24px 0; padding: 20px; background: #f3f3f3; border-left: 3px solid #666; }
.key-result-success { border-left-color: #23713b; }
.key-result h2 { margin-top: 0; }
.key-meta { color: var(--muted); font-size: 14px; line-height: 1.6; }
.primary-link:disabled { background: #666; cursor: not-allowed; }

/* Les données d'identité restent entières. Sur mobile, chaque ligne devient
   une fiche lisible sans défilement horizontal ni ellipses. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.user-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 30px 0; }
.user-filters label { display: block; margin-bottom: 8px; font-weight: 600; }
.user-filters input, .user-filters select { min-height: 48px; padding: 10px 12px; border: 1px solid #777; border-radius: 0; background: white; color: var(--ink); font: inherit; max-width: 100%; }
.user-filters input { width: 300px; }
.user-filters select { min-width: 150px; }
.user-filters .primary-link { margin-top: 0; }
.user-filters a { align-self: center; }
.user-total { font-weight: 600; }
.users-table { border-collapse: collapse; width: 100%; table-layout: fixed; margin: 24px 0; font-size: 15px; }
.users-table th, .users-table td { text-align: left; padding: 18px 12px; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; line-height: 1.5; }
.users-table th { font-size: 13px; color: var(--muted); }
.users-table th:first-child { width: 32%; }
.users-table th:last-child { width: 9%; }
.user-email { display: block; margin-top: 5px; }
.user-badge { display: inline-block; padding: 3px 8px; background: #e9f2eb; color: #245d32; font-size: 13px; }
.user-badge-suspended { background: #fcebec; color: #9d1426; }
.user-pagination { display: flex; flex-wrap: wrap; gap: 16px 24px; margin: 24px 0; }
.user-detail { max-width: 850px; overflow-wrap: anywhere; }
.user-detail .account-fields { margin-bottom: 30px; }
.user-detail h1 { overflow-wrap: anywhere; }
.user-history { margin-top: 40px; }
.user-history li { margin-block: 12px; line-height: 1.5; }
@media (max-width: 780px) {
  .user-filters { align-items: stretch; }
  .user-filters > div { width: 100%; }
  .user-filters input, .user-filters select { width: 100%; }
  .users-table, .users-table tbody, .users-table tr { display: block; }
  .users-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .users-table tr { border-top: 1px solid var(--line); margin-bottom: 20px; padding-block: 8px; }
  .users-table td { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; border: 0; padding: 8px 0; }
  .users-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  .user-badge { justify-self: start; }
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid #225ba8;
  outline-offset: 5px;
}

button {
  cursor: pointer;
}

.wrap {
  width: min(1220px, 100%);
  padding-inline: 48px;
  margin-inline: auto;
}

.top-line {
  height: 5px;
  background: var(--red);
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  background: #fff;
  padding: 15px;
  z-index: 10;
}

.skip-link:focus {
  top: 10px;
}

.site-header {
  min-height: 133px;
  padding-block: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 17px;
  text-decoration: none;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1px;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  /* Le cartouche détache la coche ouverte du blanc de la page.
     content-box conserve la taille du dessin quand on ajoute sa marge. */
  box-sizing: content-box;
  width: 40px;
  height: 48px;
  padding: 7px;
  border: 1px solid #c8c8c8;
  background: #f3f3f3;
}

/* Les deux mots partagent le même corps, conformément à la dernière demande. */
.brand-wordline {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

/* Couleurs du titre demandées : préfixe noir et nom dans le rouge du site. */
.brand-prefix {
  color: #000;
}

.brand-wordline strong {
  color: var(--red);
}

.brand-prefix, .brand-wordline strong {
  font-size: 34px;
  font-weight: 700;
}

.wordmark small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .2px;
  margin-top: 7px;
  color: var(--muted);
}

.nav-link {
  display: inline-flex;
  gap: 25px;
  align-items: center;
  padding: 14px 0 14px 16px;
  text-decoration: none;
  font-size: 15px;
}

.nav-link:hover {
  color: var(--red);
}

/* Le lien privé ajoute une entrée : la navigation peut revenir à la ligne
   sans réduire le logo ni tronquer les intitulés. */
.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.admin-link {
  padding-left: 0;
}

.admin-link[aria-current="page"] {
  color: var(--red);
  text-decoration: underline;
}

.admin-content {
  padding-block: 45px 75px;
}

.admin-content h1 {
  font-size: clamp(36px, 4.8vw, 57px);
  letter-spacing: -1.8px;
}

.admin-overview {
  display: grid;
  grid-template-columns: .8fr 1.3fr 1fr;
  gap: 32px;
  margin-block: 36px;
}

.admin-overview > div {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  min-width: 0;
}

.admin-overview dt {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 15px;
}

.admin-overview dd {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-count dd {
  font-size: 52px;
  line-height: 1;
  font-weight: 500;
}

main {
  flex: 1;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 36px;
}

.red-rule {
  width: 24px;
  height: 3px;
  background: var(--red);
  flex: 0 0 auto;
}

.hero {
  padding-block: 68px 65px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 90px;
}

h1 {
  font-size: clamp(42px, 5.5vw, 70px);
  font-weight: 500;
  letter-spacing: -2.8px;
  line-height: 1.04;
  margin: 0 0 30px;
  overflow-wrap: anywhere;
}

h2 {
  font-weight: 500;
}

.lead {
  font-size: 20px;
  line-height: 1.6;
  max-width: 555px;
  color: var(--muted);
  margin: 0 0 31px;
}

.primary-link {
  display: inline-flex;
  gap: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 21px;
  color: white;
  background: var(--red);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  min-height: 54px;
}

.primary-link:hover {
  background: #a30f16;
}

.project-note {
  border-left: 1px solid var(--line);
  padding-left: 35px;
  padding-top: 3px;
}

.note-number {
  font-size: 12px;
  color: var(--red);
}

.project-note h2 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.7px;
  margin: 22px 0;
}

.project-note p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.availability {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 13px !important;
}

.availability span {
  background: var(--red);
  width: 5px;
  height: 5px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  border-top: 1px solid var(--line);
  padding-block: 28px 55px;
}

.item-number {
  color: var(--red);
  font-size: 12px;
}

.principles h2 {
  margin: 12px 0 10px;
  font-size: 22px;
}

.principles p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
  margin: 0;
  max-width: 290px;
}

.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-block: 25px;
  font-size: 13px;
  color: var(--muted);
}

.footer-separator {
  margin-inline: 12px;
  color: #a0a0a0;
}

.breadcrumb {
  display: flex;
  gap: 15px;
  padding-block: 23px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb a {
  text-decoration: none;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 85px;
  padding-block: 57px 100px;
}

.auth-heading h1 {
  font-size: clamp(42px,4.3vw,56px);
  letter-spacing: -2px;
}

.auth-panel {
  border-top: 3px solid var(--red);
  padding-top: 26px;
}

.auth-panel h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 18px;
}

.auth-panel p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 4px;
  padding: 14px 18px;
  width: 100%;
  min-height: 50px;
  font-size: 16px;
  font-weight: 500;
  margin-top: 28px;
}

.google-button:hover {
  background: #f4f4f4;
}

.google-button img {
  flex-shrink: 0;
}

.auth-details {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 15px;
}

.auth-details h3 {
  font-size: 16px;
  font-weight: 600;
}

.auth-details p, .auth-details a {
  font-size: 14px;
}

.auth-details a {
  display: inline-block;
  margin-top: 6px;
}

.notice {
  background: #f4f4f4;
  border-left: 3px solid #747474;
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.6;
  margin-block: 26px;
}

.notice p {
  margin: 7px 0 0;
}

.success {
  background: #eef5ef;
  padding: 18px 20px;
  border-left: 3px solid #2d643d;
}

.account-content, .prose {
  max-width: 790px;
  padding-block: 46px 75px;
}

.account-content h1, .prose h1 {
  font-size: clamp(36px,4.8vw,57px);
  letter-spacing: -1.8px;
}

.account-fields {
  margin-block: 35px;
}

.account-fields div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-block: 20px;
}

.account-fields dt {
  color: var(--muted);
}

.account-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.secondary-button {
  background: #fff;
  color: #171717;
  border: 1px solid #747474;
  padding: 14px 22px;
  min-height: 48px;
}

.secondary-button:hover {
  background: #f4f4f4;
}

.prose h2 {
  font-size: 23px;
  margin-top: 36px;
}

.prose p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
}

.error-page {
  padding-block: 90px;
}

/* Les contenus restent entiers en petit écran et à fort grossissement. */
@media (max-width: 780px) {
  .site-nav {
    gap: 8px 20px;
  }
  .admin-overview {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .wrap {
    padding-inline: 25px;
  }
  .site-header {
    min-height: 111px;
    padding-block: 20px;
    gap: 12px;
  }
  .wordmark {
    font-size: 24px;
    gap: 12px;
  }
  .brand-mark {
    width: 33px;
    height: 40px;
    padding: 5px;
  }
  .brand-prefix, .brand-wordline strong {
    font-size: 28px;
  }
  .wordmark small {
    font-size: 11px;
    letter-spacing: 0;
  }
  .nav-link {
    gap: 10px;
    font-size: 14px;
    padding-left: 0;
  }
  .hero {
    padding-block: 44px;
  }
  .hero-grid, .auth-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  h1 {
    font-size: clamp(40px,8.8vw,65px);
    letter-spacing: -1.9px;
  }
  .lead {
    font-size: 18px;
  }
  .section-label {
    margin-bottom: 25px;
  }
  .project-note {
    padding-left: 20px;
  }
  .project-note h2 {
    font-size: 25px;
    margin-block: 13px;
  }
  .project-note h2 br {
    display: none;
  }
  .project-note p {
    max-width: 470px;
  }
  .principles {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .principles article {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 8px 16px;
  }
  .principles h2 {
    margin: 0;
  }
  .principles p {
    grid-column: 2;
    max-width: none;
  }
  .item-number {
    padding-top: 6px;
  }
  .auth-layout {
    padding-block: 27px 60px;
  }
  .auth-heading h1 {
    font-size: 43px;
  }
  .account-fields div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Le cartouche ajoute de la largeur : anticiper le retour de la navigation
   préserve les espacements et le nom complet sur les petits écrans. */
@media (max-width: 420px) {
  .site-header {
    flex-wrap: wrap;
    padding-block: 20px;
  }
  .nav-link {
    padding-block: 8px;
  }
}
