/*@media (min-width: 600px) and (max-width: 1200px) {*/
    
  .Level{
        margin-top:15px;
        width:auto;
        max-width:100%;
        max-height:70px
    }
    .Score{
        font-weight: 900;
        text-align: center;
        margin-top:8px;   
    }
    .Logo{
        margin-top:5px;
        text-align: center
    }
    .Logo canvas,
    .Logo img{
        max-width:640px;
        height:auto
    }
    .ImgSpc{
        position : relative;
    }
    .card{
        overflow : hidden;
    }
    /* Question zoom : la photo part d'un gros plan et se dézoome en 30 s, comme le chrono */
    .zoomout{
        animation : zoomout 30s linear forwards;
    }
    @keyframes zoomout{
        from { transform : scale(5); }
        to   { transform : scale(1); }
    }
    .Mano{
        position:absolute;
        width : 50px
    }
    .Texte{
        text-align: center;
        margin-top : 50px;
    }
    .Chrono{
        height : 30px;   
    }
    .SpcBtn{
        height:60px;
        width :100%;
        margin-top:5px
    }
    .BtnJouer{
        position : relative;
        height:60px;
        width:80%;
        margin-top: 10px;
        margin-bottom: 10px;
        margin-left: 10px;
        margin-right: 10px;
    }

    /* 
Extra small devices (portrait phones, less than 544px) 
No media query since this is the default in Bootstrap because it is "mobile first"
*/
h1 {font-size:1rem;} /*1rem = 16px*/
p {font-size: 1rem}
  .SpcBtn{font-size:1.5rem;}
  .Score{font-size:1.5rem;}
  .BtnJouer{font-size:1.5rem;}
  .Texte{font-size:1.5rem;margin-top : 10px
  }
/*
####################################################
M E D I A  Q U E R I E S
####################################################
*/
 
/*
::::::::::::::::::::::::::::::::::::::::::::::::::::
Bootstrap 4 breakpoints
*/
/* Small devices (landscape phones, 544px and up) */
@media (min-width: 544px) {  
  h1 {font-size:1.5rem;} /*1rem = 16px*/
  .SpcBtn{font-size:1.5rem;}
  .Score{font-size:1.5rem;}
  .BtnJouer{font-size:1.5rem;}
  .Texte{font-size:1.5rem;margin-top : 10px}
} 
/* Medium devices (tablets, 768px and up) The navbar toggle appears at this breakpoint */
@media (min-width: 768px) {  
  h1 {font-size:1rem;} /*1rem = 16px*/
  .SpcBtn{font-size:1.5rem;}
  .Score{font-size:1.5rem;}
  .BtnJouer{font-size:1.5rem;}
  .Texte{font-size:1.5rem;margin-top : 10px;}
} 
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) { 
  h1 {font-size:3rem;} /*1rem = 16px*/
  .SpcBtn{font-size:2rem;}
  .Score{font-size:2rem;}
  .BtnJouer{font-size:2rem;}
  .Texte{font-size:2rem;}
} 
/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {  
  h1 {font-size:4rem;} /*1rem = 16px*/    
  .SpcBtn{font-size:2rem;}
  .Score{font-size:2rem;}
  .BtnJouer{font-size:2rem;}
  .Texte{font-size:2rem;}
}
 
/*
::::::::::::::::::::::::::::::::::::::::::::::::::::
Custom media queries
*/
 
/* Set width to make card deck cards 100% width */
@media (min-width: 950px) and (max-width:1100px) { 
  h1 {font-size:2.75rem;} 
  .SpcBtn{font-size:2.75rem;}
}


/*
::::::::::::::::::::::::::::::::::::::::::::::::::::
Style "apprentissage ludique" : gros boutons arrondis en relief, couleurs vives, retours animés.
Les couleurs sont fixées ici (pas celles du thème Bootstrap, tiré au hasard : clair ou sombre).
*/
.SpcBtn{
    white-space : nowrap;  /* un nom tient sur une ligne : fit.js réduit le texte si besoin */
    padding-left : 8px;
    padding-right : 8px;
}
.SpcBtn, .BtnJouer{
    border-radius : 16px;
    font-weight : 800;
    transition : transform .08s, box-shadow .08s, background-color .15s;
}
.SpcBtn.btn-primary{
    background : #fff;
    color : #3c3c3c;
    border : 2px solid #e5e5e5;
    box-shadow : 0 5px 0 #e5e5e5;
}
.SpcBtn.btn-primary:hover:not(:disabled){
    background : #ddf4ff;
    border-color : #84d8ff;
    color : #1899d6;
    box-shadow : 0 5px 0 #84d8ff;
}
.SpcBtn:active:not(:disabled), .BtnJouer:active{
    transform : translateY(4px);
    box-shadow : 0 1px 0 rgba(0,0,0,.2) !important;
}
.SpcBtn.btn-success{
    background : #58cc02;
    border : 2px solid #58a700;
    color : #fff;
    box-shadow : 0 5px 0 #58a700;
    animation : pop .45s ease-out;
}
.SpcBtn.btn-danger{
    background : #ff4b4b;
    border : 2px solid #ea2b2b;
    color : #fff;
    box-shadow : 0 5px 0 #ea2b2b;
    animation : shake .4s ease-in-out;
}
.SpcBtn.btn-secondary{
    background : #f7f7f7;
    color : #afafaf;
    border : 2px solid #e5e5e5;
    box-shadow : none;
}
.SpcBtn.btn-success:disabled, .SpcBtn.btn-danger:disabled, .SpcBtn.btn-secondary:disabled{
    opacity : 1;
}
.BtnJouer.btn-primary{
    background : #58cc02;
    border : 0;
    color : #fff;
    text-transform : none;
    letter-spacing : 0;
    box-shadow : 0 5px 0 #58a700;
    animation : bob 1.6s ease-in-out infinite;
}
.Chrono, .Chrono .progress-bar{
    border-radius : 999px;
}
.Score{
    display : inline-block;
    background : #ffc800;
    color : #3c3c3c;
    border-radius : 999px;
    padding : 2px 16px;
}
.card{
    border-radius : 20px;
    border : 2px solid #e5e5e5;
}
#Ovl:not(:empty){  /* le texte du résultat jaillit à chaque réponse (le titre est vide entre deux questions) */
    animation : ovl .6s cubic-bezier(.2, 1.4, .4, 1);
    text-shadow : 0 2px 6px rgba(0,0,0,.6);
    color : #fff;
}
@keyframes pop{
    0%   { transform : scale(1); }
    40%  { transform : scale(1.07); }
    100% { transform : scale(1); }
}
@keyframes shake{
    0%, 100% { transform : translateX(0); }
    20%, 60% { transform : translateX(-8px); }
    40%, 80% { transform : translateX(8px); }
}
@keyframes bob{
    0%, 100% { transform : translateY(0); }
    50%      { transform : translateY(-4px); }
}
@keyframes ovl{
    from { transform : scale(.3) rotate(-6deg); opacity : 0; }
    to   { transform : scale(1) rotate(0); opacity : 1; }
}
@media (prefers-reduced-motion: reduce){  /* le zoom, lui, fait partie du jeu */
    .SpcBtn, .BtnJouer, #Ovl{ animation : none !important; transition : none; }
}

/*
::::::::::::::::::::::::::::::::::::::::::::::::::::
Tout tient dans l'écran, sans défiler, pour la question comme pour la solution : la photo prend la place qui reste,
les boutons et le texte de la solution se tassent quand l'écran est peu haut.
*/
:root{
    --img-max : calc(100vh - 140px);  /* deux colonnes : la photo seule, à gauche */
    --btn-h : clamp(40px, 6.2vh, 60px);
}
@media (max-width: 991.98px){  /* les colonnes s'empilent : la photo laisse la place aux boutons et à la solution */
    :root{ --img-max : max(130px, calc(100vh - 480px)); }
}
@media (min-width: 768px) and (max-width: 991.98px){  /* tablette : boutons plus hauts, texte plus grand */
    :root{ --img-max : max(200px, calc(100vh - 590px)); }
}
@supports (height: 100dvh){  /* sur téléphone, la barre d'adresse mange une partie de la hauteur */
    :root{ --img-max : calc(100dvh - 140px); --btn-h : clamp(40px, 6.2dvh, 60px); }
    @media (max-width: 991.98px){
        :root{ --img-max : max(130px, calc(100dvh - 480px)); }
    }
    @media (min-width: 768px) and (max-width: 991.98px){
        :root{ --img-max : max(200px, calc(100dvh - 590px)); }
    }
}
.ImgSpc{
    width : 100%;
    max-height : var(--img-max);
    object-fit : contain;
    background : #12202a;
}
.SpcBtn{
    height : var(--btn-h);
    margin-top : 4px;
    line-height : 1.1;
}
.BtnJouer{
    height : var(--btn-h);
    margin-top : 6px;
    margin-bottom : 6px;
}
.Chrono{
    height : 20px;
}
#Claim{
    margin-top : 6px !important;
    padding : 2px 8px;
    font-size : .9rem;
}
.Texte{
    margin-top : 4px;
}
.Score{
    font-size : 1.3rem;
    line-height : 1.3;
    margin-top : 6px;
    margin-bottom : 4px;
}
.Level{
    margin-top : 6px;
    max-height : 40px;
}
.SolName{
    font-weight : bold;
    font-size : clamp(1.15rem, 2.2vh + .4rem, 2rem);
    margin : 0;
}
.SolLatin{
    font-style : italic;
    font-size : clamp(1rem, 1.8vh + .3rem, 1.6rem);
    margin : 0;
}
.SolMeta{
    font-size : clamp(.8rem, 1.3vh + .3rem, 1.1rem);
    margin : 2px 0 0;
}
.SolGroup{
    font-weight : bold;
    text-transform : uppercase;
    letter-spacing : .04em;
}

/* Question damier : la photo est cachée par des cases en damier qui s'effacent au hasard pendant les 30 s du chrono
   (le délai de chaque case est fixé par le serveur) */
.Checker{
    position : absolute;
    top : 0;
    right : 0;
    bottom : 0;
    left : 0;
    display : grid;
    grid-template-columns : repeat(8, 1fr);
    grid-template-rows : repeat(6, 1fr);
    pointer-events : none;
}
.Checker .tile{
    box-shadow : inset 0 0 0 1px rgba(255,255,255,.06);
    animation : tileoff .5s ease forwards;  /* avant son délai, la case reste visible */
}
.Checker .tile.a{ background : #1f2c34; }
.Checker .tile.b{ background : #2f4350; }
@keyframes tileoff{
    to { opacity : 0; transform : scale(.6); }
}

/* Le texte d'une proposition suit la hauteur du bouton : jamais plus grand que la place qu'il a */
.SpcBtn{
    font-size : clamp(1rem, calc(var(--btn-h) * .5), 2rem);
    padding-top : 0;
    padding-bottom : 0;
    display : flex;
    align-items : center;
    justify-content : center;
}
