@charset "utf-8";

/* ===========================
   ÉLÉMENTS DE BASE
   =========================== */

main {
  padding: 1rem;
}
.color_main {
  font-size: 25px;
  color: orangered;
}

section {
  margin-bottom: 2rem;
}

h3 {
  font-size: 16px;
  padding: 10px 3px;
}

h4 {
  padding: 5px 0;
}

p {
  margin-bottom: 10px;
}

input {
  margin-bottom: 0.2rem;
  padding: 0.2rem;
  border: 0.5px solid gray;
}

input,
select {
  width: 100%;
  height: 35px;
  box-sizing: border-box;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  box-sizing: border-box;
}

textarea {
  width: 40%;
  height: 100px;
}

th {
  background-color: #f2f2f2;
  text-align: center;
  padding: 8px;
  width: auto;
  border: 1px solid #ccc;
}

td {
  padding: 5px;
  text-align: center;
  border: 1px solid #ccc;
}

td input,
td select {
  display: block;
  margin: 0 auto;
}

label {
  margin-bottom: 0.2rem;
  margin-right: 10px;
  font-family: Arial, sans-serif; 
}

/* ===========================
   CONTENEUR PRINCIPAL
   =========================== */

.container {
  width: auto;
  max-width: 80%;
  margin-bottom: auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Note : .conatainer_VR_FX (typo conservée intentionnellement pour compatibilité) */

.conatainer_VR_FX,
.container_VR_FX {
  width: auto;
}

.container_exe {
  width: 95%;
  margin-left: 20px;
}

.container_chap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 90%;
  margin-right: 3rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.column {
  width: 100%;
  display: block;
  margin-bottom: 20px;
}

/* ===========================
   FORMULAIRES
   =========================== */

.radio-label {
  display: inline-flex;
  align-items: center;
  margin-right: 35px;
  font-size: 14px;
}

.radio-label input[type="radio"] {
  margin-left: 10px;
  transform: scale(1.5);
}

quest_radio label {
  display: inline-flex;
}

.noborder,
.noborder tr,
.noborder td,
.noborder th {
  border: none !important;
}

.noborder {
  border-collapse: collapse;
  border-spacing: 0;
  box-shadow: none !important;
}

.border_no {
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.envoiemail {
  border-radius: 4px;
  border: 1px solid #ccc;
  color: blue;
  max-width: 400px;
  padding: 6px;
  width: 100%;
}

.table-container table {
  border-collapse: collapse !important;
}

.table-reponse table {
  border-collapse: collapse !important;
}

.table-reponse td:nth-child(1) {
  text-align: left !important;
}

/* ===========================
   TABLEAUX — BASE
   =========================== */

table {
  font-size: 15px;
}

.question td label {
  display: block;
  text-align: left;
}

.centered {
  text-align: center;
}

.centered input {
  text-align: center;
  background: #f2f9ff;
}

.centered::placeholder {
  color: #cbc6c6;
  opacity: 1;
}

.centered:focus::placeholder {
  color: transparent;
}

.input-cell {
  text-align: center;
  height: auto;
}

.input-cell input[type="text"] {
  padding-left: 5px;
  text-align: left;
}

@media screen and (max-width: 600px) {
  .input-cell {
    font-size: 14px;
  }
}

.exercise {
  text-align: left;
}

.exercise input {
  text-align: center;
}

tbody input[type="number"] {
  text-align: center;
}

.tbody_journal input,
.tbody_bilan input {
  text-align: center;
}

.tbody_journal input[type="number"] {
  text-align: center;
  background: #f2f9ff !important;
}

.tbody_journal {
  border-collapse: collapse !important;
}

.tbody_cell tr td {
  border-collapse: collapse;
}

.amount {
  text-align: right !important;
}

.amount1 {
  text-align: center;
  height: 30px;
}

/* ===========================
   COLONNES LARGEURS FIXES
   =========================== */

.narrow-col-montant {
  width: 100px;
}

.narrow-col-date {
  width: 150px;
}

.narrow-col-cpt {
  width: 200px;
}

.narrow-col-num,
.narrow-col-fleche {
  width: 60px;
  text-align: center !important;
}

.narrow-col-lib {
  width: 350px;
}

.colonne1 {
  height: 20px;
  text-align: left !important;
  width: auto;
}

.colonne2 {
  width: 300px;
  text-align: left;
}

.colonne2 input[type="text"] {
  width: 300px;
  text-align: left;
}

.colonne3 {
  width: 110px;
  text-align: center;
}

.colonne4 {
  height: 20px;
  text-align: center;
}

.colonne5 {
  height: 20px;
  width: 120px;
  text-align: center;
}

.colonne5 input {
  text-align: center;
}

.colonne_vrai {
  width: 60px;
  background: #f0cdc1;
  text-align: center;
}

.colonne_faux {
  width: 60px;
  background: #dadeed;
  text-align: center;
}

.colonne_vrai input[type="radio"],
.colonne_faux input[type="radio"] {
  width: 17px !important;
  height: 17px !important;
  margin: 0 auto;
  display: block;
}

/* ===========================
   CLASSES D'ÉTAT / RÉSULTAT
   =========================== */

.row1 {
  background: #f0cdc1;
}

.col1 {
  background: #f0cdc1;
  text-align: center !important;
}

.col2 {
  background: #dadeed;
  text-align: center !important;
}

.col1 input[type="text"] {
  text-align: center !important;
}

.col2 input[type="text"] {
  text-align: center !important;
}

.active {
  background-color: #04aa6d;
}

.san-row {
  border-top: 3px solid black;
  background-color: #eeeedd;
  font-weight: bold;
  margin-top: 50px;
}

.result {
  font-weight: bold;
  margin-top: 20px !important;
  clear: both; 
}

.result-row {
  font-weight: bold;
}

.bold-text {
  font-weight: bold;
}

.correct,
.valid,
.valid-row,
.ligne-verte {
  background-color: #33cc33;
}

.incorrect,
.invalid,
.invalid-row,
.ligne-rouge {
  background-color: #ff5c33;
}

.couleur_roug {
  background: red;
  color: white;
  padding: 3px;
  border-radius: 8px;
}

.couleur_vert {
  background: green;
  color: white;
  padding: 3px;
  border-radius: 8px;
}

.feedback-message {
  display: block;
  width: 400px;
  margin-top: 20px;
  font-weight: bold;
  font-size: 1rem;
  color: #333;
}

.feedback-message.correct {
  color: #155724;
  background-color: #c4edda;
  border: 1px solid #c3e6cb;
}

.feedback-message.incorrect {
  color: #ff5c33;
  font-weight: bold;
  background-color: transparent;
}

.title-row,
.total-row {
  background-color: #e0e0e0;
  text-align: center;
  font-weight: bold;
}

/* ===========================
   TABLEAUX SPÉCIFIQUES
   =========================== */

table_ex {
  width: 800px;
  border-collapse: collapse;
}

table_vrai_faux {
  width: 50px;
  border-collapse: collapse;
}

.table_head td {
  width: auto;
}

/* .table_head (règle complète) n'existait que dans le media query
   600px d'origine ; regroupée ici avec .table_head td */

@media screen and (max-width: 600px) {
  .table_head {
    background: #6667aa;
    height: 10%;
    text-align: left;
    width: 100%;
  }

  .table_head td {
    background: #6667aa;
    border: 1px solid #6667aa;
    text-align: left;
    width: auto;
  }
}

.table_journal {
  border-collapse: collapse;
}

.table-donnees {
  font-size: 14px;
  border-collapse: collapse !important;
  width: auto;
  font-family: Arial, sans-serif;
  table-layout: auto;
}

.table-donnees th,
.table-donnees td {
  padding: 8px;
  border-collapse: collapse !important;
  border: 1px solid #aaa !important;
}

.table-donnees td:nth-child(2) {
  background-color: #ffffff;
  text-align: right;
  border: 1px solid #aaa !important;
}

.table-donnees td:nth-child(1),
.table-donnees td:nth-child(3) {
  text-align: left !important;
  background-color: #ffffff;
}

.table-donnees td:nth-child(4) {
  text-align: right;
  background-color: #ffffff;
}

.table-donnees thead th {
  background-color: #f0cdc1;
  font-weight: bold;
  height: 15px;
  border: 1px solid #000;
}

.table_88_96 {
  width: 90%;
  border-collapse: collapse;
  border: 1px solid rgba(0, 0, 0, 0.7);
  font-size: 15px;
}

.table_88_96 th {
  width: 60px;
  text-align: center;
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.7);
  background-color: #f0cdc1;
  font-size: 15px;
}

.table_88_96 td {
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.7);
  text-align: center;
  font-size: 15px;
}

.table_88_96 input[type="number"]::placeholder {
  color: #90c4f0;
  font-style: italic;
}

.tab_ex_chap3 {
  border-collapse: collapse;
  border: none;
}

.tab_ex_chap3 td,
th {
  border: none;
  vertical-align: top;
  padding: 2px 8px;
  width: auto;
  text-align: left;
}

.tab_ex_chap3 td:nth-child(3) {
  max-width: 700px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: left;
}

.tab_ex_chap3 td:nth-child(4) {
  text-align: justify;
}

.cpt_chap3 th {
  background: #f0cdc1;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-weight: bold;
  height: 25px;
  border-collapse: collapse;
}

.table_cpt_chap3 td {
  height: 42px;
}

.table_cpt_chap3 input,
.table_cpt_chap3 select {
  height: 35px;
}

.table_cpt_chap3 input[type="date"] {
  text-align: left;
  padding: 0 5px;
}

.table_cpt_chap3 input[type="text"] {
  text-align: left;
  padding: 5px;
}

.table_cpt_chap3 input[type="number"] {
  text-align: center;
  padding: 5px;
}

.table_cpt_chap3 td:nth-child(1) {
  width: 60px;
}

.table_cpt_chap3 td:nth-child(2) {
  width: 80px;
}

.table_cpt_chap3 td:nth-child(3) {
  width: 400px;
}

.table_cpt_chap3 td:nth-child(4),
.table_cpt_chap3 td:nth-child(5),
.table_cpt_chap3 td:nth-child(6) {
  width: 120px;
}

.table_123_124 {
  border-collapse: collapse;
}

.table_123_124 td:first-child {
  text-align: left;
}

.table_123_124 input {
  text-align: center;
}

.table_123_124 input[type="number"] {
  text-align: center;
  background: #f2f9ff;
}

.table_123_124 th {
  font-weight: bold;
  background: #f0cdc1;
  border-collapse: collapse;
  text-align: center;
  border: 1px solid #aaa;
}

.table_donnees td:first-child {
  text-align: left;
}
.table_donnees th {
  border: 1px solid #aaa;
  background: #f0cdc1;
}
.table_donnees {
  border-collapse: collapse;
}

.tab_cours {
  border-collapse: collapse !important;
}

.tab_cours td {
  background: #ffffff;
  width: 80px;
  border-collapse: collapse;
}

.tab_cours th {
  background: #f0cdc1;
  width: 80px;
  border-collapse: collapse;
}

.table_chap7 tr td {
  border-collapse: collapse;
  border: none;
}

.table_chap7 input {
  height: 30px;
  text-align: center;
}

.table_ex139 tr td {
  font-size: 16px;
  text-align: left;
  height: 17px;
  border: none;
  padding: 1px;
}

.table_ex139_ex td:nth-child(1) {
  text-align: left;
  padding-left: 20px;
}

.table_ex139_ex td:nth-child(2) {
  text-align: right;
}

.table_ex134 td:nth-child(1) {
  text-align: left;
}

.table_ex134 th,
.table_ex134 td {
  border: 1px solid #ccc;
}

.table_ex147 th,
.table_ex147 td {
  border: 1px solid #ccc;
  padding: 3px;
}

.table_ex147 td:nth-child(1) {
  text-align: left;
}

.table_ex147 td:nth-child(2) {
  text-align: right;
  width: 70px;
}

.table_ex149_ex {
  border-collapse: collapse;
  border: none;
  padding: 1px;
}

.table_ex139_ex tr td,
.table_ex149_ex tr td {
  font-size: 14px;
  border-collapse: collapse;
  border: none;
  padding: 1px;
}

.table_ex149_ex td:nth-child(1) {
  text-align: left;
}

.table_ex149_ex td:nth-child(2) {
  text-align: right;
}

.table_145 table {
  margin: 20px;
  width: 50%;
  border-collapse: collapse !important;
}

.table_145 td:nth-child(1) {
  text-align: left;
}

.table_145 th,
.table_145 td {
  border: 1px solid #aaa !important;
}

.table_146 {
  margin: 20px;
  width: 60%;
}

.table_151 {
  margin: 20px;
  width: auto;
}

.table_151 td,
.table_151 input {
  text-align: center;
}

.table_151 td input {
  width: 450px;
}

.table_151 table {
  border-collapse: collapse !important;
}

.table_161_162 {
  width: 100%;
  border: 1px solid;
  font-size: 14px;
  border-collapse: collapse !important;
}

.table_161_162 input {
  font-size: 14px;
}

.table_161_162 th {
  width: 95px;
  border: 1px solid #aaa;
  text-align: center;
  padding: 3px;
  background-color: #f0cdc1;
}

.table_161_162 td {
  border: 1px solid #aaa;
  padding: 3px;
  text-align: left;
}

.table_191 {
  width: 75% !important;
}

.table_191 th,
.table_191 td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: center;
}

.table_191 th:nth-child(1),
.table_191 td:nth-child(1),
.table_191 th:nth-child(3),
.table_191 td:nth-child(3) {
  width: 2%;
}

.table_191 th:nth-child(2),
.table_191 td:nth-child(2),
.table_191 th:nth-child(4),
.table_191 td:nth-child(4) {
  width: 13%;
}

.table_191 th:nth-child(5),
.table_191 td:nth-child(5) {
  width: 10%;
}

.table_191 th:nth-child(6),
.table_191 td:nth-child(6) {
  width: 6%;
}

.table_191 select,
.table_191 input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid #ccc;
}

.table_191 input[type="number"] {
  text-align: center;
}

.table_191 select {
  height: 30px;
  background-color: white;
  text-align: left;
}

.table_ex134,
.table_ex147,
.table_ex217 {
  border-collapse: collapse;
  width: auto;
  font-family: Arial, sans-serif;
  table-layout: auto;
}

.table_ex217 th,
.table_ex217 td {
  border: 1px solid #ccc;
  vertical-align: top;
}

.table_ex217 td:nth-child(1) {
  text-align: left;
}

.table_ex217 td:nth-child(2) {
  text-align: right;
}

.table_ex217 td:nth-child(3) {
  text-align: left;
}

.table_ex217 td:nth-child(4) {
  text-align: right;
}

.table_ex134 thead th,
.table_ex147 thead th,
.table_ex217 thead th {
  background-color: #faeeea;
  font-weight: bold;
  height: 15px;
}

/* Responsive commun à ces 4 classes de tableaux d'exercices */

@media (max-width: 768px) {
  .table_ex134,
  .table_ex147,
  .table_ex217,
  .table-donnees {
    margin: 5px auto;
    width: 100%;
  }
}

.table_plan_compt {
  width: auto;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #dadeed;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.table_plan_compt tr td {
  text-align: left;
  height: 20px;
  vertical-align: top;
  padding: 5px 10px;
  border-collapse: collapse;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.table_plan_compt th {
  background: #f2f2f2;
}

.table_plan_compt tbody td:nth-child(2) {
  border-right: 0 solid rgba(0, 0, 0, 0.2);
}

.table_plan_compt thead th:nth-child(2) {
  border-right: 0 solid rgba(0, 0, 0, 0.2);
}

.table_plan_compt col:nth-child(1),
.table_plan_compt col:nth-child(3) {
  width: 35%;
}

.table_plan_compt col:nth-child(2),
.table_plan_compt col:nth-child(4) {
  width: 15%;
}

borderdroite.table_plan_compt td::nth-child(2) {
  border-right: 1px solid rgba(0, 0, 0, 0.8);
}

.table_plan_compta {
  background: #dadeed;
}

.table_plan_compta td {
  width: 140px;
  text-align: left;
}

.resultTable td {
  text-align: center;
}

.resultTable thead {
  background: #f0cdc1;
}

.resultTable input[type="number"] {
  text-align: center;
  width: 100%;
}

.table_invisible th,
.table_invisible td {
  font-size: 15px;
  padding: 1px !important;
  text-align: left;
  border: none !important;
}

.table_consigne {
  width: 50%;
  border-collapse: collapse;
  margin-top: 20px;
  margin-left: 40px;
  font-size: 14px;
}

.table_consigne td {
  border: 1px solid #ddd;
  padding: 3px;
  text-align: left;
}

.table_consigne tr:nth-child(even) {
  background: #f9f9f9;
}

.tab_affich_card td:last-child,
.tab_affich_card th:last-child {
  border-right: 1px solid transparent !important;
  border-top: 1px solid transparent !important;
  border-bottom: 1px solid transparent !important;
  background: transparent;
}

.table-group {
  display: flex;
  gap: 60px;
  margin-bottom: 40px;
  padding: 10px;
}

.tableau_masses {
  border-collapse: collapse;
  width: 65%;
  display: none;
}

.tableau_masses th,
.tableau_masses td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.tableau_masses th {
  background-color: #f2f2f2;
}

.tableau_divers {
  border: 1px solid #aaa;
  border-collapse: collapse;
  font-size: 14px;
}

.tableau_divers td {
  text-align: left !important;
  border: 1px solid #aaa;
  border-collapse: collapse;
}

.tableau_divers th {
  border: 1px solid transparent;
  border-collapse: collapse;
}

.tableau_divers input[type="number"] {
  background: #f2f9ff;
  height: 30px;
  text-align: center;
}

.tableau_divers table td:nth-child(1) {
  text-align: left !important;
}
/*.tableau_divers td:nth-child(2),td:nth-child(3) {
  text-align: right !important;
}*/
.tableau_divers input[type="text"] {
  height: 30px;
  padding-left: 5px;
  text-align: left;
}

.tableau_divers table td:last-child {
  border: 1px solid transparent !important;
}

.nobox {
  box-shadow: none;
}

/* ── TABLEAU JOURNAL 44/45 ── */

.journalTable45 {
  width: 75%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: Arial, sans-serif;
  table-layout: fixed;
  text-align: center;
}

.journalTable45 select {
  width: 100%;
  height: 35px;
  box-sizing: border-box;
  border: 1px solid #d9a898;
  border-radius: 4px;
  font-size: 14px;
  padding: 0;
}

.thead_journal th,
.thead_bilan th {
  background: #f0cdc1;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  height: 35px;
  border-collapse: collapse;
}

/* ── TABLEAU JOURNAL  ── */

.journaltable {
  width: 70%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: Arial, sans-serif;
  table-layout: auto;
  text-align: center;
}

.journalTable45 thead th,
.journaltable thead th {
  background: #f0cdc1;
  color: #4a1b0c;
  font-weight: 700;
  border: 1px solid #d9a898;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
}

.journaltable td:nth-child(1) input {
  max-width: 50px !important;
}

.journaltable td:nth-child(6) {
  min-width: 100px !important;
}

.journaltable td:nth-child(7) {
  min-width: 110px !important;
}

.journalTable45 td input,
.journalTable45 td select,
.journaltable td input,
.journaltable td select {
  display: block;
  margin: 0 auto;
}

.journalTable45 tbody td,
.journaltable tbody td {
  height: 55px;
  padding: 3px 4px;
  border: 1px solid #e0c4bb;
  vertical-align: middle;
  text-align: center;
  display: table-cell;
}

.exception td:nth-child(3),
.exception td:nth-child(4) {
  max-width: 450px !important;
}

.exception td select {
  max-width: 448px !important;
}

.journalTable45 tbody td .select-wrapper,
.journaltable tbody td .select-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
}

.journaltable select {
  width: auto;
  height: 35px;
  box-sizing: border-box;
  border: 1px solid #d9a898;
  border-radius: 4px;
  font-size: 14px;
  padding: 5px;
}

.journalTable45 img,
.journaltable img {
  width: 50px;
  height: 30px;
  vertical-align: middle;
}

/* ===========================
   TABLE_CPT / TABLE_CPTRES
   =========================== */
.table_cptres {
  border-collapse: collapse;
}
.table_cptres th {
  background: #f0cdc1;
  font-weight: bold;
  height: 35px;
  width: auto;
}

.table_cptres input[type="number"] {
  text-align: center !important;
  width: 97%;
  height: 35px;
  background: #e8f4ff;
  max-width: auto !important;
  color: #333;
}

.table_cptres input[type="number"]::placeholder {
  color: #90c4f0;
  font-style: italic;
}

.table_cptres input[type="number"]:focus::placeholder {
  color: transparent;
}

.table_cptres thead th {
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
}

.table_cptres input[type="text"] {
  text-align: left;
  width: auto;
}
.table_cptres th {
  border: 1px solid #aaa;
}
.thead_bordure th:not(:last-child) {
  border: 1px solid #aaa;
}
.thead_text {
  text-align: right !important;
}

.input-container input[type="number"] {
  text-align: center !important;
  width: 60px;
}

.bilanForm input[type="number"] {
  background: #f2f9ff;
  text-align: center;
}

.bilanForm table {
  border-collapse: collapse !important;
  border: 1px solid #aaa;
}

.titre_cpt {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 15px;
}

table.table_plan td,
table.table_plan th {
  vertical-align: top;
  text-align: left;
  padding: 10px 16px;
  border: 1px solid #d9a898;
  line-height: 1.8;
}

table.table_plan th {
  background: #f0cdc1;
  color: #4a1b0c;
  font-weight: 700;
  text-align: center;
}

table.table_plan td b {
  display: block;
  margin-bottom: 4px;
  color: #4a1b0c;
  text-decoration: underline;
}

.form_ex table {
  width: fit-content;
  table-layout: auto !important;
  border-collapse: collapse;
  font-size: 15px !important;
}

.form_ex .colonne_vrai,
.form_ex .colonne_faux {
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  text-align: center !important;
  font-size: 15px !important;
}

.form_ex th,
.form_ex td {
  border: 1px solid #aaa;
  text-align: center;
  vertical-align: middle;
}

.form_ex td:first-child,
.form_ex th:first-child {
  width: auto !important;
  padding-right: 30px;
}

/* ===========================
   LAYOUTS / CONTENEURS FLEX-GRID
   =========================== */

.compte_res_container {
  display: flex;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.button-container {
  text-align: center;
  margin: 20px 0;
}

.button-container button {
  margin: 0 5px;
}

.tables-container {
  display: flex;
}

@media (max-width: 768px) {
  .tables-container {
    flex-direction: column;
    align-items: center;
  }
}

.quiz-container {
  background: white;
  padding: 0;
  border-radius: 0;
  text-align: center;
}

.grid-container {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  justify-content: center;
  max-width: 90%;
}

@media screen and (max-width: 600px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

.grid-item {
  align-items: center;
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(10, 0, 0, 0.1);
  box-sizing: border-box;
  justify-content: center;
  padding: 10px 20px;
  text-align: center;
  width: 100%;
}

@media screen and (max-width: 600px) {
  .grid-item {
    padding: 10px;
  }
}

/* Table du Bilan */
.table_bilan {
  border-collapse: collapse;
  margin: 10px 0;
  width: auto;
  table-layout: fixed;
}

.table_bilan input[type="number"] {
  background: #f2f9ff;
  box-sizing: border-box;
  height: 30px;
  max-width: 100px;
  padding-left: 3px;
  text-align: center;
  width: 100%;
}

.table_bilan input[type="text"] {
  background: #f2f9ff;
  box-sizing: border-box;
  height: 30px;
  padding-left: 5px;
  text-align: left;
  width: 100%;
}

.table_bilan select {
  background: #f2f9ff;
  box-sizing: border-box;
  height: 30px;
  width: 100%;
  padding-right: 10px;
}

.table_bilan::placeholder,
.actif::placeholder,
.passif::placeholder,
.chargeMontant::placeholder,
.produitMontant::placeholder {
  color: #a1aab5;
  opacity: 1;
}

.table_bilan:focus::placeholder,
.actif:focus::placeholder,
.passif:focus::placeholder {
  color: transparent;
}

/* Largeurs des colonnes (identiques sur les 2 tableaux actif/passif) */

.table_bilan th:nth-child(1),
.table_bilan td:nth-child(1) {
  width: 250px;
}

.table_bilan th:nth-child(2),
.table_bilan td:nth-child(2) {
  width: 120px;
  max-width: 120px;
}

.table_bilan th {
  border-bottom: 1px solid black;
  background: #f0cdc1;
  font-weight: bold;
  height: 35px;
  width: auto;
  text-align: center;
  vertical-align: middle;
}

.table_bilan .sous-titre-actif,
.table_bilan .sous-titre-passif {
  font-weight: bold;
  margin-bottom: 4px;
}

.table_bilan .sous-titre-actif:empty,
.table_bilan .sous-titre-passif:empty {
  display: none;
  margin: 0;
}
.thead_plan {
  border: 1px solid #ccc !important;
}
/* Les 2 tableaux (actif / passif) collés côte à côte */

.bilan-flex {
  display: flex;
  gap: 0;
}

.bilan-flex .table_bilan {
  flex: 0 0 auto;
  width: 370px;
}

/* table des comptes du grand livre*/
.table_cpt {
  border-collapse: collapse;
  margin: 10px 0;
  width: auto;
  table-layout: fixed;
}
.table_cpt td:nth-child(2) {
  border-right: 1px solid black;
  text-align: center;
}

.table_cpt td:nth-child(1) {
  text-align: center;
}
.table_cpt td:nth-child(3) {
  text-align: center !important;
}
.table_cpt td:nth-child(4) {
  text-align: center !important;
}
.table_cpt input[type="number"] {
  background: #f2f9ff;
  box-sizing: border-box;
  height: 30px;
  max-width: 100px;
  padding-left: 3px;
  text-align: center !important;
  width: 100%;
  border-bottom: 1px solid #aaa;
}

.table_cpt input[type="text"] {
  background: #f2f9ff;
  box-sizing: border-box;
  height: 30px;
  padding-left: 5px;
  text-align: center !important;
  width: 100%;
  border-bottom: 1px solid #aaa;
}

.table_cpt th {
  border-bottom: 1px solid #aaa;
  background: #f0cdc1;
  font-weight: bold;
  height: 35px;
  width: auto;
  text-align: center;
  vertical-align: middle;
}



@media screen and (max-width: 600px) {
  .table_cpt {
    font-size: 14px;
    table-layout: auto;
    border-collapse: collapse;
    margin: 10px;
    width: auto;
  }
}

.button-grid {
  display: grid;
  gap: 50px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  margin: 0 auto;
  max-width: 80%;
  padding: 20px;
}

.button-grid a {
  text-decoration: none;
}

@media (max-width: 700px) {
  .button-grid {
    grid-template-columns: 1fr;
  }
}

.large {
  grid-column: span 2;
  font-size: 0.95rem;
  padding: 1.1rem;
}

.small {
  font-size: 0.8rem;
  padding: 0.6rem;
}

.limit_width {
  width: 50%;
}

.motif {
  align-items: center;
  display: flex;
  gap: 1.5em;
  justify-content: center;
  margin: 0.6em 0;
  width: 100% !important;
}

.motif::before,
.motif::after {
  background: linear-gradient(to right, blue, red);
  content: "";
  flex: 1;
  height: 2px;
}

.motif span {
  background: green;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  height: 15px;
  width: 15px;
}

/* ===========================
   BOUTONS
   =========================== */

button_ex {
  width: auto;
  background-color: #dc8b6f;
}

button_ex .a {
  width: auto;
  background-color: #dc8b6f;
  text-decoration: none;
}

button_ex .a:hover {
  width: auto;
  background-color: #dc8b6f;
  text-decoration: none;
  color: #ffffff;
}

.openBtn {
  background: #f0cdc1;
  border: none;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  color: #000000;
  border-radius: 15px;
}

.openBtn:hover {
  background: #6600cc;
  color: white;
}

.check-button {
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
}

.check-button:hover {
  background-color: #45a049;
}

.button_ouvrirsol {
  width: auto;
  padding: 0.5em 1em;
  margin-left: 5px;
  margin-top: 20px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  background-color: #0056b3;
  color: #fff;
  border-radius: 15px;
  transition: background-color 0.2s ease;
}

.button_ouvrirsol:hover {
  background-color: #dc8b6f;
  font-weight: bold;
}

.toggle-button,
.position_veriftot {
  margin-left: 40px;
}

.openmodalcorrigBtn {
  background-color: #0056b3;
  border-radius: 15px;
  border: 4px double white;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  margin-left: 5px;
  margin-top: 20px;
  padding: 0.5em 1em;
  transition: background-color 0.2s ease;
  width: auto;
}

.openmodalcorrigBtn:hover {
  background-color: #dc8b6f;
  border-radius: 10px;
  border: 4px double white;
  box-shadow: rgba(0, 0, 0, 0.2) 0 6px 12px 0;
  font-weight: bold;
}

.button_verif {
  width: fit-content;
  background-color: #f4f8f8;
  border-radius: 15px;
  border: 1px double #6699ff;
  box-shadow:
    rgba(25, 25, 25, 0.04) 0 0 1px 0,
    rgba(0, 0, 0, 0.1) 0 3px 4px 0;
  color: #000000;
  max-width: 350px !important;
  cursor: pointer;
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-right: 30px;
  margin-top: 20px;
  padding: 0.5em 1em;
  position: relative;
  text-align: center;
  text-decoration: none;
  transition: 0.3s ease all;
  z-index: 1;
}

.button_verif:before {
  background-color: #dc8b6f;
  border-radius: 12px;
  bottom: 0;
  content: "";
  left: 50%;
  opacity: 0;
  padding: 0.7em 2em;
  position: absolute;
  right: 50%;
  top: 0;
  transition: 0.5s all ease;
  z-index: -1;
}

.button_verif:hover,
.button_verif:focus,
.bouton_verifGl:hover,
.bouton_verifGl:focus {
  color: white;
}

.button_verif:hover:before,
.button_verif:focus:before,
.bouton_verifGl:hover:before,
.bouton_verifGl:focus:before {
  left: 0;
  opacity: 1;
  right: 0;
  transition: 0.5s all ease;
}

.button_verif:active {
  transform: scale(0.9);
}

.bouton_verifGl {
  background-color: #f0cdc1;
  border-radius: 15px;
  border: 3px double #d7d7d7;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
  color: #000;
  cursor: pointer;
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-right: 30px;
  margin-top: 10px;
  padding: 0.5em 1em;
  position: relative;
  text-align: center;
  text-decoration: none;
  transition: 0.3s ease all;
  z-index: 1;
}

.bouton_verifGl:before {
  background-color: #dc8b6f;
  border-radius: 15px;
  bottom: 0;
  content: "";
  left: 50%;
  opacity: 0;
  position: absolute;
  right: 50%;
  top: 0;
  transition: 0.5s all ease;
  z-index: -1;
}

.position_verif {
  margin-top: 10px;
  margin-left: 10px;
}

@media (max-width: 700px) {
  .bouton_chap {
    width: 100%;
    justify-content: center;
  }
}

.round-button {
  align-items: center;
  background: #118ce6;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  height: 35px;
  justify-content: center;
  margin: 3px 7px;
  position: relative;
  transition: transform 0.3s ease;
  width: 35px;
}

.round-button a {
  color: white;
  text-decoration: none;
}

.round-button:hover {
  background: blue !important;
  border: 12px solid blue;
  transform: scale(1.01);
}

/* ===========================
   PDF / IFRAME / FRAMES
   =========================== */

iframe {
  width: 100%;
  height: 700px;
  margin-top: 20px;
}

#pdfFrame {
  display: none;
  width: 80%;
  height: 500px;
  border: 1px solid #000;
}

#showFrameButton {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.pdfContainer {
  display: none;
  width: 100%;
  height: 600px;
  margin-top: 20px;
}

.pdfFrame {
  background-color: #ffffff !important;
  border: 0.5px solid #bbbbbb;
  height: 95%;
  overflow: auto;
  width: 100%;
}

.pdf-frame {
  width: 100%;
  height: 500px;
  border: 1px solid #ccc;
  display: none;
  margin-top: 20px;
}

#pdfContainer {
  align-items: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  width: 100%;
}

#pdfContainer canvas {
  display: block;
  height: auto !important;
  margin: 0;
  padding: 0;
  width: 95% !important;
}

/* ===========================
   BOUTON FLOTTANT (tab_chang)
   =========================== */

#tab_chang_floatingBtn {
  position: fixed;
  top: 160px;
  right: 2px;
  z-index: 999999;
}

#tab_chang_btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 45px;
  background: orangered;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#tab_chang_btn:hover {
  background: #0066cc;
}

.btn-text {
  background: white;
  color: blue;
  font-size: 18px;
  font-weight: bold;
  padding: 0 10px;
  border-radius: 50%;
  pointer-events: none;
}

/* ===========================
   BOUTON FLOTTANT GÉNÉRIQUE (floating expandable)
   =========================== */

.floating-charge-button,
.floating-transit-button {
  position: fixed;
  top: 160px;
  right: 2px;
  z-index: 9999;
}

.floating-charge-button-inner,
.floating-transit-button-inner {
  background-color: orangered;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  width: auto;
  padding: 0 6px;
  transition:
    width 0.4s ease,
    padding 0.4s ease;
  white-space: nowrap;
  overflow: hidden;
}

.floating-charge-button-inner:hover,
.floating-transit-button-inner:hover {
  padding-right: 10px;
  background-color: #0066cc;
}

.floating-charge-button-inner:hover {
  width: 300px;
}

.floating-transit-button-inner:hover {
  width: 260px;
}

.long-text10,
.long-text11 {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition:
    opacity 0.3s ease,
    max-width 0.4s ease;
}

.floating-charge-button-inner:hover .long-text10 {
  opacity: 1;
  max-width: 270px;
}

.floating-transit-button-inner:hover .long-text11 {
  opacity: 1;
  max-width: 235px;
}

.sign i {
  font-size: 18px;
}

.short-text10,
.short-text11 {
  font-weight: bold;
}

.button-container-droite {
  align-items: center;
  animation: mymove 5s infinite;
  background: #ffffff;
  border-radius: 15px;
  border: 1px solid blue;
  box-shadow: 1px 2px 5px 2px #008899;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-right: 2px;
  margin-top: 30px;
  padding: 5px;
  position: fixed;
  transform: translateY(-50%);
  user-select: none;
  width: 50px;
  z-index: 1001;
}

.button-container-droite.dragging {
  cursor: grabbing;
}

.title_barlat {
  font-size: 12px;
  font-weight: bold;
  margin-top: 10px;
  padding: 8px 4px; /* zone de préhension plus grande */
  cursor: grab;
  touch-action: none; /* évite le scroll de la page pendant le drag */
  user-select: none; /* évite la sélection de texte au drag */
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.title_barlat:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.title_barlat:active {
  cursor: grabbing;
  background-color: rgba(0, 0, 0, 0.1);
}

/* petite icône "poignée" visuelle, optionnelle */
.title_barlat::after {
  content: "";
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  opacity: 0.4;
  margin-top: 2px;
}

.tooltip-container {
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  position: relative;
  transition: all 0.2s;
  width: 44px;
}

.tooltip_dr {
  background: blue;
  border-radius: 50px 0 0 50px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: absolute;
  right: 45px;
  top: 50%;
  transform-origin: right;
  transform: translateY(-50%) scaleX(0);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tooltip-container:hover .tooltip_dr {
  border: 4px double white;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scaleX(1);
}

#sidebar {
  cursor: move;
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 999;
}

/* ===========================
   SCROLL TO TOP
   =========================== */

.scroll-top {
  position: fixed;
  bottom: 10px;
  height: 40px;
  width: 40px;
  background-color: blue;
  border-radius: 50%;
  cursor: pointer;
  transition:
    width 0.3s ease,
    opacity 0.3s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.icon-container {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scroll-top svg {
  width: 45px;
  height: 45px;
  fill: white;
}

.scroll-text {
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  margin-right: 20px;
  font-size: 18px;
  font-weight: bolder;
}

.scroll-top:hover {
  width: 170px;
  background: blue;
  border-radius: 30px;
  padding: 5px;
}

.scroll-top:hover .scroll-text {
  opacity: 1;
}

.position1 {
  left: 50%;
  transform: translateX(-50%);
}

.position2 {
  right: 10px;
}

/* ===========================
   TITRES
   =========================== */

.titre_ex {
  border-bottom: 4mm ridge rgb(211 220 50 / 0.6);
  border-top: 1px solid;
  color: darkblue;
  font-size: 1.6vw;
  font-weight: bold;
  letter-spacing: 3px;
  margin: 20px auto;
  padding: 5px;
  text-align: center;
  text-transform: capitalize;
  width: 23%;
}

.titre_h1 {
  border-bottom: 4mm ridge rgb(211 220 50 / 0.6);
  border-top: 1px solid;
  color: darkblue;
  font-size: 1.8vw;
  font-weight: bold;
  letter-spacing: 3px;
  margin: 30px auto;
  padding: 5px;
  text-align: center;
  text-transform: uppercase;
  width: 80%;
}

.titre_h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.titre_h3 b {
  color: darkblue;
}

.titre_h3 img {
  width: 25px;
  height: auto;
  flex-shrink: 0;
}

.titre_corrige {
  font-size: 20px;
  margin-top: 15px;
  margin-bottom: 0;
}

.titre_phase {
  background: #6667aa;
  color: white;
  padding: 5px;
  border-radius: 10px;
}

.separator {
  font-weight: bolder;
}

.remarque {
  margin-left: 15px;
}

/* ===========================
   MODALES
   =========================== */

/* Modale générique tab_chang */

.tab_chang_modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.tab_chang_modal_content {
  position: relative;
  width: 60%;
  margin: 40px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 10px groove #ff8f00;
}

.tab_chang_close_btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: red;
  border: 1px solid transparent !important;
  color: white;
  font-weight: bolder;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
  font-size: 1.15rem;
}

/* Modale tab_charg */

.tab_charg_modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.tab_charg_modal_content {
  background-color: white;
  margin: 40px auto;
  padding: 20px;
  border-radius: 8px;
  width: 50%;
  position: relative;
  border: 10px groove #ff8f00;
}

.tab_charg_close_btn {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.tab_charg_close_btn:hover {
  color: black;
}

/* Modale tab_transit */

.tab_transit_modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 10%;
  top: 1%;
  width: 60%;
  height: 90%;
  background-color: rgba(255, 255, 255, 1);
  border: 10px groove #ff8f00;
  border-radius: 8px;
  overflow: auto;
}

.tab_Transit_modal_content {
  position: relative;
  background-color: white;
  padding: 20px;
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tab_Transit_modal_content img {
  display: block;
  margin: 40px auto 20px;
  width: 100%;
  height: 100%;
  border: none;
}

/* Modale corrigé */

.modalcorrig {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  border: 2px solid gray;
  box-shadow: 1px 1px 25px 125px rgb(0, 0, 0, 1);
  display: none;
  height: 100% !important;
  justify-content: center;
  left: 5%;
  overflow: hidden;
  padding: 0;
  position: fixed;
  top: 10px;
  width: 90% !important;
  z-index: 9999;
}

.modalcorrig-content {
  background-color: #ffffff !important;
  background: #dcdbdb;
  border-radius: 10px;
  border: 2px solid gray;
  box-sizing: border-box;
  color: blue;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding-top: 1px;
  text-align: center;
  width: 100%;
}

.modal-header {
  align-items: center;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  margin-top: 0;
  padding: 12px 15px;
}

.modal-title {
  flex: 1;
  font-size: 25px;
  font-weight: bolder;
  text-align: center;
}

.close_corrig {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: red;
  border: 1px solid transparent !important;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
  font-size: 1.05rem;
}

tr.sous-titre td {
  font-weight: bold;
  font-style: italic;
  background-color: #e8f0fe;
  padding: 4px 8px;
  color: #1a3a6b;
  border-top: 2px solid #aac4f0;
}

.sous-titre-actif {
  text-align: left;
}

.sous-titre-passif {
  text-align: left;
}

/* Modale consigne */

.modalconsigne {
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  height: 100%;
  left: 0;
  overflow: auto;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

.modalconsigne-content {
  background-color: #fff;
  border-radius: 15px;
  border: 10px groove #ff8f00;
  margin-left: 20%;
  padding: 20px;
  position: relative;
  width: 60%;
}

/* Bouton fermeture générique (close-btn) */

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: red;
  border: 1px solid transparent !important;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
  font-size: 1.05rem;
  z-index: 9999;
}

#closeModalconsigneBtn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: red;
  border: 1px solid transparent !important;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
  font-size: 1.05rem;
  animation: fadeInScale 0.4s ease;
}

/* Modale plan */

.modalplan {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
}

.modalplan[style*="display: block"] {
  display: flex !important;
}

.modalplan-inner {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pdfFrameplan {
  width: 100%;
  flex: 1;
  border: none;
  border-radius: 0 0 12px 12px;
}

.modalplan .close-btn {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: red;
  border: 1px solid transparent !important;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
  font-size: 1.05rem;
}

.tab_chang_close_btn:hover,
.close_corrig:hover,
.close_corrig:focus,
.close-btn:hover,
#closeModalconsigneBtn:hover,
.modalplan .close-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--danger-light);
}

.modalplan-header {
  padding: 14px 50px 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  border-bottom: 1px solid #e5e5e5;
  background: #fafafa;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

/* Modale chat */

.modalchat {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: transparent;
  pointer-events: none;
}

.modalchat-inner {
  position: fixed;
  right: 90px;
  bottom: 80px;
  width: 440px;
  height: 550px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: all;
  border: 0.5px solid #e0e0e0;
  animation: chatSlideIn 0.25s ease;
}

@media (max-width: 480px) {
  .modalchat-inner {
    right: 10px;
    bottom: 70px;
    width: calc(100vw - 20px);
    max-height: 80vh;
  }
}

.modalchat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #4a5a9a;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  flex-shrink: 0;
  position: relative;
}

.modalchat-inner .modalchat-header .close-btn {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50% !important;
  background: red !important;
  border: 1px solid transparent !important;
  color: white !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
  font-size: 1.05rem;
}

.modalchat-inner .modalchat-header .close-btn:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-color: var(--danger-light) !important;
}

.modalchat-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: hidden;
  flex: 1;
}

.chat-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-field label {
  font-size: 13px;
  font-weight: 500;
  color: #444;
}

.chat-field .required {
  color: #c0392b;
  margin-left: 2px;
}

.chat-field input,
.chat-field textarea {
  width: 100%;
  height: auto;
  padding: 9px 12px;
  border: 0.5px solid #ccc;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  background: #fafafa;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    background 0.2s;
  resize: none;
}

.chat-field input:focus,
.chat-field textarea:focus {
  outline: none;
  border-color: #4a5a9a;
  background: #fff;
}

.chat-field textarea {
  height: 210px;
  line-height: 1.5;
}

.chat-error {
  font-size: 12px;
  color: #c0392b;
  background: #fdf0ef;
  border: 0.5px solid #f5c6c6;
  border-radius: 6px;
  padding: 8px 12px;
}

.chat-send-btn {
  width: 50%;
  padding: 10px;
  background: #4a5a9a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.2s,
    transform 0.1s;
  margin-top: 20px;
}

.chat-send-btn:hover {
  background: #3a4a8a;
}

.chat-send-btn:active {
  transform: scale(0.98);
}

.chat-send-btn:disabled {
  background: #9aa3c8;
  cursor: not-allowed;
  transform: none;
}

.modalchat-confirmation {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  gap: 12px;
  flex: 1;
}

.modalchat-confirmation .fa-circle-check {
  font-size: 48px;
  color: #2ecc71;
}

.modalchat-confirmation p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.chat-confirm-sub {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #666 !important;
  line-height: 1.5;
}

.chat-confirm-sub strong {
  color: #4a5a9a;
  font-weight: 500;
}

.modalchat-body::-webkit-scrollbar {
  width: 4px;
}

.modalchat-body::-webkit-scrollbar-track {
  background: transparent;
}

.modalchat-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* ===========================
   CONSIGNE
   =========================== */

.consigne {
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  padding: 20px 25px;
  box-sizing: border-box;
  color: #333;
}

.consigne-title {
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
  font-weight: 600;
}

.consigne-section {
  margin-top: 15px !important;
  margin-bottom: 5px !important;
  font-size: 18px;
  color: #3498db;
  border-left: 8px solid #3498db;
  padding-left: 10px;
}

.consigne-list {
  margin: 0;
  padding-left: 20px;
  list-style-position: outside;
}

.consigne-list li {
  margin-bottom: 8px;
  left: 30px !important;
}

/* ===========================
   CALCULATRICE
   =========================== */

#showCalculator {
  align-items: center;
  background-color: #118ce6;
  border-radius: 50%;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 22px;
  gap: 5px;
  padding: 1px 10px;
}

#showCalculator:hover {
  background-color: blue;
}

.calculator-modal {
  display: none;
  margin-right: 5%;
  position: fixed;
  top: 20%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.calculator {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  padding: 20px;
  position: relative;
  width: 320px;
}

.calculator-header {
  background-color: #00b4cc;
  border-radius: 5px 5px 0 0;
  color: white;
  cursor: move;
  display: block;
  font-size: 18px;
  font-variant: small-caps;
  font-weight: bold;
  margin-bottom: 5px;
  padding: 10px;
  text-align: left;
}

.buttons {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}

.buttons button {
  background-color: #e0e7ff;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 22px;
  padding: 8px;
  transition: background-color 0.2s;
}

.buttons button:hover {
  background-color: #c7d2fe;
}

.buttons button.operator {
  background-color: #0066cc;
  color: white;
  font-size: 28px;
}

.closecalc_btn {
  align-items: center;
  background: white;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  color: #0f8899;
  cursor: pointer;
  display: flex;
  justify-content: center;
  float: right;
  font-size: 16px;
  font-weight: bold;
  height: 30px;
  width: 30px;
  line-height: 1;
  padding: 0;
  margin-top: -5px;
}

.closecalc_btn:hover {
  background: #f0f0f0;
  color: #333;
  cursor: pointer;
  transform: scale(1.15);
}

.buttons button.operator:hover {
  background-color: #e08900;
}

.buttons button#clear {
  background-color: #ef4444;
  color: white;
  grid-column: span 1;
}

.buttons button#clear:hover {
  background-color: #dc2626;
}

.buttons button#equals {
  background-color: #34c759;
  color: white;
  grid-column: span 1;
}

.buttons button#equals:hover {
  background-color: #2da94f;
}

.buttons button#sqrt,
.buttons button#percent,
.buttons button#inverse,
.buttons button#power {
  background-color: #007aff;
  color: white;
}

.buttons button#sqrt:hover,
.buttons button#percent:hover,
.buttons button#inverse:hover,
.buttons button#power:hover {
  background-color: #0063cc;
}

.buttons button#close {
  background-color: #888;
  color: white;
  font-size: 17px;
  grid-column: span 4;
}

.buttons button#close:hover {
  background-color: #666;
}

.display input {
  background-color: #ffffff;
  border-radius: 5px;
  border: 2px solid gray;
  font-size: 30px;
  height: 50px;
  margin-bottom: 10px;
  padding: 10px;
  text-align: right;
  width: 100%;
}

.bravo {
  display: none;
  position: relative;
  width: fit-content;
  padding: 14px 18px;
  margin-top: 20px;
  background: #fff;
  border: 4px solid #e91e63;
  border-radius: 40px;
  color: #333;
  font-weight: 600;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.25);
}

.bravo::after {
  content: "";
  position: absolute;
  top: -18px;
  left: 40px;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 18px solid #e91e63;
}

.bravo::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 44px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 14px solid #fff;
}

/* ===========================
   TOOLTIP
   =========================== */

.tooltip {
  position: absolute;
  right: 105%;
  top: 50%;
  transform: translateY(-50%);
  visibility: hidden;
  opacity: 0;
  background: blue;
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 18px;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent blue;
}

/* Règle unique (était dupliquée 3 fois dans le fichier d'origine) */

#tab_chang_btn:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* ===========================
   DIVERS
   =========================== */

#exerciceForm2 .table_ex {
  width: auto;
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes chatSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===========================
   RESPONSIVE — règles restantes non rattachables
   à une classe unique ci-dessus
   =========================== */

@media (max-width: 768px) {
  .table_tb {
    font-size: 12px;
  }
}

/* ============================================================
   MESSAGES DE VÉRIFICATION - Harmonisés
   ============================================================ */

.message-verif {
    margin-top: 20px !important;
    padding: 5px 10px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    font-weight: bold;
    text-align: center;
    box-sizing: border-box;
    display: block;
    border: 2px solid transparent;
    font-size: 15px;
}

.message-verif.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.message-verif.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;font-weight: bold;
    margin-top: 20px !important;
}

.message-verif.warning {
    color: #856404; padding: 5px 10px;
    background-color: #fff3cd;
    border-color: #ffeeba;font-weight: bold;
    margin-top: 20px !important;
}

.message-verif.info {
    color: #0c5460; padding: 5px 10px;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* ============================================
   MESSAGE DE VÉRIFICATION - GRAND LIVRE (sans background)
   ============================================ */

.message-verif-grid {
    display: block !important;
    margin-top: 20px !important;
    margin-bottom: 10px;
    padding: 0;
    border-radius: 0;
    font-weight: bold;
    max-width: 420px;
    text-align: center;
    margin-left: 0;
    clear: both;
    background-color: transparent !important;
    border: none !important;
}

.message-verif-grid.error {
    color: #ff5c33;
    background-color: transparent !important;
    border: none !important;
}

.message-verif-grid.success {
    color: #155724;
    background-color: transparent !important;   /* ⬅️ AJOUT */
}

.row-correct {
    background-color: #33cc33 !important;
}

.row-incorrect {
    background-color: #ff5c33 !important;
}

tr.correct {
    background-color: #33cc33 !important;
}

tr.incorrect {
    background-color: #ff5c33 !important;
}