
:root {
  --text-color: #1a1a1a;
  --muted: #555;
  --accent: #007bff;
  --font-size-base: 1rem; /* plus stable */
  --font-size-lead: 1.25rem;
  --font-size-h3: 2rem;
  --font-size-h4: 1.3rem;
}

/* Typewriter keyframes kept but simplified */
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { 50% { border-color: var(--accent); } }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: 'Cinzel', serif; background: #f0f8ff; color: var(--text-color); line-height: 1.6; }
body { background-image: url('img/ciel.jpg'); background-size: cover; background-attachment: fixed; background-position: center top; }

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 10px; top: 10px; width: auto; height: auto; background: #fff; padding: 8px; z-index: 9999; }

.site-header { position: fixed; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: rgba(255,255,255,0.95); backdrop-filter: blur(6px); z-index: 99; border-bottom: 1px solid #ddd; color: var(--text-color); }
.site-title { font-size: 1.1rem; margin: 0; }
.site-header nav a { color: var(--accent); text-decoration: none; margin-left: 15px; font-size: var(--font-size-base); font-weight: 700; }
.site-header nav a:focus, .site-header nav a:hover { text-decoration: underline; }

.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; margin-top: 60px; position: relative; --opacity-factor: 1; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url('img/truman.jpg'); background-size: cover; background-position: center; opacity: var(--opacity-factor); transition: opacity 200ms linear; }
.hero.truman-intro .wrap { background: rgba(0,0,0,0.5); padding: 24px 28px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.45); max-width: 90%; }
.hero .main-title { font-size: clamp(2.5rem, 8vmax, 6rem); color: white; text-shadow: 2px 2px 8px rgba(0,0,0,0.7); margin: 0; }
.hero .lead { font-size: var(--font-size-lead); color: white; margin-top: 10px; }

.panel { padding: 60px 6vw; display: block; background: rgba(255,255,255,0.9); position: relative; }
.wrap { max-width: 1100px; margin: 0 auto; }

.panel h3, .panel h4 { margin: 0 0 20px 0; }
.panel h3 { font-size: var(--font-size-h3); color: var(--accent); }
.panel h4 { font-size: var(--font-size-h4); color: var(--text-color); margin-top: 24px; }
.panel p, .panel li { font-size: var(--font-size-base); color: var(--text-color); }

/* Typing classes applied by JS when needed */
.animate-title { display: inline-block; white-space: nowrap; overflow: hidden; border-right: 2px solid transparent; }
.reveal.visible .animate-title { animation: typing 0.9s steps(30,end) forwards, blink-caret .6s step-end infinite; border-color: transparent; }

.visuel-container { margin: 24px 0; width: 40%; max-width: 360px; position: relative; }
.visuel-container.left-align { float: left; padding-right: 20px; }
.visuel-container.right-align { float: right; padding-left: 20px; }
.visuel-anime { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); display: block; }

/* Reveal transitions */
.reveal h3, .reveal h4, .reveal p, .reveal ul, .reveal .text-container { opacity: 0; transform: translateY(12px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.visible h3, .reveal.visible h4, .reveal.visible p, .reveal.visible ul, .reveal.visible .text-container { opacity: 1; transform: translateY(0); }

.site-footer { text-align: center; padding: 24px; color: var(--muted); font-size: .9rem; margin-top: 20px; background-color: rgba(255,255,255,0.8); border-top: 1px solid #eee; }

/* Responsive adjustments */
@media (max-width: 900px) {
  .visuel-container { float: none; width: 90%; margin: 20px auto; padding: 0; }
  .hero::before { background-position: center top; }
  .site-header { padding: 10px 14px; }
}

@media (max-width: 480px) {
  :root { --font-size-base: .95rem; --font-size-lead: 1rem; --font-size-h3: 1.6rem; }
  .hero .wrap { padding: 18px; }
}
body::before,
body::after{
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 18vw;            /* largeur responsive */
  min-width: 120px;
  max-width: 300px;
  pointer-events: none;   /* cliquable pas affecté */
  background-repeat: repeat-y;
  background-position: top center;
  background-size: contain;
  opacity: 0.95;
  z-index: 40;            /* derrière header (header z-index:99) */
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.08));
}

/* SVG cloud (data URI) : si tu veux remplacer par des fichiers, voir alternative ci-dessous */
body::before{
  left: 0;
  transform: translateX(-6%);
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='300' height='100'>\
<g fill='%23ffffff'>\
<ellipse cx='40' cy='55' rx='30' ry='18'/>\
<ellipse cx='95' cy='45' rx='48' ry='30'/>\
<ellipse cx='170' cy='55' rx='36' ry='22'/>\
</g></svg>");
}

body::after{
  right: 0;
  transform: translateX(6%) scaleX(-1); /* miroir pour symétrie */
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='300' height='100'>\
<g fill='%23ffffff'>\
<ellipse cx='40' cy='55' rx='30' ry='18'/>\
<ellipse cx='95' cy='45' rx='48' ry='30'/>\
<ellipse cx='170' cy='55' rx='36' ry='22'/>\
</g></svg>");
}

/* Dégrader légèrement en haut/bas pour mieux fondre avec la page */
body::before { background-color: rgba(255,255,255,0.02); }
body::after  { background-color: rgba(255,255,255,0.02); }

/* Responsive : cacher sur petits écrans */
@media (max-width: 900px){
  body::before,
  body::after { display: none; }
}