/* ==========================================================
   STYLESOM.CSS
   Feuille de style des pages d'index (sommaire*.html)
   ========================================================== */

/* =========================
   PAGE
========================= */

body {
    margin: 0 auto;
    max-width: 95%;
    background-color: rgb(196,234,226);
    color: rgb(0,64,0);
    font-family: Arial, "Comic Sans MS", sans-serif;
}

/* =========================
   HEADER
========================= */

header {
    background: url(logo.png) repeat-x;
    height: 7rem;
    position: relative;
    overflow: visible;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 7rem;
    position: relative;
}

.site-title {
    margin: 0;
    color: white;
    font-size: 3rem;
    text-align: center;
    text-shadow: .1em .1em .1em black;
}

.site-url {
    position: absolute;
    left: 1rem;
    bottom: .5rem;
    background: white;
    color: black;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .85em;
}

/* =========================
   TITRES
========================= */

h1 {
    width: fit-content;
    max-width: 90%;
    margin: 20px auto;
    padding: 8px 20px;
    background-color: rgb(196,234,226);
    color: green;
    text-align: center;
    font-size: xx-large;
    border-radius: 8px;
    box-shadow: -1px 2px 5px rgba(0,0,0,.7);
}

.suite {
    margin-left: 15%;
}

.suite a {
    display: block;
    color: green;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;

    margin: 0.15em 0;   /* au lieu de .5em */
    line-height: 1.1;   /* rapproche encore les lignes */
}

.suite a:hover {
    text-decoration: underline;
}caption {
    font-weight: bold;
}


/* =========================
   MENU PRINCIPAL
========================= */

#menu {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    position: relative;
    z-index: 2000;
}

#menu > li {
    display: inline-block;
    width: 150px;
    position: relative;
    vertical-align: top;
}

#menu > li > a {
    display: block;
    padding: 10px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

/* couleurs menu principal */
#menu > li:nth-child(-n+5) > a {
    background: linear-gradient(to top, #2bc235, #0e4211);
}

#menu > li:nth-child(n+6) > a {
    background: linear-gradient(to top, #F6AD1A, #9F391A);
}

/* hover menu principal */
#menu > li:nth-child(-n+5) > a:hover {
    background: linear-gradient(to bottom, #4df04d, #249e1e);
    color: black;
}

#menu > li:nth-child(n+6) > a:hover {
    background: linear-gradient(to bottom, #F6AD1A, #d96a1a);
    color: black;
}

/* =========================
   SOUS-MENUS
========================= */

#menu ul {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    min-width: 200px;
    margin: 0;
    padding: 0;
    list-style: none;

    display: none;
    z-index: 6000;

    text-align: left;
    border-radius: 6px;
}

/* affichage au survol */
#menu li:hover > ul {
    display: block;
}

/* items sous-menu */
#menu ul li {
    display: block;
    width: 100%;
}

#menu ul li a {
    display: block;
    padding: 8px 10px;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

#menu > li:first-child ul {
    left: 0;
    transform: none;
}

/* couleurs sous-menu */
#menu > li:nth-child(-n+5) ul {
    background: #1f5e1f;
}

#menu > li:nth-child(-n+5) ul li a {
    background: #145a32;
}

#menu > li:nth-child(n+6) ul {
    background: #9F391A;
}

#menu > li:nth-child(n+6) ul li a {
    background: #9F391A;
}

/* hover sous-menu */
#menu > li:nth-child(-n+5) ul li a:hover {
    background: #4df04d;
    color: black;
}

#menu > li:nth-child(n+6) ul li a:hover {
    background: #F6AD1A;
    color: black;
}

nav ul li {
  display: inline-block;
}

.button {
    display: block;
    padding: 8px 12px;
    background: linear-gradient(to top, #2bc235, #0e4211);
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

.button:hover {
    background: linear-gradient(to bottom, #4df04d, #249e1e);
    color: black;
}


/* =========================
   LISTE DES DRAPEAUX
========================= */

.som figure {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.som figcaption {
    order: 1;
    width: 550px;
    text-align: left;
}

.som img {
    order: 2;
    height: 30px;
    width: auto;
    margin-left: 10px;
}	
.som figure img:hover {
  transform: scale(4);
  position: relative;
  z-index: 999;
}	
	
.h40b {
    font-weight: bold;
}

.item {
    display: block;
    color: green;
    font-size: 1.2em;
    margin-left: 15%;
    text-decoration: none;
}

.item:hover {
    text-decoration: underline;
}

.compteur {
    margin: 20px 0;
    margin-left: 15%;
    font-size: 1.3em;
    color: green;
}

.nb-items {
    display: inline-block;
    min-width: 3em;
    padding: 3px 10px;
    margin: 0 4px;
    background: #fff;
    border: 2px solid green;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    box-shadow: 1px 1px 3px rgba(0,0,0,.2);
}
/* BAS DE PAGE */
.badge {
  width: 350px;
  margin: 50px auto 0;
  padding: 10px;
  border: 1px solid brown;
  border-radius: 10px;
  background-color: rgb(236,228,230);
}
.badge-ligne {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 15px;
  align-items: center;
  padding: 2px 0;
}
.badge-valeur {
  text-align: right;
}
.badge-valeur img {
  width: 90px;
  height: auto;
}
.bob {
  background-color: #F6AD1A;
  background-image: linear-gradient(to bottom, #F6AD1A 0%, #9F391A 100%);
  padding: .2em .6em;
  border-radius: 1em;
  text-align: center;
  position: fixed;
  right: .5em;
  bottom: 5em;
  font-size: 0.9rem;
  color: white;
  text-decoration: none;
  width: max-content;
  min-width: 120px;
  max-width: 220px;
  z-index: 1000;
}
.bob:hover,
.bob:focus {
  filter: brightness(1.1);
}
#copyright{
	font-size: .8em;
	text-align: center;	
	margin-top:1em;
	margin-bottom:30px;
}
.copyright{
	font-size: .8em;
	text-align: center;	
	margin-top:1em;
	margin-bottom:30px;
}

/* =========================
   MOBILE
========================= */

@media (max-width:310px) {

    .som figure {
        flex-wrap: wrap;
    }

    .som figcaption {
        width: 100%;
        margin-right: 0;
        padding-left: 0;
    }

    .som figure img {
        margin-top: 5px;
    }

    .som figure img:hover {
        transform: scale(4);
        position: relative;
        z-index: 999;
    }
}
