
:root{
  --topbar-h: 48px;
  --gap: 0;
  --page-pad: 14px;
  --highlight: rgba(255,255,255,0.18);
  --text: #111;
  --bg: #fff;
}

*{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:var(--bg);
  color:var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

body{
  display:flex;
  flex-direction:column;
}

.topbar{
  height:var(--topbar-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 16px;
  border-bottom:1px solid #ddd;
  flex:0 0 auto;
}

.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap:18px;
}

.auto-btn{
  border:1px solid #111;
  background:#fff;
  color:#111;
  padding:6px 10px;
  font:inherit;
  cursor:pointer;
  border-radius:0;
}

.auto-btn:hover{
  background:#111;
  color:#fff;
}

.auto-btn.active{
  background:#111;
  color:#fff;
}

.toplink{
  color:#111;
  text-decoration:none;
  font-size:0.95rem;
}

.toplink:hover{
  text-decoration:underline;
}

#app{
  height:calc(100vh - var(--topbar-h));
  width:100%;
  overflow:hidden;
}

.about{
  overflow-y:auto;
}

.about-inner{
  padding-bottom:60px;
}

/* HOME */
.home{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.home-grid{
  height:calc(100vh - var(--topbar-h));
  aspect-ratio:6 / 7;

  display:grid;
  grid-template-columns:repeat(6, 1fr);
  grid-template-rows:repeat(7, 1fr);
  gap:0;
}

.tile{
  display:block;
  width:100%;
  height:100%;
  overflow:hidden;
}

.tile img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:0;
}

.tile:hover img{
  filter:brightness(1.18) contrast(1.06);
  transform:scale(1.01);
}

.tile::after{
  content:"";
  position:absolute;
  inset:0;
  background:transparent;
  transition:background 120ms ease;
  pointer-events:none;
}

.tile:hover::after{
  background:var(--highlight);
}

/* TRIPTYCH */
.triptych-page{
  width:100%;
  height:100%;
  padding:var(--page-pad);
}

.triptych{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  align-items:stretch;
}

.panel{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.visual{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.visual img{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:0;
}

.poem-panel{
  align-items:stretch;
}

.poem-wrap{
  width:100%;
  height:100%;
  overflow-y:auto;
  padding:16px 18px;
  line-height:1.45;
  font-size:clamp(0.9rem, 1.2vw, 1.2rem);
  display:block;
}

.poem-title{
  font-size:1rem;
  letter-spacing:0.04em;
  text-transform:uppercase;
  margin:0 0 18px 0;
}

.poem{
  margin:0;
}

.poem a{
  color:inherit;
  text-decoration:underline;
  text-underline-offset:0.12em;
  cursor:pointer;
}

.poem-meta{
  margin-top:20px;
  font-size:0.9rem;
  color:#444;
}

/* ABOUT */
.about{
  height:calc(100vh - var(--topbar-h));
  width:100%;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:60px 20px 40px;

  overflow-y:auto;   
}

.about-inner{
  max-width:720px;
  width:100%;
}

.about h1{
  margin-top:0;
}


/* Titre principal */
.about-title{
  font-size:clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight:normal;
  margin-bottom:40px;
  letter-spacing:0.02em;
}

/* Sections */
.about-section{
  margin-bottom:48px;
}

/* Sous-titres */
.about-section h2{
  font-size:0.85rem;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:#666;
  margin-bottom:14px;
}

/* Paragraphes */
.about-section p{
  margin:0 0 16px 0;
  font-size:1.05rem;
  line-height:1.75;
}

/* Première lettre légèrement mise en valeur (effet éditorial subtil) */
.about-section p:first-of-type::first-letter{
  font-size:1.4em;
}

/* Séparateur très léger entre sections */
.about-section + .about-section{
  border-top:1px solid rgba(0,0,0,0.08);
  padding-top:32px;
}

/* Small safety adjustment */


.poem a.auto-chosen{
  background: #ffea00;
  color: #000;
  padding: 0 0.12em;
  animation: autoPulse 5s ease;
}

@keyframes autoPulse{
  0%{
    background: transparent;
  }
  20%{
    background: #ffea00;
  }
  70%{
    background: #ffea00;
  }
  100%{
    background: #ffb300;
  }
}