/* ------------------------------------------------------------------
   Mise en page adaptative.

   Le theme d'origine n'etait pas reellement responsive :
   - le menu n'affichait ses libelles qu'au survol (largeur 20px au
     repos), donc illisible sur un ecran tactile ;
   - .header-top-left restait a 50% et .footer_grid* a 29,2% quelle que
     soit la largeur ;
   - .header, .footer_grides et .sidebar_top n'avaient aucune regle.

   La colonne laterale a par ailleurs ete deplacee dans le pied de page,
   ce qui libere toute la largeur pour le contenu editorial.
   ------------------------------------------------------------------ */

img, iframe, video, table, pre { max-width: 100%; }
img { height: auto; }
iframe { display: block; }

.header, .footer_grides { width: 100%; }

/* Le contenu occupe desormais toute la largeur du gabarit */
.main { width: 100%; }
.main main[role="main"] { float: none; width: 100%; }
.main main[role="main"] article { max-width: 100%; padding: 0; }

/* ------------------------------------------------ pied de page en 3 colonnes */
.footer_grides .wrap::after { content: ""; display: table; clear: both; }

.footer_grid1,
.footer_grid2,
.footer_grid3 {
  float: left;
  width: 33.333%;
  margin-left: 0;
  padding: 1.5% 2% 1.5% 0;
  box-sizing: border-box;
}

.footer_grid1 h3,
.footer_grid3 h3 {
  font-size: 1.05em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.footer_grid1 p,
.footer_grid3 p { font-size: .85em; line-height: 1.5; margin-bottom: 8px; }
.footer_grid3 ul { list-style: none; padding: 0; margin: 0; }
.footer_grid3 ul li { padding: 4px 0; }
.footer_grid3 .post-grid { overflow: hidden; margin-bottom: 12px; }
.footer_grid3 .post-grid img { float: left; width: 60px; margin-right: 10px; }

/* ---------------------------------------------- tablette et en dessous */
@media all and (max-width: 1024px) {
  .footer_grid1, .footer_grid2, .footer_grid3 { width: 50%; }
}

/* ------------------------------------------------------ ecran tactile */
@media all and (max-width: 768px) {

  .wrap { width: 92%; }

  /* En-tete : logo puis navigation, sur toute la largeur */
  .header-top-left,
  .header-top-right { float: none; width: 100%; text-align: center; }
  .logo { float: none; display: inline-block; }

  /* Menu : les libelles restent visibles sans survol.
     Les animations de repli du theme sont neutralisees. */
  .menu { float: none; padding-top: 10px; }
  ul.menu { display: block; padding: 0; margin: 0; }
  ul.menu li,
  ul.menu.bounce li {
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 0 4px 0 !important;
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
  }
  ul.menu li:empty { display: none; }
  ul.menu a,
  ul.menu li a:hover,
  ul.menu li a.active {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    padding: 12px 16px !important;
    text-align: left;
    line-height: 1.3;
    white-space: normal;
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
  }

  /* Pied de page sur une seule colonne */
  .footer_grid1, .footer_grid2, .footer_grid3 {
    float: none;
    width: 100%;
    padding: 1.5% 0;
  }

  .padding-2x { padding: 1rem 0; }
}

/* ------------------------------------------------------- telephone */
@media all and (max-width: 480px) {
  .wrap { width: 94%; }
  .logo h1 { font-size: 1.8em; padding: 25px 20px 40px 15px; }
  .logo h2 { font-size: 1em; bottom: 30px; }
  ul.menu a,
  ul.menu li a:hover,
  ul.menu li a.active { font-size: 15px; padding: 12px 14px !important; }
  h1 { font-size: 1.5em; }
  h2 { font-size: 1.25em; }
  h3 { font-size: 1.1em; }
  .copy_right { padding: 15px 0; }
}
