/* ===== Variables ===== */
:root {
  --bg-creme: #f8f5f0;
  --sidebar: #ffffff;
  --card: #ffffff;
  --accent: #b7d4c5;
  --button: #e6b980;
  --text: #2e2e2e;
  --text-secondary: #6b6b6b;
  --success: #8fb996;
  --error: #c06546;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Body */
body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  background-color: var(--bg-creme);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Input TEXT */
input[type="text"] {
  padding: 0.8rem;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  margin: 2rem auto;
  display: block;
}

/* ===== Header ===== */
header { text-align: center; }
header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
header p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* MENU RESPONSIVE */
#menu__toggle {
  opacity: 0;
}
#menu__toggle:checked + .menu__btn > span {
  transform: rotate(45deg);
}
#menu__toggle:checked + .menu__btn > span::before {
  top: 0;
  transform: rotate(0deg);
}
#menu__toggle:checked + .menu__btn > span::after {
  top: 0;
  transform: rotate(90deg);
}
#menu__toggle:checked ~ .menu__box {
  left: 0 !important;
}
.menu__btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  z-index: 1;
}
.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #616161;
  transition-duration: .25s;
}
.menu__btn > span::before {
  content: '';
  top: -8px;
}
.menu__btn > span::after {
  content: '';
  top: 8px;
}
.menu__box {
  display: block;
  position: fixed;
  top: 0;
  left: -100%;
  width: 300px;
  height: 100%;
  margin: 0;
  padding: 80px 0;
  list-style: none;
  background-color: #ECEFF1;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .4);
  transition-duration: .25s;
}
.menu__item {
  display: block;
  padding: 12px 24px;
  color: #333;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  transition-duration: .25s;
}
.menu__item:hover {
  background-color: #CFD8DC;
}

/* ===== Cartes ===== */
.cards-container {
  display: flex;
  flex-wrap: wrap;          /* les cartes passent à la ligne si elles dépassent */
  justify-content: center;  /* centre les cartes sur chaque ligne */
  gap: 2rem;                /* espace entre les cartes */
  max-width: 100%;          /* prend toute la largeur disponible */
  margin: 2rem auto;
  flex-grow: 1;
}

.card {
  background-color: var(--card);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 2rem 1.5rem;
  width: 280px;				/* largeur fixe */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 auto;           /* permet de s’adapter si la fenêtre est trop petite */
  margin: 2rem auto;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Icone */
.card .art-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Titres et texte */
.card h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.card p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

/* Boutons */
.card button {
  background-color: var(--button);
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s;
}
.card button:hover {
  background-color: var(--accent);
  transform: scale(1.02);
}

/* ===== Quiz ====== */



    .score {
      color: var(--text-secondary);
      font-size:0.95rem;
      margin-top:0.2rem;
    }

    .quiz-card {
      background-color: var(--card);
      border-radius:16px;
      box-shadow:0 4px 15px rgba(0,0,0,0.1);
      padding:2rem;
      max-width:500px;
      width:100%;
      text-align:center;
      margin-bottom:2rem;
      transition: transform 0.2s ease;
	  margin: 0 auto 2rem auto;
    }

    .question { font-size:1.3rem; margin-bottom:1rem; font-family:'Playfair Display', serif; }

    .art-image {
      width:100%;
      max-width:250px;
      height:auto;
      border-radius:12px;
      margin-bottom:1.5rem;
      box-shadow:0 4px 10px rgba(0,0,0,0.1);
      cursor:pointer;
      transition: transform 0.2s ease;
    }

    .art-image:hover { transform: scale(1.02); }

    .options { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }

    button.option {
      background-color:var(--button);
      color:var(--text);
      border:none;
      border-radius:10px;
      padding:0.8rem;
      font-size:1rem;
      cursor:pointer;
      transition: background-color 0.2s ease, transform 0.1s;
    }

    button.option:hover { background-color:var(--accent); transform:scale(1.02); }
    button.option.correct { background-color:var(--success); color:white; }
    button.option.wrong { background-color:var(--error); color:white; }

    .feedback { margin-top:1rem; font-size:1.1rem; font-weight:500; min-height:1.2em; }

    .next-btn {
      margin-top:1.5rem;
      background-color:var(--accent);
      border:none;
      border-radius:10px;
      padding:0.8rem 1.5rem;
      font-size:1rem;
      cursor:pointer;
      color:var(--text);
      font-weight:500;
      transition:background-color 0.2s ease;
    }

    .next-btn:hover { background-color:var(--button); }

    .lightbox {
      display:none;
      position:fixed;
      top:0;
      left:0;
      width:100vw;
      height:100vh;
      background:rgba(0,0,0,0.7);
      justify-content:center;
      align-items:center;
      z-index:1000;
    }

    .lightbox img {
      max-width:90%;
      max-height:90%;
      border-radius:12px;
      box-shadow:0 4px 20px rgba(0,0,0,0.3);
    }

/* SCORE */

.scores-card {
  background-color:var(--card);
  border-radius:18px;
  box-shadow:0 4px 20px rgba(0,0,0,0.1);
  padding:2rem;
  max-width:600px;
  width:90%;
  text-align:left;
  margin-bottom:2rem;
  margin: 2rem auto;
}

.scores-card h2 {
  font-family:'Playfair Display', serif;
  font-size:1.8rem;
  margin-bottom:1rem;
  text-align:center;
}

.score-row {
  display:flex;
  justify-content:space-between;
  padding:0.5rem 0;
  border-bottom:1px solid rgba(0,0,0,0.05);
  font-size:1rem;
}

.score-row:last-child { border-bottom:none; }

.score-name { font-weight:500; }
.score-value { font-weight:600; }
.score-date { color: var(--text-secondary); font-size:0.9rem; }

/* Canvas pour identifiant éléments dans tableau */
.art-container {
  position: relative;
  display: inline-block;
}

.art-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* ===== Elements/Composition d'une oeuvre ===== */

.element-card {
  background-color: var(--card);
  box-shadow: 0 4px 10px var(--shadow);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  width: 90%;
  max-width: 700px;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 2rem auto;
}

.element-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  background: #eee;
}

.element-info {
  flex: 1;
}

.element-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.element-meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.loader {
  margin: 2rem 0;
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
}

.element-actions a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  margin-right: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  color: var(--card);
  background-color: var(--accent);
}
.element-actions a:hover {
  background-color: #9bb7a9;
}
.element-actions a:last-child {
  background-color: #e07a7a;
  color: #fff;
}
.element-actions a:last-child:hover {
  background-color: #c66161;
}

/* OEUVRES */

.oeuvre-card {
	display:flex; 
	align-items:flex-start; 
	background:var(--card); 
	box-shadow:0 4px 10px var(--shadow); 
	border-radius:14px; 
	padding:1rem; 
	margin-bottom:1rem; 
	width:90%; 
	max-width:700px; 
	transition:transform .2s ease, box-shadow .2s ease;
  margin: 2rem auto;
}

.oeuvre-card:hover { transform:translateY(-3px); box-shadow:0 6px 16px var(--shadow); }

.oeuvre-image { width:90px; height:90px; border-radius:10px; object-fit:cover; margin-right:1rem; background:#eee; flex-shrink:0; }
.oeuvre-info { flex:1; }
.oeuvre-title { font-size:1.15rem; font-weight:600; color:var(--text); }
.oeuvre-meta { color:var(--text-secondary); font-size:.95rem; margin-top:.3rem; line-height:1.4; }
.loader { margin:2rem 0; font-size:1rem; color:var(--text-secondary); text-align:center; }
@media(max-width:600px) { .card { flex-direction:column; align-items:center; text-align:center; } .oeuvre-image { margin-right:0; margin-bottom:.8rem; width:100%; height:auto; max-height:250px; } }

.oeuvre-actions a {
  display:inline-block; padding:.3rem .7rem; margin-right:.5rem; border-radius:8px; text-decoration:none; font-size:.9rem; font-weight:500; transition: all .2s ease; color:var(--card); background-color:var(--accent);
}
.oeuvre-actions a:hover { background-color:#9bb7a9; }
.oeuvre-actions a:last-child { background-color:#e07a7a; color:#fff; }
.oeuvre-actions a:last-child:hover { background-color:#c66161; }

/* THEMES

Il utilise le CSS de OEUVRES

 */
