:root {
  --bg-light: #faf7f4;
  --bg-dark: #1c1b22;
  --text-light: #1c1b22;  /* texte sur fond clair */
  --text-dark: #faf7f4;   /* texte sur fond sombre */
  --accent: #8a5fff;
  --accent-2: #ff82a9;
  --radius: 14px;
  --max-width: 900px;
}

/* Structure globale pour coller le footer en bas si peu de contenu */
body {
  margin: 0;
  font-family: 'Georgia', serif;
  background: var(--bg-light);
  color: var(--text-light);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
}

  header {
      position: fixed;
      top: 0; 
	  left: 0; 
	  width: 100%;
      display: flex; justify-content: space-between; align-items: center;
      padding: 1rem 2rem;
      background: rgba(17,17,17,0.6);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255,255,255,0.1);
      z-index: 1000;
    }
   header .logo { font-weight: 700; font-size: 1.3rem; margin-left: 0; width: 220px; }
    header nav ul { display: flex; gap: 0.7rem; list-style: none; margin-right : 50px; }
      header nav a { font-family: "Segoe UI"; color : black; font-weight: 500; transition: color 0.3s; text-decoration: none; }
    header nav a:hover { color: #577275;); }
    
  .logo img {
  height: 50px;      /* taille logo */
  width: auto;       /* garde les proportions */
  display: block;
}

.logo img {
  height: 70px;
}
.logo img:hover {
  opacity: 0.85;
}

main {
  flex: 1;
  max-width: var(--max-width);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  padding: 60px 50px;
  margin: 120px auto 40px;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 3rem;
  background: linear-gradient(90deg, #577275, #12474d , #6ca0a3, #89c2c8, #577275);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  text-align : center;
}

.meta {
    font-size: 0.9rem;
  margin-bottom: 40px;
  font-style: italic;

  /* Dégradé comme h1 */
  background: linear-gradient(90deg, #577275, #12474d, #6ca0a3, #89c2c8, #577275);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* pour Firefox et Edge */
}

.chapo {
  font-size: 1.4rem;
  color: #333;
  font-weight: 500;
  margin-bottom: 40px;
  padding: 15px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(138,95,255,0.08), rgba(255,130,169,0.08));
}

p {
  margin: 0 0 24px;
  font-size: 1.1rem;
  text-align: justify;
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.7s forwards;
}

p:nth-child(1) { animation-delay: 0.2s; }
p:nth-child(2) { animation-delay: 0.4s; }
p:nth-child(3) { animation-delay: 0.6s; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

figure {
  margin: 40px 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: transform 0.4s ease;
}

figure img:hover {
  transform: scale(1.02);
}

figure figcaption {
   font-size: 0.9rem;
  margin-bottom: 40px;
  font-style: italic;

  /* Dégradé comme h1 */
  background: linear-gradient(90deg, #577275, #12474d, #6ca0a3, #89c2c8, #577275);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* pour Firefox et Edge */
}

.theme-toggle {
	position: fixed;      /* fixé par rapport à la fenêtre */
  top: 120px;            /* distance depuis le haut */
  right: 20px;          /* distance depuis la droite */
  z-index: 1;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
  display: inline-block;
}
  
body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

body.dark main {
  background: rgba(30,30,30,0.85);
}

body.dark .chapo {
  background: linear-gradient(135deg, rgba(138,95,255,0.15), rgba(255,130,169,0.15));
}

/* Footer*/
footer {
  text-align: center;
  padding: 1rem;
  background: rgba(26, 26, 26, 0.8);
  color: #fff;
  backdrop-filter: blur(10px);
}


.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;       /* au-dessus de tout */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 2100;
  user-select: none;
}