body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f4f4;
  }
  
  /*  Gestion Cookies */
  #cookie-banner {
        position: fixed;
        bottom: 0;
        width: 100%;
        background: linear-gradient(90deg, #0062ff 0%, #4daaff 100%);
        color: white;
        font-family: 'Segoe UI', sans-serif;
        z-index: 9999;
        box-shadow: 0 -4px 8px rgba(0,0,0,0.1);
        animation: fadeInUp 0.4s ease-in;
      }
      .cookie-container {
        max-width: 960px;
        margin: auto;
        padding: 1em;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
        text-align: center;
      }
      .cookie-text {
        margin: 0;
        font-size: 1rem;
      }
      .cookie-buttons {
        display: flex;
        gap: 0.5em;
        flex-wrap: wrap;
        justify-content: center;
      }
      .btn-cookie {
        background-color: white;
        color: #0062ff;
        border: none;
        padding: 0.5em 1.2em;
        border-radius: 25px;
        font-weight: bold;
        cursor: pointer;
        transition: background 0.2s ease;
      }
      .btn-cookie.outline {
        background-color: transparent;
        border: 2px solid white;
        color: white;
      }
      .btn-cookie:hover {
        background-color: #e5f0ff;
      }
      .btn-cookie.outline:hover {
        background-color: rgba(255,255,255,0.15);
      }
      @keyframes fadeInUp {
        from {
          transform: translateY(100%);
          opacity: 0;
        }
        to {
          transform: translateY(0);
          opacity: 1;
        }
      }

  /* SECTION BLEUE */
  .top-section {
    background: linear-gradient(
      to bottom,
      #1a5afe 0%,                         /* Bleu pur */
      #1a5afe 60%,                        /* Maintien du bleu plein */
      rgba(26, 90, 254, 0.8) 75%,         /* Début du fondu */
      rgba(26, 90, 254, 0.4) 85%,         /* Plus doux */
      rgba(245, 245, 245, 0.2) 93%,       /* Presque blanc */
      #f5f5f5 100%                        /* Fond final */
    );
    color: white;
    padding: 4rem 2rem 8rem;
    position: relative;
  }
  
  /* Fin Gestion Cookies */
  
  .container {
    max-width: 800px;
    margin-left: auto;
    margin-right:auto;
    margin-bottom:0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }
  
  .motiv-text {
    font-size: 1.2rem;
    line-height: 1.6;
  }
  
  .motiv-text strong {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 1rem;
  }
  
  /* FORMULAIRE */
  .form-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .form-field label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }
  
  .form-field input,
  .form-field select {
    background: transparent;
    border: none;
    border-bottom: 2px solid #ffffffcc;
    padding: 0.5rem 0;
    color: white;
    font-size: 1rem;
    width: 100%;
    outline: none;
  }
  
  .form-field input::placeholder {
    color: #ffffff88;
  }
  
  .clear-btn {
    padding: 0.5rem 1rem;
    background-color: #ffffff22;
    border: 1px solid #ffffff55;
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    width: fit-content;
  }
  
  #pseudoAccueil{
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-size: 1rem;width: 100%;
    max-width: 250px;
  }

  #selectClasse {
    padding: 0.5rem;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
  }
  

  /* ZONE FLOTTANTE DES MATIÈRES */
  .subject-floating {
    position: relative;
    background-color: #f5f5f5; /* zone blanche ou grise du bas */
    padding-top: 100px;        /* espace pour faire sortir les cartes par le haut */
    z-index: 1;
  }
  
  .subject-card-row {
    position: absolute;
    top: -80px; /* chevauche vers le haut, dans la zone bleue */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    z-index: 2;
  }
  
  
  /* CARTES DE MATIÈRE */
  .subject-card {
    width: 140px;
    aspect-ratio: 1 / 1;
    background-color: white;
    border-radius: 20px;
    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    color: #1a5afe;
    font-size: 1.05rem;
    cursor: pointer;

    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  
  .subject-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  }
  
  .subject-card svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    stroke: #1a5afe;
  }

  /* .subject-views {
    color: grey;
    font-style: italic;
    font-size: 0.8em;
    text-decoration: none;
    display: inline-block;
  } 
  */
  .subject-views {
    background-color: #dbeafe;      /* fond bleu clair */
    color: #1e40af;                 /* bleu vif */
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    font-style: italic;
    display: inline-block;
    margin-top: 6px;
  }
  
  .subject-views.placeholder {
    visibility: hidden; /* pas display:none sinon le navigateur ne réserve pas l'espace */
  }
  
  /* RESPONSIVE */
  @media (max-width: 1490px) {
    .subject-card-row {
      gap: 1rem;
    }
  }

  @media (max-width: 1400px) {
    .subject-floating {
      margin-bottom: 150px;
    }
  }

  @media (max-width: 900px) {
    .subject-card-row {
      position: static; /* ← on enlève absolute ! */
      transform: none;
      width: 100%;
      margin: 0 auto;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1rem;
    }
  
    .subject-floating {
      padding-top: 2rem; /* un petit haut */
      margin-bottom: 100px;
    }
  }  

  @media (max-width: 686px) {
 
    #pseudoAccueil, #selectClasse{
      max-width: 90px;
    }
    .subject-card-row {
      flex-wrap: wrap;
      justify-content: center;
    }
    .subject-card {
      width: 44vw; /* un peu moins de la moitié */
      max-width: 140px;/*none; /* ← très important ici ! */
      aspect-ratio: 1 / 1;
      font-size: 1rem;
      padding: 6px;
    }
  }
  /* En dessous de 420px : 1 carte par ligne */
@media (max-width: 420px) {
  .subject-card {
    width: 44vw;
    aspect-ratio: 1 / 1;
    font-size:1rem;
    padding: 6px;
  }
}


  

  select {
    color: white;
    background-color: transparent;
  }
  option {
    color: black;
    background-color: white;
  }
  .btn-reset {
    background-color: white;
    border: none;
    border-radius: 50%;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    color: #1a5afe;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
  }
  
  .btn-reset:hover {
    background-color: #f0f4ff;
    transform: scale(1.05);
  }
  
  .btn-reset svg {
    width: 24px;
    height: 24px;
  }

  .form-field {
    margin-bottom: 1rem;
  }
  
  .input-with-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .input-with-btn input {
    flex: 1;
  }
  
  