/* Sécurité : hero braise avec le plan de la frontière (quatre zones à survoler),
   trois règles, permissions une par une, certificats et statuts, fin de page.
   Maquette : confiance-securite. Colonnes alignées sur le logo du header. */

/* ---------- Conteneur (même que le header) ---------- */

.se-w {
  box-sizing: border-box;
  max-width: var(--ps-container);
  margin: 0 auto;
  padding-right: var(--ps-gutter);
  padding-left: var(--ps-gutter);
}

/* ---------- Hero ---------- */

.se-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 96px;
}

.se-hero-copy {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.ps-page .se-h1 {
  max-width: 11em;
  color: #fff;
  font-size: clamp(48px, 6vw, 100px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.06em;
}

.ps-page .se-lead {
  max-width: 34em;
  color: var(--ps-muted-dark);
  font-size: var(--ps-lead-size);
  line-height: 1.55;
}

.se-scene-col {
  flex: 1 1 560px;
  min-width: 0;
}

.se-scene {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

/* Plan dessiné à 640 px, mis à l'échelle de sa colonne par security.js (--se-scale). */
.se-board {
  position: relative;
  zoom: var(--se-scale, 1);
  width: 640px;
  height: 420px;
  margin: 0 auto;
  border: 1px solid rgba(255, 138, 76, 0.25);
  border-radius: 12px;
  background: radial-gradient(ellipse 70% 60% at 35% 50%, rgba(244, 81, 30, 0.12), transparent 70%);
}

.se-zone {
  position: absolute;
  top: 40px;
  left: 24px;
  width: 420px;
  height: 340px;
  border: 2px dashed var(--ps-orange-light);
  border-radius: 18px;
  box-shadow: inset 0 0 50px rgba(255, 138, 61, 0.12);
}

.se-zone-label {
  position: absolute;
  top: -11px;
  left: 14px;
  padding: 0 8px;
  background: var(--ps-ember);
  color: var(--ps-orange-light);
  font-family: var(--ps-font-mono);
  font-size: 11px;
}

.se-n {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
  width: 150px;
  padding: 12px 14px;
  border: 1.5px solid rgba(255, 138, 76, 0.3);
  border-radius: 12px;
  background: var(--ps-ink);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s var(--ps-ease);
}

.se-n[aria-pressed="true"] {
  border-color: var(--ps-orange-light);
}

.se-n:hover,
.se-n:focus-visible {
  transform: translateY(-3px);
}

.se-n b {
  font-size: 15px;
}

.se-n span {
  color: var(--ps-peach);
  font-family: var(--ps-font-mono);
  font-size: 11px;
}

/* Grille 2 × 2 centrée dans la zone (24 → 444 px, 40 → 380 px). */
.se-n0 { top: 136px; left: 74px; }
.se-n1 { top: 216px; left: 74px; }
.se-n2 { top: 136px; left: 244px; }
.se-n3 { top: 216px; left: 244px; }

.se-out {
  position: absolute;
  top: 60px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 140px;
  text-align: center;
}

.se-out-label {
  color: var(--ps-faint-dark);
  font-family: var(--ps-font-mono);
  font-size: 11px;
}

.se-out-box {
  padding: 10px;
  border: 1px solid rgba(255, 211, 189, 0.3);
  border-radius: 10px;
  color: var(--ps-muted-dark);
  font-size: 12px;
}

/* Le paquet part du centre de la zone vers « Serveurs ProvSeal » et s'arrête sur la frontière (x = 444). */
.se-pk {
  position: absolute;
  top: 98px;
  left: 234px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ps-orange-light);
  box-shadow: 0 0 12px 3px rgba(255, 138, 61, 0.7);
  animation: se-pk 3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.se-x {
  position: absolute;
  top: 89px;
  left: 429px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #ef6f88;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  animation: se-x 3s ease infinite;
}

/* « aucun envoi » centré sous la croix, sur la frontière (fond braise pour couper le pointillé). */
.se-none {
  position: absolute;
  top: 124px;
  left: 444px;
  padding: 2px 6px;
  background: var(--ps-ember);
  white-space: nowrap;
  transform: translateX(-50%);
  color: #f6a3b3;
  font-family: var(--ps-font-mono);
  font-size: 10px;
  text-align: center;
}

.se-lists {
  position: absolute;
  right: 22px;
  bottom: 60px;
  box-sizing: border-box;
  width: 140px;
  padding: 10px;
  border: 1px solid rgba(110, 231, 183, 0.4);
  border-radius: 10px;
  color: #d1fae5;
  font-size: 12px;
  text-align: center;
}

.se-lists span {
  color: #6ee7b7;
  font-family: var(--ps-font-mono);
  font-size: 10px;
}

/* Synchronisation des listes : le point vert entre dans la zone depuis la carte. */
.se-in {
  position: absolute;
  top: 307px;
  left: 466px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px 2px rgba(52, 211, 153, 0.6);
  animation: se-in 4s ease-in-out infinite;
}

.se-caption {
  min-height: 48px;
  margin-top: 16px;
}

.ps-page .se-caption p {
  color: var(--ps-muted-dark);
  font-size: 14px;
}

.se-caption b {
  color: #fff;
}

@keyframes se-pk {
  0% { opacity: 0; transform: translateX(0); }
  15% { opacity: 1; }
  55% { opacity: 1; transform: translateX(190px); }
  62% { opacity: 0; transform: translateX(196px); }
  100% { opacity: 0; }
}

@keyframes se-x {
  0%, 50% { opacity: 0; transform: scale(1.8); }
  56%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

@keyframes se-in {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  70% { opacity: 1; transform: translateX(-80px); }
  85%, 100% { opacity: 0; transform: translateX(-88px); }
}

/* ---------- Titres : titre de section, puis sous-titre juste en dessous ---------- */

.se-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.ps-page .f-dark .se-h2 {
  color: #fff;
}

.ps-page main .se-sub {
  max-width: 34em;
  color: var(--ps-muted-light);
}

.ps-page main .f-dark .se-sub {
  color: #d7c3b8;
}

.ps-page .se-h3 {
  color: var(--ps-ink);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* ---------- Trois règles (sans numéros : ce n'est pas une suite d'étapes) ---------- */

.se-rules {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e3cfc4;
  list-style: none;
}

/* Une ligne par règle : le titre à gauche, son texte en face, toutes alignées. */
.se-rules li {
  display: grid;
  grid-template-columns: minmax(0, 15em) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 48px;
  padding: 26px 0;
  border-top: 1px solid #e3cfc4;
}

.se-rule-title,
.se-pair-title,
.se-perm-title {
  color: var(--ps-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ps-page main .se-rule-text {
  max-width: 40em;
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.se-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
}

.se-pair-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 34em;
}

.ps-page .se-pair-item p {
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

/* ---------- Permissions ---------- */

.f-dark .se-perm {
  border-color: rgba(255, 138, 76, 0.3);
}

.ps-page main .se-perm-title {
  color: #fff;
}

.ps-page main .se-perm-text {
  color: #d7c3b8;
}

.se-need {
  padding: 6px 14px;
  border-radius: var(--ps-radius-pill);
  background: rgba(110, 231, 183, 0.12);
  color: #6ee7b7;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.se-never {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ps-page .se-never-title {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.se-policy {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid rgba(255, 138, 76, 0.25);
  border-radius: var(--ps-radius-md);
  background: rgba(28, 17, 11, 0.6);
}

.se-policy-copy {
  display: flex;
  flex: 1 1 32em;
  flex-direction: column;
  gap: 10px;
  max-width: 46em;
}

.ps-page .se-policy h3 {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}

.ps-page .se-policy p {
  color: #d7c3b8;
  font-size: 19px;
  line-height: 1.55;
}

.se-policy-badge {
  padding: 6px 12px;
  border-radius: var(--ps-radius-pill);
  background: rgba(110, 231, 183, 0.12);
  color: #6ee7b7;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Certificats, statuts, CAI ---------- */

.se-cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 40px;
}

.ps-page .se-cert-text {
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.se-status {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
}

.ps-page .se-status-lead {
  max-width: 40em;
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.se-status-list {
  margin: 8px 0 0;
  padding: 0;
  border-bottom: 1px solid #e3cfc4;
  list-style: none;
}

.se-status-list li {
  display: grid;
  grid-template-columns: minmax(0, 14em) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 24px;
  padding: 16px 0;
  border-top: 1px solid #e3cfc4;
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.se-status-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ps-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.se-cai {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 12px;
}

.se-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ps-page main .se-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid #e3cfc4;
  border-radius: var(--ps-radius-md);
  background: #fffdf8;
  color: var(--ps-ink);
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s var(--ps-ease);
}

.ps-page main .se-mark:hover {
  border-color: var(--ps-orange);
  color: var(--ps-ink);
  transform: translateY(-2px);
}

.se-mark img {
  width: auto;
  height: 32px;
  object-fit: contain;
}

.se-mark > span {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

/* Le texte porte sa couleur : la règle des liens sur papier ne doit pas teinter la carte. */
.se-mark strong {
  color: var(--ps-ink);
}

.se-mark > span span {
  color: var(--ps-muted-light);
}

/* ---------- Mobile et mouvement réduit ---------- */

@media (max-width: 900px) {
  .se-pair,
  .se-cert-grid,
  .se-rules li,
  .se-status-list li {
    grid-template-columns: 1fr;
  }

  .se-hero {
    padding-top: 32px;
  }

  .ps-page .se-h1 {
    font-size: clamp(42px, 12.5vw, 64px);
  }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .se-pk,
  .se-x,
  .se-in {
    animation: none;
  }

  .se-x {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .se-n {
    transition: none;
  }
}
