
/* < 1500 */

@media (max-width:1500px) {
  /* LOGOS VERTICAUX */
   :root {
     --largeur_tranche_logo_vertical: 4rem;
   }
}


/* < 1200 */

@media (max-width:1199px) {
  .bloc.logos_verticaux {
    display: none;
  }
}

/* < 1000 */

@media (max-width:999px) {


    main {
      /*height: auto;*/
/*      overflow: visible;
*/    }
    header {
      border-bottom: none;
    }

    header #logo { 
      height: var(--header_mobile_height); 
    }

    /*TAILLE DU FORMULAIRE DE RECHERCHE */
    #formulaire_recherche form {
      height: 30px;
      width: 230px;
    }

    /* LOGOS VERTICAUX */
    .bloc.logos_verticaux {
      display: none;
    }

  /* LAYOUT MAIN/ASIDE */
  /* logos verticaux */
  .bloc.logos_verticaux { display: none; }
  .wrapper-main-aside { display: block; }

  /* on cache l'ariane dans le main car on veut qu'il soit fixe au scroll */
  #main_article .wrapper-ariane { display: none; }
  /* on fait apparaître l'ariane dans le body */
  body.article > .wrapper-ariane {
    display: block;
    border-top: var(--p1) solid var(--jaune);
  }


    /* LISTE PAGES */

    section .liste_pages_columns {
      flex-direction: column;
    }
    section .liste_pages_columns > * {
      width: 100%;
    }

    #main_recherche .liste_pages > ul,
    #main_recherche .liste_documents > ul {
      grid-template-columns: repeat(2, 1fr);
      margin-left: calc(0 * var(--m1));
    }



    /* RECHERCHE */

    #main_recherche .pagination-items,
    #main_recherche .liste_images ul {
      margin-left: 0px;
    }

    #main_recherche .liste_images ul {
      column-count: 4;
    }



    /* SOMMAIRE */
    
    #sommaire_texte {
      display: flex; gap: 0px;
      flex-direction: column;
    }
    /* liste d'articles en colonnes */
    .gaufrier ul {
      flex-direction: column;
    }


    /* PAGE PORTAIL */

    #main_portail .texte_portail {
      display: flex; gap: 0px;
      flex-direction: column;
    }
    


    /* RUBRIQUE */

    /* layout pr titre/texte/logo */
    #main_rubrique .rubrique_intro .rubrique_notice {
      grid-template-areas: 
        "rubrique_title"
        "rubrique_logo"
        "rubrique_texte";
    }
    .rubrique_menu_wrapper { display: block; }
    #aside_portail,
    #aside_rubrique {
      position: sticky;
      top: 0px;
      height: auto;
      padding-bottom: var(--p2);
      border-right: 0px;
      width: 100%;
    }
    /* aside rub : titre "Sous-thèmes" au-dessus de la liste d'accès rapide aux articles/sous-thèmes */
    #aside_rubrique .sous_themes_title h2 { display: block; }

    /* rubrique : logo avant notice */
    .rubrique_intro .rubrique_logo {
      order: -1;
    }
    
    /* boulier plus large */
    ul.boulier { width: calc((10 * var(--largeur_boule)) + (6 * 5px)); }
    /* grid-area: row / col; */
    ul.boulier > li:nth-child(1) { grid-area: 1 / 1; }
    ul.boulier > li:nth-child(2) { grid-area: 1 / 3; }
    ul.boulier > li:nth-child(3) { grid-area: 1 / 5; }
    ul.boulier > li:nth-child(4) { grid-area: 1 / 7; }
    ul.boulier > li:nth-child(5) { grid-area: 1 / 9; }

    ul.boulier > li:nth-child(6) { grid-area: 2 / 2; }
    ul.boulier > li:nth-child(7) { grid-area: 2 / 4; }
    ul.boulier > li:nth-child(8) { grid-area: 2 / 6; }
    ul.boulier > li:nth-child(9) { grid-area: 2 / 8; }

    ul.boulier > li:nth-child(10) { grid-area: 3 / 1; }
    ul.boulier > li:nth-child(11) { grid-area: 3 / 3; }
    ul.boulier > li:nth-child(12) { grid-area: 3 / 5; }
    ul.boulier > li:nth-child(13) { grid-area: 3 / 7; }
    ul.boulier > li:nth-child(14) { grid-area: 3 / 9; }

    ul.boulier > li:nth-child(15) { grid-area: 4 / 2; }
    ul.boulier > li:nth-child(16) { grid-area: 4 / 4; }
    ul.boulier > li:nth-child(17) { grid-area: 4 / 6; }
    ul.boulier > li:nth-child(18) { grid-area: 4 / 8; }

    ul.boulier > li:nth-child(19) { grid-area: 5 / 1; }
    ul.boulier > li:nth-child(20) { grid-area: 5 / 3; }
    ul.boulier > li:nth-child(21) { grid-area: 5 / 5; }
    ul.boulier > li:nth-child(22) { grid-area: 5 / 7; }
    ul.boulier > li:nth-child(23) { grid-area: 5 / 9; }
    
    ul.boulier > li:nth-child(24) { grid-area: 6 / 2; }
    ul.boulier > li:nth-child(25) { grid-area: 6 / 4; }
    ul.boulier > li:nth-child(26) { grid-area: 6 / 6; }



    /* ARTICLE MAIN */


    /* ARTICLE ASIDE */
    
    /* suppr sticky */
    #aside_article,
    #aside_article > h3 { position: static; }
    #aside_article { height: auto; }
    /* le h3 "Images" alignés sur les h3 .befored */
    #aside_article > h3 {
      border-top: 0px; padding: 0px;
      display: flex; gap: var(--p1); align-items: center;
      font-weight: 500;
    }
    #aside_article > h3:before {
      content: ""; display: block;
      width: calc(1 * var(--m1));
      flex-shrink: 0;
      aspect-ratio: 1/3;
      background-color: var(--jaune);
    }
    #aside_article > h3::after { display: none; }
    #aside_article figcaption {
      padding: var(--p2);
    }

    /* MENTION MONOGRAPHIE */

    .mono_info {
      margin-bottom: var(--m2);
    }
}

/* < 768 */

@media (max-width:767px) {

  header {padding: 0px}

  header #logo {
    display: block;
    height: auto;
  }
  header #logo a {
    height: var(--header_mobile_height);
    border-bottom: solid 1px var(--gris);
  }
  header #logo a img { margin: auto; }
  #recherche_container {
    padding: var(--p1);
  }
  #formulaire_recherche form {
    margin-left: auto;
    margin-right: auto;
  }


  /* ARTICLE */
  #aside_article figcaption {
    padding: var(--p1);
  }



  /* FOOTER */
  /* mise en page en 1 colonne */
  footer { flex-direction: column; }
  footer .logo_cercle_container {
    display: block; margin: auto;
  }
}



/* < 500 */

@media (max-width:499px) {

  :root {
    --p2: 1.5rem;

    --serif_fs2: 1.15rem;
    --serif_lh2: 1.7rem;
  }

  /* LISTE PAGES */

  section .liste_pages_columns {
    flex-direction: column;
  }
  section .liste_pages_columns > * {
    width: 100%;
  }

  .liste_pages > ul {
    margin-left: 0px;
  }

  #main_recherche .liste_pages > ul,
  #main_recherche .liste_documents > ul {
    grid-template-columns: repeat(1, 1fr) !important;
  }

  /*ARIANE*/
  #main_rubrique #ariane {
    border-top: none;
  }
  
  /* RECHERCHE */

  #main_recherche .pagination-items,
  #main_recherche .liste_images ul {
    margin-left: 0px;
  }

  #main_recherche .liste_images ul {
    column-count: 3;
  }



  /* RUBRIQUE */

  /* bouton sous themes en dessous du titre */
  .rubrique_title {
    flex-direction: column;
  }
  .rubrique_title a {
    align-self: flex-end;
  }
  

  /* ARTICLE */
  body.article > .wrapper-ariane { border-top: none; }

}




