/* Feuille de style propre à la page pédagogique (regles.php) — même logique que port.css : réutilise
   la palette noir/vert phosphore et les classes de base de style.css (.ecran-centre, fieldset...),
   ne contient que ce qui est propre à cette page. Palette de rôle utilisée dans les diagrammes :
   ambre #ffcc00 = doit s'écarter (give-way), cyan #00e0ff = maintient cap/vitesse (stand-on),
   rouge #ff4d4d = danger/priorité maximale — cohérent avec le jaune "propre navire" et le cyan
   "info" déjà utilisés ailleurs dans l'appli. */

.regles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.regles-retour-lien {
  color: #9fc9af;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid #1e4d1e;
  border-radius: 3px;
  padding: 5px 10px;
  white-space: nowrap;
}
.regles-retour-lien:hover {
  background: #143214;
  color: #d8f5d8;
}

.regles-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 90px;
}
.regles-lede {
  color: #9fc9af;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 26px;
}

/* Navigation rapide vers les 4 sections — ancre simple, pas de scroll-spy JS. */
.regles-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 44px;
}
.regles-nav a {
  color: #00e0ff;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #124a4a;
  border-radius: 20px;
  padding: 6px 14px;
}
.regles-nav a:hover {
  background: #0a2323;
}

.regles-section {
  margin-top: 58px;
  scroll-margin-top: 20px;
}
.regles-section-kicker {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7fae8f;
  margin: 0 0 6px;
}
.regles-section h2 {
  font-size: 19px;
  color: #ffcc00;
  margin: 0 0 10px;
  letter-spacing: .3px;
}
.regles-section-intro {
  color: #b9d6c4;
  font-size: 13px;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 0 22px;
}

/* Légende de rôle réutilisée en haut de la section 1 (give-way / stand-on). */
.regles-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 22px;
  font-size: 12px;
  color: #b9d6c4;
}
.regles-legende span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.regles-puce {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  display: inline-block;
}
.regles-puce.give-way { background: #ffcc00; }
.regles-puce.stand-on { background: #00e0ff; }

/* --- Section 1 : situations de rencontre ------------------------------------------------ */
.situation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.situation-card {
  background: #000;
  border: 1px solid #00ff41;
  border-radius: 6px;
  padding: 16px 16px 18px;
}
.situation-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #00ff41;
  border: 1px solid #1e4d1e;
  border-radius: 3px;
  padding: 2px 7px;
  margin-bottom: 10px;
}
.situation-card h3 {
  font-size: 14.5px;
  color: #d8f5d8;
  margin: 0 0 12px;
}
.situation-card svg {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 12px;
}
.situation-card p {
  font-size: 12px;
  line-height: 1.55;
  color: #b9d6c4;
  margin: 0 0 8px;
}
.situation-card p:last-child { margin-bottom: 0; }
.situation-card strong { color: #d8f5d8; }

/* --- Section 2 : feux et marques ---------------------------------------------------------- */
.feux-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 30px;
}
.feux-arc-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  flex: 0 0 auto;
}
.feux-arc-cercle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid #1e4d1e;
  background: conic-gradient(
    from 0deg,
    #17c94a 0deg 112.5deg,
    #e8e8e8 112.5deg 247.5deg,
    #d43b3b 247.5deg 360deg
  );
  box-shadow: inset 0 0 0 1px #000;
}
.feux-arc-etrave {
  position: absolute;
  top: 6px; left: 50%;
  width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid #ffcc00;
}
.feux-arc-label {
  position: absolute;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0a0a0a;
  font-weight: bold;
}
.feux-arc-label.tribord { top: 34%; right: -6px; color: #17c94a; text-shadow: 0 0 3px #000; }
.feux-arc-label.babord  { top: 34%; left: -6px; color: #d43b3b; text-shadow: 0 0 3px #000; }
.feux-arc-label.poupe   { bottom: -4px; left: 50%; transform: translateX(-50%); color: #b9d6c4; }
.feux-arc-legende {
  flex: 1 1 260px;
  font-size: 12px;
  color: #b9d6c4;
  line-height: 1.6;
}
.feux-arc-legende li { margin-bottom: 6px; }

/* Grille des types de navires (feux de nuit + marques de jour). */
.feux-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.feux-item {
  background: #000;
  border: 1px solid #1e4d1e;
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  gap: 14px;
}
.feux-item h4 {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: #ffcc00;
  letter-spacing: .02em;
}
.feux-item p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: #b9d6c4;
}
.feux-item p + p { margin-top: 6px; }
.feux-item p b { color: #d8f5d8; }

/* Pictogrammes de marques de jour (formes noires réglementaires). */
.shape-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 30px;
}
.shape-ball {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #101010;
  border: 1px solid #6b8a76;
}
.shape-diamond {
  width: 13px; height: 13px;
  background: #101010;
  border: 1px solid #6b8a76;
  transform: rotate(45deg);
}
.shape-cylinder {
  width: 13px; height: 20px;
  border-radius: 2px;
  background: #101010;
  border: 1px solid #6b8a76;
}
.shape-cone-up {
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #101010;
  filter: drop-shadow(0 0 0 #6b8a76);
}
.shape-cone-down {
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 14px solid #101010;
}
.shape-hourglass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* --- Section 3 : signaux sonores ---------------------------------------------------------- */
.signaux-sous-titre {
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #7fae8f;
  margin: 26px 0 12px;
}
.signaux-sous-titre:first-child { margin-top: 0; }
.signal-table {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #142523;
  border: 1px solid #1e4d1e;
  border-radius: 6px;
  overflow: hidden;
}
.signal-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #000;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.signal-pattern {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 160px;
}
.blast {
  height: 13px;
  border-radius: 2px;
  background: #00e0ff;
}
.blast.court { width: 13px; }
.blast.prolonge { width: 42px; }
.blast.danger { background: #d43b3b; }
.signal-meaning {
  font-size: 12px;
  color: #d8f5d8;
  flex: 1 1 220px;
}
.signal-meaning b { color: #ffcc00; }

/* --- Section 4 : hiérarchie des priorités (Règle 18) -------------------------------------- */
.priorite-echelle {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  max-width: 480px;
  counter-reset: rang;
}
.priorite-echelle li {
  counter-increment: rang;
  position: relative;
  background: #000;
  border: 1px solid #1e4d1e;
  border-left: 4px solid #7fae8f;
  border-radius: 4px;
  padding: 10px 14px 10px 40px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #d8f5d8;
}
.priorite-echelle li::before {
  content: counter(rang);
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #7fae8f;
  font-weight: bold;
}
.priorite-echelle li.rang-max { border-left-color: #d43b3b; }
.priorite-echelle li small {
  display: block;
  color: #7fae8f;
  font-size: 11px;
  margin-top: 2px;
}
.priorite-note {
  background: #0a1410;
  border: 1px solid #1e4d1e;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.6;
  color: #b9d6c4;
  max-width: 700px;
}
.priorite-note b { color: #ffcc00; }

@media (max-width: 560px) {
  .feux-layout { flex-direction: column; }
  .feux-arc-wrap { margin: 0 auto; }
}
