/* Structure et proportions reprises de societypublisherforum.net (Bootstrap 5 / Radix) ;
   la couleur d'accent (#176cab chez SPF) devient le violet du logo SCTOWGE. */
:root {
  --accent: #3f00ff;
  --accent-dark: #1a0069;
  --text: #212529;
  --footer-bar-bg: #463d3d;
  --footer-bar-text: #e2e0e0;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1rem; line-height: 1.5; color: var(--text); background: #fff;
}
a { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
main:focus { outline: none; }
.skip-link:focus { left: 8px; top: 8px; }

/* En-tête */
.site-header { background: var(--accent); background-image: linear-gradient(-38deg, var(--accent-dark) 44%, var(--accent) 60%); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: block; line-height: 0; }
.brand img { height: 64px; width: auto; display: block; }
.nav { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 8px 16px; color: #fff; text-decoration: none; }
.nav a:hover, .nav a:focus-visible { text-decoration: underline; outline-color: #fff; }

/* Contenu */
main .container { padding-left: 16px; padding-right: 16px; }
.intro { padding: 56px 0 24px; }
.intro .container { max-width: 820px; }
.intro h2 { margin: 0 0 28px; font-size: 1.5rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.intro h2 .accent { color: var(--accent); }
.notice { display: block; margin: 0; padding: 16px 20px; background: #f1edff; border-left: 6px solid var(--accent); font-size: 1.1rem; font-weight: 700; }

.band { padding: 64px 0; }
.band--tint { background: #f1edff; }
.band .icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: #f1edff; color: var(--accent); }
.band--tint .icon { background: #fff; }
.band h2 { margin: 0 0 24px; font-size: 2.074rem; line-height: 1.2; font-weight: 700; text-align: center; }
.band p { max-width: 760px; margin: 0 auto 16px; }
.band p:last-child { margin-bottom: 0; }
.band .callout { max-width: 760px; margin: 24px auto 0; padding: 16px 20px; background: #f1edff; border-left: 6px solid var(--accent); font-weight: 600; }
.band--tint .callout { background: #fff; }

.doc-card { width: 340px; max-width: 100%; margin: 32px auto 0; background: #fff; border-radius: 8px; box-shadow: 0 8px 16px rgba(0,0,0,.15); overflow: hidden; }
.doc-card__visual { display: flex; align-items: center; justify-content: center; height: 150px; background: linear-gradient(-38deg, var(--accent-dark) 44%, var(--accent) 60%); color: #fff; }
.doc-card__content { padding: 15px; }
.doc-card h3 { margin: 0 0 4px; font-size: 1.44rem; line-height: 1.2; font-weight: 700; }
.doc-card__edition { margin: 0 0 16px !important; max-width: none; color: #5a5f66; }
.doc-card__meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 20px; font-size: .95rem; }
.doc-card__meta dt { font-weight: 700; }
.doc-card__meta dd { margin: 0; }
.doc-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; max-width: none !important; }
.doc-card__link--primary { background: var(--accent); color: #fff !important; }
.doc-card__link--primary:hover, .doc-card__link--primary:focus-visible { background: var(--accent-dark); border-color: var(--accent-dark); }
.doc-card__link { display: inline-block; padding: 6px 12px; border: 1px solid var(--accent); border-radius: 4px; color: var(--accent); text-decoration: none; }
.doc-card__link:hover, .doc-card__link:focus-visible { background: var(--accent); color: #fff; }

/* Pied de page */
.site-footer { margin-top: 0; }
.footer__bottom { background: var(--footer-bar-bg); color: var(--footer-bar-text); padding: 32px 0; text-align: center; }

.footer__bottom p { margin: 0; }
.footer__bottom p + p { margin-top: 8px; }
.footer__bottom a { color: #fff; }

@media (max-width: 767px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .nav { flex-wrap: wrap; }
  .intro h2 { font-size: 1.35rem; }
  .band h2 { font-size: 1.6rem; }
  .brand img { height: 56px; max-width: 100%; }
}

/* Porte d'entrée (démo) */
.gate { display: none; }
html.locked .gate { display: flex; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; padding: 16px; background-color: var(--accent); background-image: linear-gradient(-38deg, var(--accent-dark) 44%, var(--accent) 60%); }
html.locked body { overflow: hidden; }
html.locked .skip-link, html.locked .site-header, html.locked main, html.locked .site-footer { display: none; }
.gate__box { width: 100%; max-width: 380px; padding: 32px 28px; background: #fff; border-radius: 8px; box-shadow: 0 8px 16px rgba(0,0,0,.25); }
.gate__logo { display: block; width: 190px; margin: 0 0 24px; background: var(--accent); padding: 8px 12px; border-radius: 4px; }
.gate__box h1 { margin: 0 0 8px; font-size: 1.44rem; line-height: 1.2; }
.gate__box p { margin: 0 0 16px; }
.gate__box label { display: block; margin-bottom: 4px; font-weight: 700; }
.gate__box input { width: 100%; padding: 8px 12px; font: inherit; border: 1px solid #adb5bd; border-radius: 4px; }
.gate__box input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.gate__error { margin: 8px 0 0 !important; color: #b00020; font-weight: 600; }
.gate__box button { margin-top: 16px; padding: 8px 16px; font: inherit; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 4px; cursor: pointer; }
.gate__box button:hover, .gate__box button:focus-visible { background: var(--accent-dark); border-color: var(--accent-dark); }
