/* --------------------------------------------------
   1. Base layout
-------------------------------------------------- */

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  background: #fdfdfd;
  color: #111;
  line-height: 1.6;

  /* pour le footer collé en bas si peu de contenu */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --------------------------------------------------
   2. Images
-------------------------------------------------- */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

header img {
  max-width: 100%;
  height: auto;
}

/* images dans une grille 1 colonne */
.cols-1 img {
  width: 60%;
}

/* --------------------------------------------------
   3. Header / bannière
-------------------------------------------------- */

header {
  background: white;
  padding: 10px 0;
  border-bottom: 3px solid black;
}

/* contenu du header : logo + bouton menu */
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header img.ban {
  width: 100%;
  max-width: 500px;
  height: auto;
  margin: 0 auto;
}

/* bouton "bigmac" (caché sur desktop) */
.menu-toggle {
  display: none;
  border: none;
  background: none;
  font-size: 26px;
  cursor: pointer;
}

/* variante éventuelle de header */
header.paperback {
  text-align: center;
  background: white;
  padding: 20px 0 10px 0;
  border-bottom: 3px solid black;
}

/* --------------------------------------------------
   4. Menu de navigation
-------------------------------------------------- */

nav {
  background-color: #f8f9fa;
  padding: 10px 0;
  border-bottom: 3px solid black;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

nav li {
  margin: 0;
}

nav a {
  display: block;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

nav a:hover {
  background-color: #e0e0e0;
}

nav a.active {
  color: #fff;
  background-color: #000;
}

/* ---- Sous-menus (desktop) ---- */

nav li.has-submenu {
  position: relative;
}

nav li.has-submenu > .submenu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 8px 14px;
  border-radius: 4px;
}

nav li.has-submenu > .submenu {
  list-style: none;
  margin: 0;
  padding: 5px 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  min-width: 180px;
  display: none;
  z-index: 1000;
}

nav li.has-submenu > .submenu li a {
  padding: 8px 12px;
}

/* affichage au survol en desktop */
@media (min-width: 701px) {
  nav li.has-submenu:hover > .submenu {
    display: block;
  }
}

/* --------------------------------------------------
   5. Grilles / mise en page principale
-------------------------------------------------- */

/* section spéciale .un (1 colonne par défaut) */
.un {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

/* grille principale */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;

  /* occupe l’espace vertical dispo entre header/nav et footer */
  flex: 1;
}

/* variantes de colonnes */
.cols-1 {
  grid-template-columns: 1fr;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* cartes / articles */

article {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05);
}

article h2 {
  font-family: "Times New Roman", serif;
  font-size: 24px;
  margin-top: 0;
  border-bottom: 2px solid black;
  padding-bottom: 8px;
}

article p {
  text-align: justify;
}

.backorange {
  background: rgb(238, 193, 136);
}

/* --------------------------------------------------
   6. Cartes centrées / "nuage"
-------------------------------------------------- */

article.card-center {
  display: flex;
  flex-direction: column;
}

article.card-center .nuage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

article.card-center .nuage img {
  max-width: 95%;
  height: auto;
}

.vertnuage {
  background-color: rgb(30, 140, 122);
  color: #fff;
}

/* --------------------------------------------------
   7. Footer
-------------------------------------------------- */

footer {
  background: #fff;
  border-top: 3px solid black;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  margin-top: auto; /* clé pour le pied de page collé */
}

footer p {
  margin: 8px 0;
}

footer a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------
   8. Responsive
-------------------------------------------------- */

/* ≤ 1000px : 2 colonnes pour la grille principale */
@media (max-width: 1000px) {
  main {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤ 700px : version mobile */
@media (max-width: 700px) {
  /* grille principale : 1 colonne */
  main {
    grid-template-columns: 1fr;
  }

  /* images dans .cols-1 en pleine largeur */
  .cols-1 img {
    width: 100%;
  }

  /* header plus souple */
  .header-inner {
    flex-wrap: wrap;
  }

  /* on affiche le bouton bigmac */
  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  nav {
    width: 100%;
  }

  /* menu caché par défaut, affiché avec .open (JS) */
  nav ul {
    flex-direction: column;
    align-items: stretch;
    margin-top: 10px;
    display: none;
  }

  nav.open ul {
    display: flex;
  }

  nav ul li {
    margin: 0;
    border-top: 1px solid #ddd;
  }

  nav ul li:last-child {
    border-bottom: 1px solid #ddd;
  }

  nav a {
    padding: 10px 15px;
    text-align: left;
  }

  /* sous-menus sur mobile : dans le flux, toujours visibles
     quand le menu principal est ouvert */
  nav li.has-submenu {
    width: 100%;
  }

  nav li.has-submenu > .submenu {
    position: static;
    border: none;
    background: transparent;
    display: block;
    padding-left: 15px;
  }

  nav li.has-submenu > .submenu li a {
    padding: 6px 0;
  }
}

.classe {
  /*background-color: burlywood; */
  line-height: 2;
  padding: 8%;
  font-size: 14pt;
}

.encarts-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: nowrap;
  margin: 40px auto;
}


.centre { 
  text-align: center;
}