/* =====================================================================
   responsive-summit.css — Adaptation mobile & tablette
   Pour les pages de sommets (2013 → 2017). Chargé APRÈS main.css et le
   CSS de l'année pour surcharger le layout desktop plein écran d'origine.
   ===================================================================== */

@media screen and (max-width: 820px) {

  /* Réactiver le défilement vertical */
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100% !important;
  }
  html {
    background-attachment: scroll !important;
    background-position: top center !important;
  }

  /* Barre du haut */
  .container { min-width: 0 !important; padding: 12px 16px 4px !important; }
  .logo { right: 0 !important; }
  #base-line-container { height: auto !important; clear: both; }
  #base-line { font-size: 24px !important; margin: 12px 0 0 2px !important; line-height: 1.15; }
  #base-line span { display: block; margin: 2px 0 0 0 !important; font-size: 17px; font-weight: normal; }

  /* Bouton retour */
  #back { top: 8px !important; left: 16px !important; }

  /* Conteneur principal : pleine largeur, hauteur auto */
  #main-container {
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 12px 12px 40px !important;
  }

  /* Les 3 colonnes -> empilées, pleine largeur */
  #floating-edito-container,
  #floating-news-container,
  #challengers-container {
    position: static !important;
    float: none !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    width: 100% !important;
    max-width: 560px;
    margin: 0 auto 18px !important;
    display: block !important;   /* force l'affichage même sans le JS desktop */
  }

  /* Blocs de texte : hauteur automatique */
  #floating-edito-container .block { height: auto !important; }

  /* En-têtes de section (Videos / Challengers) en pleine largeur */
  #floating-news-container .header,
  #challengers-container .header {
    float: none !important;
    width: 100% !important;
    box-sizing: border-box;
    text-align: center;
    white-space: normal !important;
  }

  /* Vignette vidéo */
  .floating-news {
    float: none !important;
    width: 100% !important;
    height: 190px !important;
    margin: 8px 0 0 0 !important;
    top: 0 !important;
  }
  #news1 { top: 0 !important; height: 190px !important; }
  .floating-news .title {
    float: none !important;
    width: 100% !important;
    margin: 130px 0 0 0 !important;
    text-align: center !important;
  }
  .play { top: 66px !important; left: calc(50% - 28px) !important; }

  /* Galerie des challengers : médaillons centrés qui reviennent à la ligne */
  #gallery { margin-top: 12px !important; }
  #success-container { float: none !important; width: 100% !important; }
  .row, .row.success {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    text-align: center;
  }
  .medaillon {
    float: none !important;
    display: inline-block !important;
    margin: 4px !important;
    vertical-align: top;
  }

  /* Pied de page vide masqué */
  #footer { display: none !important; }
}

@media screen and (max-width: 480px) {
  #base-line { font-size: 21px !important; }
  #base-line span { font-size: 15px; }
  #floating-edito-container .block { padding: 14px !important; }
}
