/* Utilisation de fonts */
@font-face { font-family: "Merienda"; src: url('../fonts/MeriendaOne-Regular.ttf'); }
@font-face { font-family: "dancing_in_the_rainbow"; src: url('../fonts/dancing_in_the_rainbow.ttf'); }



* {
  box-sizing: border-box;
}



body {  width : 90%; background-color : #686887; margin:auto; overflow-y: scroll ; position: relative;}
header { width : 75%;  padding : 30px; text-align : center; color : #EBDDFF; margin:auto;}
/* min-width : 0 : sans cela, un contenu large (la zone de texte) élargit la grille et la page déborde */
main {   background-color : #C9C9D9; border-radius : 10px; padding : 30px; position: relative; min-width : 0; }


/* En-tête de la page */
header h1 { padding : 0px; height : 120px; width : 90%; margin:auto; background-image:url('../img/nobel_prize.png');
            background-size: 120px; background-repeat: no-repeat;  background-position:center right;
          min-height: 120px; margin:auto;}
header h1 a {display :block; margin : 0px; font-family: Merienda; height: 100%; text-decoration: none; color : inherit;}






/* Menu de navigation */
nav ul { margin:0;  padding:0;}
nav li {  list-style-type : none; padding : 0px; margin-bottom : 10px; }
nav li a { display : block; margin : 0; background-color : #C9C9D9; border-radius : 10px; padding-top : 20px; padding-bottom : 20px; padding-left : 10px; padding-right : 10px; width:100%; vertical-align : middle; text-align : center; text-decoration : none; color : #44445f; font-style : italic; }



h1 { font-family: "dancing_in_the_rainbow"; font-size: 3.5em; text-align: center; margin-top: 0px;  }
.synopsis,.biographie { width: 80%; text-align: justify;}

label { display : block;  width : 150px; }
fieldset { margin : 1em 0; border : 1px solid #686887; border-radius : 10px; }
/* Cases et boutons radio assez grands (24 pixels) pour être cliqués ou touchés facilement */
input[type="radio"], input[type="checkbox"] { width : 1.5rem; height : 1.5rem; vertical-align : middle; }
textarea { max-width : 100%; }
table { border-collapse : collapse; margin : auto; }
td,th { border : 1px solid black;  width : 300px; height : 30px; text-align : center;}
.sansBordure { border : 0px; width : 30px; padding-left : 0px;}

img.icone { width: 16px; }


/* Liste des pages de résultats */
.listePages { max-width : 400px; margin : auto; padding-top : 20px; text-align: center; }
.listePages p { color : blue; padding: 0px; margin:0px;}
a.lienStart { text-decoration: none; display: inline-block; width : 25px; font-size: smaller; color : blue;}
/* La page courante n'est pas repérée que par la couleur : elle est aussi en gras et soulignée */
a.active { color : #a00000; font-weight : bold; text-decoration : underline;}



/* Accessibilité */

/* L'élément qui a le focus clavier doit toujours être bien visible */
a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline : 3px solid black; outline-offset : 2px;
}

/* Lien d'évitement : hors de l'écran, il apparaît quand on y arrive avec Tab */
.skip-link { position : absolute; top : -10em; left : 1em; z-index : 10; padding : 10px 20px;
             background-color : white; color : black; border-radius : 10px; }
.skip-link:focus { top : 10px; }

/* Texte lu par les lecteurs d'écran mais invisible à l'écran */
.visually-hidden { position : absolute; width : 1px; height : 1px; overflow : hidden;
                   clip-path : inset(50%); white-space : nowrap; }



body{
  display:grid;
  grid-template-columns: 1fr 6fr;
  column-gap: 1em;
  grid-template-areas:
  "h h"
  "menu main";
}

nav{
  grid-area: menu;
}
header{
  grid-area: h;
}

main{
  grid-area: main;
}


/* Si l'écran ne fait pas plus  de 1000 pixels de large */
@media (max-width:1000px) {
  body {
    grid-template-columns: 1fr;
    grid-template-areas:
    "h"
    "menu"
    "main";
   }
  /* La médaille passe au-dessus du titre : le texte clair ne doit pas être écrit sur l'image */
  header h1 { font-size : 2.5em; padding-top: 90px; height : auto; background-size : 80px; background-position : center top; }
  main, header{ margin-left : 0px; }
  main { padding : 15px; }

  nav ul{

      display: flex;
      flex-wrap: wrap;  /* sur un téléphone, les liens passent à la ligne au lieu de dépasser */
      justify-content: center;

  }
  nav li {display: inline-block; margin: 0.5em 1em;}
  td,th { width : auto; }  /* le tableau peut rétrécir avec l'écran */
  td:first-child { overflow-wrap : anywhere; }  /* un nom très long peut passer à la ligne */
}
