* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    transition: color, background 0.5s;
}

:root {
    --text-color-primary: #0071BC;
    --text-color-secondary: #0071BC;
    --bg-color-primary: #DDE8FD;
    --bg-color-secondary: #FFFFFF88;
    --button-bg-primary: #3662C1;
    --prog-bar-color: #EE6D6B;
}

body {
    background-color: var(--bg-color-primary);
}

.container {
    width: clamp(275px, 90%, 500px);
    margin: auto;
}

.home {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    align-items: center;
}

.logo {
    margin-top: 2rem;
    margin-inline: auto;
    height: 3.5rem;
}

.logo.dark {
    filter: grayscale() brightness(3);
}

.logo.dark {
  filter: none !important;
}


.home h2 {
    color: var(--text-color-primary);
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-top: 1.5em;
}

.home .play {
  margin: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;              /* espace entre flèches et bloc central */
}

/* On garde ton image + bouton bleu dans un bloc */
.play-main {
  position: relative;
}

.home .play img {
    display: block;
}

.home .play a {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    
    color: white;
    font-size: 1.8rem;   /* légèrement plus petit */
    font-weight: bold;
    text-decoration: none;
    text-align: center;

    padding: 8px 1.2em;
    border-radius: 1em;
    background-color: var(--button-bg-primary);

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 160px;   /* largeur minimale */
    height: 55px;       /* hauteur fixe */
    
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Boutons de navigation gauche / droite */
.play-nav {
  /* reset du style iOS */
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;

  /* style visuel */
  font-size: 2.2rem;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--text-color-primary);

  /* pour qu'ils ne ressemblent pas à un bouton gris iOS */
  -webkit-tap-highlight-color: transparent;
}

.play-nav:focus {
  outline: none;
}

.words {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
}

.words h1 {
    color: white;
    margin-top: 2rem;
    font-size: 1.5rem;
    border-radius: 1.5rem;
    padding: 5px 1em;
    background-color: var(--button-bg-primary);
}

.words .word {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.words .word p {
    font-size: clamp(2rem, 10vw, 3rem);
    font-weight: bold;
    color: var(--text-color-primary);
    text-align: center;
}

.words .word .progressbar {
    width: 200px;
    height: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: var(--bg-color-secondary);
    position: relative;
    --prog: 0%;
}

.words .word .progressbar span {
    position: absolute;
    left: 0;
    height: 100%;
    border-radius: 1.5rem;
    background-color: var(--prog-bar-color);
    width: var(--prog);
}

.words .answer {
    margin: auto;
    min-height: 4rem;
    width: clamp(275px, 100%, 350px);
    border-radius: 10px;
    background-color: var(--bg-color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.words .answer p {
    font-size: 2rem;
    color: var(--text-color-secondary);
    text-align: center;
    width: 100%;
}

.words .btn-deck {
    display: flex;
    align-items: center;
}

.words .btn-deck button {
    border: none;
    background-color: transparent;
    margin: 1rem;
}

.words .btn-deck button img {
    height: 4.5rem;
    cursor: pointer;
}

.words .btn-deck button img.dark {
    filter: grayscale() brightness(0.6) contrast(2);
}

.footer {
    margin-top: auto;
    padding: 1rem 0;
    display: grid;
    grid-template-columns: auto 3rem 3rem;
    grid-template-rows: auto auto;
    width: 100%;
}

.footer ul {
    list-style: none;
    grid-column: 1/2;
    grid-row: 1/3;
}

.footer .legal {
    color: var(--text-color-primary);
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
}

.footer img {
    height: 2.5rem;
    margin-left: 0.5rem;
}

.footer #copyright {
    width: 80px;
    object-fit: contain;
    margin-right: 0;
    filter: none !important;
}

.words .footer a {
    grid-column: 2/4;
    grid-row: 1/3;
    display: block;
    margin-top: auto;
}

.words .footer img {
    height: 2.2rem;
}

.words .footer img.dark {
    filter: grayscale() brightness(5);
}

.btn-float {
    position: absolute;
    top: 20px;
    right: 10px;
    height: 35px;
    width: 35px;
    background-color: white;
    border-radius: 50%;
    display: grid;
    place-content: center;
    z-index: 10;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.107);
    border: none;
    cursor: pointer;
}

.btn-float img {
    height: 20px;
}

.dark {
    filter: grayscale();
}

.ham {
    background: transparent;
    border: none;
    position: absolute;
    top: 20px;
    left: 10px;
    height: 35px;
    width: 35px;
    z-index: 15;
}

.ham img {
    height: 20px;
}

.ham img.dark {
    filter: grayscale() brightness(5);
}

.menu {
    position: absolute;
    width: 50%;
    height: 100vh;
    top: 0;
    left: -100%;
    z-index: 10;
    border-radius: 0 2rem 2rem 0;
    background: var(--button-bg-primary);
    display: flex;
    flex-direction: column;
    padding: 5rem 0 0 1rem;
    transition: 0.5s all;
}

.menu.show {
    left: 0;
}

.menu a {
    color: white;
    margin-top: 1.5rem;
    font-size: 18px;
    text-decoration: none;
}

.help {
    position: absolute;
    width: 90%;
    height: 80vh;
    top: -50%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    background-color: var(--button-bg-primary);
    padding: 2rem 3rem;
    border-radius: 2rem;
    font-size: 18px;
    color: white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    gap: 14px;
    z-index: 8;
    transition: 0.5s all;
}

.help-title {
  margin-top: 0;
}

.help.show{
    opacity: 1;
    top: 50%;
}

.ques {
    top: 65px;
}

.menu-overlay {
  position: fixed;
  inset: 0;              /* top:0 right:0 bottom:0 left:0 */
  background: rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;  /* invisible aux clics quand fermé */
  transition: opacity 0.3s;
  z-index: 9;            /* juste sous le menu (10) et sous le bouton ham (15) */
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;  /* capte les clics quand ouvert */
}

.ques img {
    height: 30px;

}

/* -----------------------------
   Exercises page
------------------------------ */
.exercise-card { 
    margin: auto; 
    width: clamp(275px, 100%, 420px); 
    /* background: var(--bg-color-secondary); */
    border-radius: 16px; 
    padding: 18px; 
    box-shadow: 0px 5px 10px rgba(0,0,0,0.08); 
}

.exercise-tense {
  color: var(--text-color-primary);
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

.exercise-sentence {
  /* color: var(--text-color-secondary); */
  color: var(--text-color-primary);
  font-size: 20px;
  text-align: center;
  margin: 10px 0 8px 0;
}

.exercise-hint {
  color: var(--text-color-primary);
  text-align: center;
  margin-bottom: 14px;
}

.exercise-choices {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.exercise-choice {
  border: none;
  /* background-color: var(--button-bg-primary); */
  background-color: var(--bg-color-secondary);
  /* color: white; */
  color: var(--text-color-secondary);
  font-weight: bold;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
}

.exercise-choice:disabled {
  opacity: 0.78;
  cursor: default;
}

.exercise-choice.correct {
  outline: 3px solid rgba(0, 200, 0, 0.35);
}

.exercise-choice.wrong {
  outline: 3px solid rgba(255, 0, 0, 0.30);
}

.exercise-feedback {
  text-align: center;
  min-height: 22px;
  font-weight: bold;
  margin: 8px 0 12px 0;
}

.exercise-feedback.ok { color: #1a7f37; }
.exercise-feedback.bad { color: #c62828; }

.exercise-next {
  display: block;
  width: 100%;
  border: none;
  background-color: var(--prog-bar-color);
  color: white;
  font-weight: bold;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
}

/* -----------------------------
   Tense rules page
------------------------------ */
.tense-card {
  margin: auto;
  width: clamp(275px, 100%, 420px);
  background: var(--bg-color-secondary);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0px 5px 10px rgba(0,0,0,0.08);
}

.tense-title {
  color: var(--text-color-primary);
  font-weight: bold;
  text-align: center;
  margin-bottom: 12px;
}

.tense-rule {
  color: var(--text-color-secondary);
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
  margin: 8px 0 14px 0;
}

.tense-box {
  background: rgba(255,255,255,0.22);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.tense-label {
  color: var(--text-color-primary);
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
  font-size: 14px;
  opacity: 0.9;
}

.tense-example,
.tense-signals {
  color: var(--text-color-secondary);
  text-align: center;
  font-size: 16px;
}

/* Help language switcher */
.help-title{
  margin-bottom: 12px;
  text-align: center;
  font-size: 22px;
}

.help-subtitle{
  margin: 0 0 10px 0;
  text-align: center;
  font-weight: bold;
}

.help-lang{
  margin-bottom: 18px;
}

.help-lang-buttons{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.help-lang-btn{
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-color-secondary);
  color: var(--text-color-primary);
}

.help-lang-btn:active{
  transform: scale(0.98);
}

.help-text{
  margin: 0;
  line-height: 1.35;
}

.help-list{
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.5;
}
.help-list li{
  margin: 8px 0;
}

/* nicer on larger screens */
@media (min-width: 420px){
  .help-lang-buttons{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* -----------------------------
   Home selector (Learn / Exercises / Exam)
------------------------------ */

.play-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: auto;
}

.nav-btn {
    background-color: var(--button-bg-primary);
    color: white;
    border: none;
    font-size: 22px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0px 5px 10px rgba(0,0,0,0.15);
}

.nav-btn:active {
    transform: scale(0.95);
}











