.fond-code
{
background-image: url(../img_code/fond.jpg); 
background-size: cover;
background-attachment:fixed;
}

.h2link {
    font-family: 'Signika Negative', sans-serif;
    color: rgb(92, 145, 194);
    font-size: 3rem;            
    text-shadow: 2px 2px 0 rgb(0,0,0);
    margin: 0;
    padding: 5px 15px;
    display: flex;              
    align-items: center;        
    gap: 10px;                  
    text-decoration: none;
    background: transparent;     
    transition: all 0.3s ease;   
}

.h2link span {
    transition: color 0.3s ease, transform 0.3s ease;
}

.h2link:hover {
    background-color: rgba(255,255,255,0.1); 
    border-radius: 8px;
}

.h2link:hover .github-icon {
    transform: scale(1.2) rotate(-10deg); /* léger zoom + rotation */
}

.h2link:hover span {
    color: rgb(255, 255, 255);  /* texte devient blanc */
    transform: translateX(5px);  /* petit décalage à droite */
}

.mygithub:hover {
    background: rgb(26, 26, 26);
}

.titrecode h2.titlecode,
.codes h2.titlecode {
    margin-top: 10px;   /* réduit l'espace au-dessus */
    margin-bottom: 0px; /* réduit l'espace en dessous */
    padding: 0;          /* supprime le padding par défaut */
    font-size: 2.5rem;   /* ajuste la taille si nécessaire */
}


.subtitle-code
{
    font-family: 'Audiowide', arial, sans-serif;
    text-shadow: grey 0 0 2px ;
}

.titlecode{
    padding: 0;          /* supprime le padding par défaut */
    color:#EEE;
 
}
.mygithub {
    margin: 60px 25% 0 25%;
    background-color: rgb(26, 26, 26);
    padding: 25px;
    border: 4px ridge gray;

    display: flex;              
    justify-content: center;    
    align-items: center;        
}



.github-icon {
    width: 40px;
    height: auto;
    transition: transform 0.3s ease; /* animation hover */
}


    /*.myother{grid-area: myother;}*/


.codes{grid-area: codes;
        margin: 40px 4% 10px 4%;
        background-color: rgb(65, 65, 65);
        padding: 0px 0px 0px 0px;
        border: 4px ridge gray;
   }

.logolang {
    display: flex;
    justify-content: center;
    flex-flow: row wrap;
    gap: 15px;
    position: relative;
    padding: 15px 0;
    z-index: 1;
}
/*icones de lang*/
.icon {
    position: relative; /* indispensable pour ::after */
    display: inline-block;
    cursor: pointer;
    z-index: 0;
}

.icon img {
    display: block;
    width: 60px;
    height: auto;
    transition: transform 0.3s;
}

.icon:hover img {
    transform: scale(1.1); /* léger zoom */
}

/* Tooltip */
.icon::after {
    content: attr(data-tooltip); /* prend le texte dans data-tooltip */
    position: absolute;
    bottom: 110%; /* au-dessus de l'icône */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 15px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none; /* ne bloque pas le hover */
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10; /* toujours au-dessus de l'image */
}

.icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px); /* petit mouvement vers le haut */
}

/*-------------------------------*/


.endblocks-wrapper {
    display: flex;
    gap: 40px;
    margin: 40px 10px;
    align-items: flex-start;
}

#bloc-code { flex: 1; }
#bloc-code2 { flex: 1; }

/*-------------------------------*/

#bloc-code
{
    margin: 0px 5px 0px 2%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto auto auto 1fr;
    column-gap: 20px;
    background-color: rgb(26, 26, 26);
    border: 4px ridge gray;
    padding: 0 20px 0px 20px;
    color: #EEE;
}

#bloc-code .titrecode {
  font-family: 'Audiowide', arial, sans-serif;
  font-weight: bold;
  grid-column: 1 / 4; /* s’étend sur les 3 colonnes */
  text-align: center;
  font-size: 2.5rem;
  margin-top: 20px;
  margin-bottom: 0px;
}

.study-title {
  text-align: center;
  font-family: 'Audiowide', arial, sans-serif;
  padding-top: 25px;
}

.study-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.study-img {
  width: 120px;
  height: auto;
  border: 2px ridge gray;
  border-radius: 2px;
  margin: 5px 0 5px 0;
}

.study-text {
  text-align: center;
  font-family: 'Signika Negative', sans-serif;
  color: rgb(92, 145, 194);
}

.languages {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center; 
  font-family: 'Signika Negative', sans-serif;
  padding-bottom: 10px;
}

.languages h4{
    margin-bottom: 3px;
}

.languages ul {
  list-style: none;
  padding: 0;
  margin: 0;
  align-self: flex-start;
    width: 100%;
}

.languages li {
  background: rgba(92,145,194,0.2);
  margin: 4px 0;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Signika Negative', sans-serif;
  color: rgb(200,200,200);
}


/*-------------------------------*/

#bloc-code2
{
    margin: 0px 2% 0px 5px;
    display: grid;
    grid-template-columns: 1fr;
    background-color: rgb(63, 63, 63);
    height: max-content;
    border: 4px ridge gray;
    padding-top: 15px;
    text-align: justify;
    align-items: center;
    justify-content: center;
}

#bloc-code2 .titrecode {
  font-family: 'Audiowide', arial, sans-serif;
  font-weight: bold;
  font-size: 1.5rem;
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0px;
}


.cache_IA{display:none;}

.show_IA{
    display:flexbox;
    width: 50px;
    height:50px;
    cursor:pointer;
    background:transparent;
    border:none;
    position:relative;
}

.show_IA:hover{
    transform: rotate(180deg);
    transition: all .4s ease-in-out;
}

.txtia
{
    font-family: 'Audiowide', arial, sans-serif;
    font-size: 120% ;
    color: rgb(109, 124, 138);
    padding: 0 20px 0 20px;
}

.IAS
{
    display: flex;
    justify-content: center; 
    align-items: center;   
    margin: 0px 30% 0px 30%;
}

.IAS:hover{
    background-color: rgba(255,255,255,0.1); 
    border-radius: 4px;
}

.IA-icon {
    width: 40px;
    height: auto;
    transition: transform 0.3s ease; /* animation hover */
}

.IAS:hover .IA-icon {
    transform: scale(1.2); /* agrandissement de 20% */
}

.h3link
{
    font-family: 'Signika Negative', sans-serif;
    color: #EEE;
    font-size: 150% ;
    text-shadow:  rgb(0, 0, 0) 2px 2px 0px;
    margin: 0;
    padding: 10px;
}

.IAS a {
    display: flex;             /* on force l’alignement interne */
    align-items: center;       /* centre verticalement icône + texte */
    gap: 10px;                 /* espace propre */
    text-decoration: none;
    padding: 8px 12px;         /* ne touche pas la hauteur interne */
    line-height: 1;            /* FIX : le texte arrête de descendre */
}

.IAS span {
    line-height: 1;
}



@media only screen and (max-width:768px) /*phone*/
{
.mygithub {
        margin: 20px 15% 20px 15%;
        padding: 15px;
    }

.h2link{font-size: 200% ;}

.endblocks-wrapper {
        flex-direction: column;


    }

    /* Met le bloc languages en premier */
    .codes {
        margin: 10px 0 10px 0;

    }

    /* Studies après languages */
    #bloc-code {
        order: 1;
        margin: 0 0 10px 0;
        grid-template-columns: 1fr; /* une colonne */
        grid-template-rows: auto;
        padding: 15px;
    }

    /* IA Folder en dernier */
    #bloc-code2 {
        order: 2;
        margin: 0 0 10px 0;
        grid-template-columns: 1fr; /* une colonne */
        padding: 15px;
    }

     #bloc-code, #bloc-code2 {
        flex: unset;
        box-sizing: border-box;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;

    }

   

    
}