/* PLOP */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background:url('../img/back_lettre2.png') top left no-repeat !important;
    background-size:cover !important;
}


h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 20px;
    font-size: clamp(24px, 5vw, 32px);
}
.titre{
width:100%;
}        
.word{
    width:95%;
    margin-left:2.5%;
    background:url('../img/back_mot2.png') top left no-repeat;
    background-size:cover;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.17) 0px -12px 30px, rgba(0, 0, 0, 0.17) 0px 4px 6px, rgba(0, 0, 0, 0.20) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
   
}

.word-to-find {
    text-align: center;
    margin-bottom: 0px;
    padding: 0 5px;         
    font-family: "Changa One", sans-serif;
    font-weight: 400;
    font-style: normal;  
    text-transform: uppercase;
    color:blue;
    font-size:4em;            
    text-shadow: 0px 5px 2px rgba(0,0,0,0.1),
         4px 8px 4px rgba(0,0,0,0.05),
         -4px 8px 2px rgba(0,0,0,0.05);  
    background: -webkit-linear-gradient(#fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;                     
    -webkit-text-stroke: 3px #333; 
}        
.word-to-find strong {
    color: #667eea;
    font-size: clamp(22px, 5vw, 28px);
}        


.cell {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 4vw, 24px);
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;            
    margin-right: -1px;
    margin-bottom: -1px;
    border:1px solid #463933;
    border-style: inset !important;
    background: linear-gradient(0deg,rgba(212, 184, 150, 0.43) 0%, rgba(255, 255, 255, 0) 44%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight:bold;            
    /*font-size:1.5em;*/
    font-size:1.4em;
}

.cell:active {
    transform: scale(0.95);
}

.cell.selected {
    background: #ffd700;
    color: #333;
}

.cell.found {
    background: #4CAF50;
    color: white;
    animation: pulse 0.5s;
}

 .timer-container {
    position:relative;
    margin-bottom: 0px;
    width:95%;
    margin-left:2.5%;
    
    margin-bottom:10px;
}

.timer-ico {
    width: 40px;
    position: absolute;
    top: -20px;
    left: -7px;
    z-index: 1000;
    
}

.timer-label {
    text-align: center;
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.timer-bar-wrapper {
    width: 100%;
    height: 11px;
    background: rgba(255,255,255,0.1);
    border-radius: 0px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.timer-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8d9e48 0%, #63780d 100%);
    border-radius: 0px;
    transition: width 0.1s linear, background 0.3s;
    position: relative;
    overflow: hidden;
}

.timer-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3) 50%,
        transparent
    );
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.timer-bar.warning {
    background: linear-gradient(90deg, #ff9800 0%, #ff5722 100%);
}

.timer-bar.danger {
    background: linear-gradient(90deg, #f44336 0%, #d32f2f 100%);
    animation: pulse-bar 0.5s infinite;
}

@keyframes pulse-bar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: clamp(14px, 3vw, 16px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 1;
}


@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.message {
   
    background:url('../img/btlettre.png') top left no-repeat;
    background-size:cover;   
    text-align: center;
    font-size: clamp(18px, 4vw, 22px);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    width:90%;
    
    font-size: 1.5rem;
    font-weight:bold;
    
   text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
   
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.17) 0px -12px 30px, rgba(0, 0, 0, 0.17) 0px 4px 6px, rgba(0, 0, 0, 0.20) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
   
    
}

.message.show {
    opacity: 1;
}

.message.success {
    /*background: #4CAF50;*/
    color: white;
}

.message.error {
    /*background: #f44336;*/
    color: white;
}

button {
    width: 100%;
    padding: 15px;
    font-size: clamp(16px, 4vw, 18px);
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

.btnew{
display:none;
}


@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    .grid-container {
        gap: 1px;
    }
}


@media screen and (max-width: 480px) {
  /* Styles pour les mobiles */
 .word{
    height: 83px;
    /*margin-bottom: 18px;*/
  }
  
 .word-to-find{
   position:relative;
   top:-7px;         
 }
  
  
  
}




.btCarte{
    width:94%;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 54px 55px, rgba(0, 0, 0, 0.27) 0px -12px 30px, rgba(0, 0, 0, 0.27) 0px 4px 6px, rgba(0, 0, 0, 0.25) 0px 12px 13px, rgba(0, 0, 0, 0.19) 0px -3px 5px;

}

.btCarte.dreponse0{    
    background:transparent url('../img/back_choix_lettre1.png') top left no-repeat;    
    background-size:cover !important;
}
 .btCarte.dreponse1{    
    background:transparent url('../img/back_choix_lettre2.png') top left no-repeat;    
    background-size:cover !important;
}               
.btCarte.dreponse2{    
    background:transparent url('../img/back_choix_lettre3.png') top left no-repeat;    
    background-size:cover !important;
} 
.btCarte.dreponse3{    
    background:transparent url('../img/back_choix_lettre4.png') top left no-repeat;    
    background-size:cover !important;
} 


.btCarte.dreponse_bad{    
    background:transparent url('../img/back_choix_lettre_bad.png') top left no-repeat !important;    
    background-size:cover !important;
} 
.btCarte.dreponse_good{    
    background:transparent url('../img/back_choix_lettre_good.png') top left no-repeat !important;  
    background-size:cover !important;
} 

#imgtec .icogood,
#imgtec .icowrong
{
z-index:2000;
}

#messageparchemin{
position:relative;
padding: 12px 0px;
}

.rouleaux{
width:100%;
position:absolute;
}
.rouleaux.rtop{
top:0;
}
.rouleaux.rbottom{
bottom:0;
}
.parchemin{
    width:80%;
    background:transparent url('../img/parchemin.png') top left no-repeat !important;  
    background-size:cover !important;
    padding:50px 20px;
    margin:30px auto;
    
  font-family: "Gochi Hand", cursive;
  font-weight: 400;
  font-style: normal;
  font-size:31px;
  color:#333;
  text-align:center;
  
  
  
      box-shadow: rgba(0, 0, 0, 0.35) 0px 54px 55px, rgba(0, 0, 0, 0.27) 0px -12px 30px, rgba(0, 0, 0, 0.27) 0px 4px 6px, rgba(0, 0, 0, 0.25) 0px 12px 13px, rgba(0, 0, 0, 0.19) 0px -3px 5px;

}
  