/* ============================================================
   psychagogie.fr — feuille de style unifiée
   À placer à la racine du site et à inclure dans chaque page :
   <link rel="stylesheet" href="/style.css">
   ============================================================ */


/* ── Variables ─────────────────────────────────────────────── */
:root {
  --font-body:    'Georgia', 'Times New Roman', serif;
  --font-display: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;

  --color-bg:         #f9f9f7;
  --color-text:       #222;
  --color-muted:      #666;
  --color-subtle:     #555;
  --color-accent:     #005baa;
  --color-accent-dk:  #004080;
  --color-heading:    #0b3d6b;

  --color-box-bg:     #f6f9fc;
  --color-box-border: #cde3f7;
  --color-part-bg:    #eee;
  --color-form-bg:    #fff;
  --color-form-border:#ddd;

  --max-width: 800px;
  --section-pad: 4rem 1rem;
}


/* ── Reset / base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}


/* ── Mise en page ───────────────────────────────────────────── */
header,
section,
footer {
  padding: var(--section-pad);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}


/* ── Typographie ────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: normal;
  color: var(--color-heading);
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  text-align: center;
}

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Variante : titres alignés à gauche (ex. cognition) */
h1.left, h2.left, h3.left {
  text-align: left;
}

p {
  margin: 0.8em 0;
}

.lead {
  font-size: 1.05em;
  color: #333;
  margin-bottom: 1em;
}

.note {
  font-size: 0.9em;
  color: var(--color-subtle);
}

em {
  font-style: italic;
}

strong {
  font-weight: bold;
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--color-accent-dk);
}


/* ── Images ─────────────────────────────────────────────────── */
.illu {
  display: block;
  margin: 2rem auto;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0 0 1em 0;
}

figcaption {
  font-size: 0.9em;
  color: var(--color-muted);
  margin-top: 6px;
}


/* ── Listes ─────────────────────────────────────────────────── */
ul, ol {
  margin: 0.6em 0 0.6em 1.2em;
  padding-left: 1.2em;
}

ul.soul-map {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  list-style: none;
  padding-left: 0;
}

ul.philo-list {
  list-style-type: decimal;
  padding-left: 2rem;
}

ul.obs-list {
  list-style-type: disc;
  padding-left: 2rem;
}

/* Listes de navigation centrées (liens « Retourner à… ») */
ul.nav-links {
  list-style: none;
  padding-left: 0;
  text-align: center;
}

ul.nav-links li + li {
  margin-top: 0.4rem;
}


/* ── Composants ─────────────────────────────────────────────── */

/* Carte d'une partie de l'âme (index, about…) */
.soul-part {
  background: var(--color-part-bg);
  padding: 1rem;
  border-radius: 6px;
}

/* Encadré informatif (cognition) */
.box {
  background: var(--color-box-bg);
  border-left: 4px solid var(--color-box-border);
  padding: 12px;
  margin: 12px 0;
  border-radius: 4px;
}

/* Encadré générique coloré (ex. "Pour aller plus loin" dans index) */
.highlight-box {
  background: #f0f0f0;
  padding: 15px;
  border-left: 5px solid #e74c3c;
}

/* Nom de ville en rouge italique (index) */
.city-name {
  font-style: italic;
  color: #e74c3c;
  font-weight: bold;
}


/* ── Formulaire (commentaires) ──────────────────────────────── */
#commentForm {
  background: var(--color-form-bg);
  border: 1px solid var(--color-form-border);
  border-radius: 8px;
  padding: 1.5em;
  margin-bottom: 2em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#commentForm label {
  display: block;
  margin-top: 1em;
  font-weight: bold;
}

#commentForm input[type="text"],
#commentForm textarea {
  width: 100%;
  padding: 0.6em;
  margin-top: 0.4em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  font-family: var(--font-body);
}

#commentForm textarea {
  min-height: 120px;
}

#commentForm button {
  margin-top: 1em;
  padding: 0.7em 1.5em;
  border: none;
  border-radius: 4px;
  background: var(--color-accent);
  color: #fff;
  font-size: 1em;
  cursor: pointer;
}

#commentForm button:hover {
  background: var(--color-accent-dk);
}

.comment-block {
  background: var(--color-form-bg);
  border: 1px solid var(--color-form-border);
  border-radius: 6px;
  padding: 1em;
  margin-bottom: 1em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.comment-block strong {
  color: var(--color-accent);
}

.comment-block span {
  font-size: 0.9em;
  color: #777;
  margin-left: 0.5em;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
}


/* ── Vidéo responsive ───────────────────────────────────────── */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  max-width: 560px;
  margin: 2rem auto;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* ── Pied de page ───────────────────────────────────────────── */
footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted);
}


/* ── Tableaux (rastignac et pages analytiques) ──────────────── */

/* Tableau des drivers — deux colonnes avec en-tête */
.driver-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.driver-table th {
  background: #e8e8e4;
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: bold;
  border-bottom: 2px solid #ccc;
}

.driver-table td {
  padding: 0.6rem 0.8rem;
  vertical-align: top;
  border-bottom: 1px solid #ddd;
}

.driver-table tr:last-child td {
  border-bottom: none;
}

/* Tableau des péripéties — colonne gauche en étiquette */
.peripetie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.peripetie-table td {
  padding: 0.7rem 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid #e0e0dc;
}

.peripetie-table td:first-child {
  font-weight: bold;
  white-space: nowrap;
  color: #444;
  width: 90px;
  background: #f0f0ec;
}

.peripetie-table tr:last-child td {
  border-bottom: none;
}

/* Tableau ipséité — rang + driver + description */
.ipseiite-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.ipseiite-table th {
  background: #e8e8e4;
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: bold;
  border-bottom: 2px solid #ccc;
}

.ipseiite-table td {
  padding: 0.7rem 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid #e0e0dc;
}

.ipseiite-table td:first-child {
  text-align: center;
  font-weight: bold;
  color: #666;
  width: 45px;
}

.ipseiite-table td:nth-child(2) {
  font-weight: bold;
  white-space: nowrap;
  width: 90px;
}

.ipseiite-table tr:last-child td {
  border-bottom: none;
}


/* ── Éléments éditoriaux (rastignac) ────────────────────────── */

blockquote {
  border-left: 2px solid #bbb;
  margin: 1.5rem 0;
  padding: 0.5rem 1.5rem;
  font-style: italic;
  color: #555;
}

/* Formule de synthèse (ex. Animus > Dæmon > …) */
.formule {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin: 2rem 0;
  padding: 1rem;
  background: #eee;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

/* Note de source centrée en bas d'analyse */
.source-note {
  text-align: center;
  font-style: italic;
  color: #888;
  font-size: 0.85rem;
  margin-top: 3rem;
}

/* Sous-titre dans h1 (span.subtitle) */
h1 .subtitle {
  display: block;
  font-size: 1.1rem;
  font-style: italic;
  color: #555;
  margin-top: 0.5rem;
}

/* h3 centré en italique (titres de péripéties) */
h3.scene {
  font-size: 1.1rem;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
  font-style: italic;
  color: #444;
}


/* ── Navigation interne (nav discret, rastignac) ────────────── */
nav {
  text-align: center;
  margin-top: 2rem;
}

nav ul {
  list-style: none;
  padding-left: 0;
}

nav ul li {
  margin: 0.4rem 0;
}

nav ul li a {
  color: #444;
  text-decoration: none;
  border-bottom: 1px solid #bbb;
}

nav ul li a:hover {
  color: #000;
  border-bottom-color: #555;
}


/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.2rem; }
  header, section, footer { padding: 2rem 1rem; }
}
