
body, h1, p, ul {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #ecf0f1; 
    color: #34495e; 
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/*nav */
header {
    background-color: #4c2c50; 
    color: white;
    padding: 1rem 0;
    text-align: center;
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

header nav a:hover,
header nav a.active {
    color: #C8A24A; 
}

/* Section d'accueil */
.hero {
    background: linear-gradient(135deg, #5e3461 0%, #4c2c50 100%); 
    color: white;
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

main {
    flex: 1;
}

/* Pied de page */
footer {
    background-color: #4c2c50; 
    color: white;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
}

/* Style du tableau */
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #141414;
  background: #f6f2ea;
}

.listing{
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 16px 40px;
}

.listing__header{
  margin-bottom: 18px;
  text-align: center;
}

.listing__title{
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-align: center;
}

.listing__subtitle{
  margin: 0 auto;
  color: #C8A24A;
  max-width: 70ch;
  text-align: center;
}

/* GRILLE*/
.cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.card{
  background: #d9d2cd;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  overflow: hidden;

  display: flex;
  gap: 12px;
  padding: 14px;
  align-items: stretch;
}

@media (min-width: 576px) {
  .card {
    flex-direction: row;
  }

  .card__figure {
    flex-direction: column;
  }
}

.card__img{
  width: 150px;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
}

.card__figure {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card__bio {
    font-size: 11px;
    font-style: italic;
    color: #444;
    padding: 0 10px;
    margin: 0;
    text-align: center;
}

.card__body{
  display: flex;
  flex-direction: column;
}

.card__name{
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.card__role {
    font-size: 13px;
    font-style: italic;
    font-weight: bold; /* Ajout du gras pour mieux distinguer */
    color: #5e3461; /* Un violet foncé pour s'harmoniser avec le design */
    margin-bottom: 8px;
}

.card__meta{
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #2f2f2f;
}

.card__text{
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #2f2f2f;
  margin-bottom: 12px;
}
/* Effets de survol grille */
.card{
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card__img{
  transition: transform 0.18s ease;
}

.card:hover{
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

.card:hover .card__img{
  transform: scale(1.03);
}

/* Lien vers Wikipedia */
.card__wiki{
  display: block;              
  width: 100%;                 
  box-sizing: border-box;
  margin-top: auto;
  margin-bottom: 0;

  padding: 10px 12px;
  font-size: 12px;
  text-decoration: none;
  text-align: center;

  color: #141414;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(20,20,20,0.18);
  border-radius: 6px;

  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.card__wiki:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.9);
}

/* Formulaire de recherche */
.search-form {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.search-form__input {
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 1.2rem;
    width: 500px;
}

.search-form__button {
    padding: 1rem 2rem;
    border: none;
    background-color: #5e3461; /* Fond bleu-gris */
    color: #F6F2EA; /* Fond crème */
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.search-form__button:hover {
    background-color: #4c2c50; /* Darker blue-gray */
}

/* responsive */

@media (max-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }

  .search-form__input {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-align: center;
    box-sizing: border-box; /* Assure que le padding est inclus dans la largeur */
  }

  .search-form__button {
    width: 100%;
    border-radius: 4px;
  }

  .listing__title {
    font-size: 28px;
  }

  .card {
    flex-direction: column;
  }

  .card__img {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 576px){
  .listing__title{
    font-size: 26px;
  }

  .cards{
    grid-template-columns: 1fr; 
    gap: 14px;
  }

  .card{
    padding: 12px;
  }

  .card__img{
    width: 120px;
    height: 150px;
  }

  .card__name{
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
}