/* Feuille de style perso.css pour site SPIP */

/* Styles généraux */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fffdf4;
  color: #000;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Bandeau et header */
.bandeau {
  background-color: #1a5c84;
  color: white;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70px;
  height: 25vh;
  box-sizing: border-box;
  overflow: hidden;
}

.bandeau-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.logo-site {
  height: 4.2rem;
  width: auto;
  display: block;
  margin-bottom: 0;
}

.bandeau h1 {
  text-align: center;
  font-size: 1.4rem;
  margin: 0;
  line-height: 1.1;
  flex: 1;
}

/* Menu de navigation */
nav {
  background-color: #14496a !important;
  position: relative;
  box-shadow: 0 4px 16px rgba(26,92,132,0.10);
  z-index: 100;
}

.menu {
  background-color: #14496a !important;
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
}

.menu li {
  position: relative !important;
  color: white !important;
  white-space: nowrap;
}

.menu li a {
  color: white !important;
  padding: 0.8rem 1rem !important;
  text-decoration: none !important;
  display: block !important;
  white-space: nowrap;
  transition: background-color 0.3s;
  font-size: 0.9rem;
}

.menu li a:hover {
  background-color: #0d3a5a !important;
}

/* Sous-menus */
.menu li ul {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  background-color: #14496a !important;
  min-width: 220px !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
  z-index: 9999 !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.menu li:hover > ul {
  display: block !important;
}

.menu li ul li {
  border-bottom: 1px solid #0d3a5a !important;
  position: relative !important;
  background-color: #14496a !important;
}

.menu li ul li:last-child {
  border-bottom: none !important;
}

.menu li ul li a {
  padding: 0.6rem 1rem !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
  color: white !important;
  background-color: #14496a !important;
  text-align: left;
}

.menu li ul li a:hover {
  background-color: #0d3a5a !important;
  color: white !important;
}

/* Sous-menus de 2e et 3e niveau */
.menu li ul ul {
  left: 100% !important;
  top: 0 !important;
  margin-left: 0 !important;
  background: #0d3a5a !important;
  min-width: 200px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
}
.menu li ul ul li a {
  background: #0d3a5a !important;
}
.menu li ul ul li a:hover {
  background: #1a5c84 !important;
}

/* Corps principal */
main {
  flex: 1 1 auto;
  overflow: auto;
  width: 60%;
  margin: 0 auto;
  padding: 2rem;
  background-color: #f6f1e7;
  min-height: 0;
  box-shadow: 0 4px 24px rgba(26,92,132,0.10);
  border-radius: 12px;
}

/* Articles et contenu */
article {
  margin-bottom: 2rem;
}

article h2 {
  color: #1a5c84;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.texte {
  margin-bottom: 1.5rem;
}

article .texte img,
.texte img {
  max-width: 25ch;
  width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem auto;
}

/* Documents et images */
.documents {
  margin-top: 1rem;
}

.documents img,
.documents .document {
  max-width: 40ch;
  width: 100%;
  height: auto;
  margin: 0.5rem;
  display: block;
}

/* Sections de liens */
.liens-articles,
.liens-breves {
  margin-top: 2rem;
  padding: 1rem;
  background-color: rgba(26,92,132,0.06); /* bleu pâle transparent */
  border-left: 4px solid #1a5c84;
  box-shadow: 0 2px 12px rgba(26,92,132,0.15);
  border-radius: 8px;
  opacity: 0.98;
}

.liens-articles h3,
.liens-breves h3 {
  color: #1a5c84;
  margin-bottom: 1rem;
}

.liens-articles ul,
.liens-breves ul {
  list-style: none;
}

.liens-articles li,
.liens-breves li {
  margin-bottom: 0.5rem;
}

.liens-articles a,
.liens-breves a {
  color: #1a5c84;
  text-decoration: none;
}

.liens-articles a:hover,
.liens-breves a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: #1a5c84;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .bandeau {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 0.5rem;
    min-height: 80px;
  }
  .bandeau h1 {
    font-size: 1.2rem;
    text-align: center;
  }
  main {
    width: 98%;
    padding: 1rem;
  }
  
  .menu {
    flex-direction: column;
    overflow-x: visible;
  }
  
  .menu li ul {
    position: static !important;
    display: block !important;
    background-color: #0d3a5a !important;
    margin-left: 1rem;
    min-width: auto;
  }
}

/* --- MENU BURGER --- */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
}
.burger-btn span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 900px) {
  .burger-btn {
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
  }
  .menu {
    display: none !important;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: #14496a !important;
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 10000;
    padding-bottom: 1rem;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
    max-height: 0;
    overflow: hidden;
  }
  .menu.open {
    display: flex !important;
    max-height: 100vh;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
  }
  .menu li {
    width: 100%;
    text-align: left;
  }
  .menu li ul {
    position: static !important;
    box-shadow: none !important;
    background: #0d3a5a !important;
    margin-left: 1rem;
    min-width: auto;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
    max-height: 0;
    overflow: hidden;
    display: block !important;
  }
  .menu li:hover > ul,
  .menu li:focus-within > ul {
    max-height: 500px;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
  }
}

/* Transition douce sur les sous-menus (desktop) */
.menu li ul {
  transition: opacity 0.3s, visibility 0.3s;
  opacity: 0;
  visibility: hidden;
}
.menu li:hover > ul,
.menu li:focus-within > ul {
  opacity: 1;
  visibility: visible;
}

/* Centrer le texte du 1er niveau du menu */
.menu > li > a {
  text-align: center;
} 