body{
font-size: 90%;
}
label, input { display:block; }
input.text { margin-bottom:12px; width:95%; padding: .4em; }
fieldset { padding:0; border:0; margin-top:25px; }
textarea
{
  width:95%;
}


#liste {
width: 80%;
float: left;
border: solid 0px;
}

/* Ãa retravailler, en particulier les classes td  */

#liste table{border-collapse: collapse;}
#liste tr{margin: 1px;}
#liste tr:nth-child(even) {background: #DDD;}
#liste td .center {padding: 1px; text-align:center}

#liste table  tr td {   border: 1px solid gray;   color: black }

#liste td .leftaligned{ padding-left: 9px !important; white-space: normal;   } } 



#complet {
width: 40%;
float: right;
background-color: #DDD;	
padding: 0px;
border: solid 1px;
}

#complet tr tr:nth-child(odd) {background: white;}
#complet tr th {background: #DDD;}

#menu {
font-size: 110%;
background: #CCC;
}

#menu a:link, #menu a:visited {color: black; text-decoration:none;}
#menu td {
padding-right: 20px;
padding-left: 20px;
padding-top: 5px;
padding-bottom: 5px;
border-right: solid 1px;
}

#restaure tr tr:nth-child(even) {background: white;}
#restaure th {background: #DDD;}
#restaure tr:nth-child(odd) {background: #DDD;}

table.blueTable {
    font-family: "Verdana";                    /*"Courier New", Courier, monospace;*/
    border: 1px solid #1C6EA4;    background-color: #EEEEEE;
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}
table.blueTable td, table.blueTable th {
    border: 1px solid #AAAAAA;
    padding: 3px 2px;
}
table.blueTable tbody td {
    font-size: 1.1em;
}
table.blueTable tr:nth-child(even) {
    background: #D0E4F5;
}
table.blueTable thead {
    background: #1C6EA4;
    background: -moz-linear-gradient(top, #5592bb 0%, #327cad 66%, #1C6EA4 100%);
    background: -webkit-linear-gradient(top, #5592bb 0%, #327cad 66%, #1C6EA4 100%);
    background: linear-gradient(to bottom, #5592bb 0%, #327cad 66%, #1C6EA4 100%);
    border-bottom: 2px solid #444444;
}
table.blueTable thead th {
    font-size: 1.2em;
    font-weight: bold;
    color: #FFFFFF;
    border-left: 2px solid #D0E4F5;
}
table.blueTable thead th:first-child {
    border-left: none;
}

table.blueTable tfoot td {
    font-size: 1em;
}
table.blueTable tfoot .links {
    text-align: right;
}
table.blueTable tfoot .links a{
    display: inline-block;
    background: #1C6EA4;
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 5px;
}



table.responsive {
  /*  border: none;*/
 border-collapse: collapse;
 /* margin: 0;*/
 /* padding: 0;*/
  width: 50%;
  table-layout: fixed;
   text-align: center;
}

table.responsive caption {
  font-size: 1.5em;
  margin: .5em 0 .75em;
}

table.responsive tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;
   text-align: center;
}

table.responsive th {
        border: 1px solid #ddd;
    padding: .625em;
  text-align: center;

}

table.responsive td {
    border: 1px solid #ddd;
    padding: .625em;
    text-align: center;
    vertical-align:middle;
  color:blue;
}



table.responsive th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
   text-align: center;
}

@media screen and (max-width: 600px) {
  table.responsive {
    border: 0;
  }

  table.responsive caption {
    font-size: 1.3em;
  }
  
  table.responsive thead {
   border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0.625em;
    position: absolute;
    width: 1px;
     text-align: center;
  }
  
  table.responsive tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
    text-align:center;
  }
  
  table.responsive td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: .8em;
    text-align: center;
    
  }
  
  table.responsive td::before {
    /*
    * aria-label has no advantage, it won't be read inside a table
    content: attr(aria-label);
    */
   /* content: attr(data-label);*/
    float: left;
    font-weight: bold;
    text-transform: uppercase;
      text-align: center;
    
  }
  
  table.responsive td:last-child {
   /* border-bottom: 0;*/
  }
}

table.test {
    border-collapse: collapse;
      width: 90%;
  table-layout: fixed;
}

table.test td, th {
  border: 2px solid #999;
  padding: 0.5rem;
  text-align: center;
}

table.test td {
    color:blue;
    font-size: 1em;
}







table.Sticky {
  text-align: left;
  position: relative;
  border-collapse: collapse; 
}
table.Sticky th, td {
  padding: 0.25rem;
}

table.Sticky th {
  background: white;
  position: sticky;
  top: 0; 
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
}


.orientation_update {
    display: none;
}

.admissibilites_update {
    display:none; 
}	    


.integration_update {
    display:none; 
}	    




.admissibilites_show {
    display:none;
}

.ecole_show {
    display:none;
}


/* --- CORRECTIF DESKTOP (Restauration du design d'origine) --- */

/* On applique aux nouveaux TH le même style que vos anciens TD */
#liste table th {
    border: 1px solid gray;
    color: black;
    background: #DDD; /* Gris comme avant */
    padding: 3px;     /* Padding d'origine approximatif */
    text-align: center;
    font-weight: bold;
}

/* On s'assure que les cellules du tableau gardent leur aspect */
#liste table td {
    border: 1px solid gray;
    padding: 3px;
    vertical-align: middle; /* Aligne les boutons au centre verticalement */
}

/* On redonne leur taille normale aux boutons sur Desktop */
#liste .ui-button {
    font-size: 1em !important; /* Taille de police normale */
    padding: .4em 1em !important; /* Espacement standard jQuery UI */
    margin: 1px;
}


/* --- DÉBUT DES AJOUTS MOBILE --- */
@media screen and (max-width: 768px) {

    /* 1. On remet tout sur une seule colonne */
    body {
        font-size: 100%; /* On augmente la taille de base */
        padding: 5px;
    }
    
    #liste, #complet {
        width: 100%;
        float: none;
        margin: 0;
        border: none;
    }

    /* 2. Menu : on le rend plus facile à cliquer */
    #menu table, #menu tr, #menu td {
        display: block;
        width: 100%;
        border: none;
    }
    #menu td {
        border-bottom: 1px solid #999;
        padding: 15px 10px; /* Zone de clic plus grosse */
        text-align: center;
    }

    /* 3. Formulaires et Inputs : éviter le zoom automatique de l'iPhone */
    input, select, textarea, button {
        font-size: 16px !important; /* Taille mini pour éviter le zoom */
        height: 40px; /* Hauteur mini tactile */
        width: 100%;
        box-sizing: border-box; /* Pour ne pas dépasser la largeur */
    }

    /* 4. Transformation du Tableau AJAX (#liste) en mode "Cartes" 
       C'est la partie la plus importante pour votre affichage principal */
    #liste table, #liste thead, #liste tbody, #liste th, #liste td, #liste tr {
        display: block;
    }

    /* On cache l'entête du tableau (Num, Nom, Prénom...) car on va les afficher ligne par ligne */
    #liste thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    #liste tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        background: #fff;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    #liste td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50% !important; /* Place pour le libellé */
        text-align: right; /* Valeur à droite */
        min-height: 30px;
        display: flex;       /* Flexbox pour aligner verticalement */
        align-items: center; /* Centrer verticalement */
        justify-content: flex-end; /* Aligner à droite */
    }

    /* On ajoute le nom de la colonne via CSS (voir étape 3 JS) ou on force le layout */
    /* Cette astuce permet d'avoir "Nom : Dupont" sur une ligne */
    #liste td:before {
        position: absolute;
        top: 0;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        height: 100%;
        display: flex;
        align-items: center;
        content: attr(data-label); /* MAGIE ICI */
    }
    
    /* Boutons d'édition plus gros */
    .ui-button {
        width: auto !important; 
        padding: 10px !important;
    }
}
