html {
    scroll-behavior: smooth; /* Active un défilement fluide */
}

/* Conteneur principal */
.titregraphisme {
    position: relative; /* Position relative pour l'alignement */
    text-align: center; /* Centre le texte horizontalement */
    color: #C6AEBC; /* Couleur de fond similaire */
    padding: 43px 0; /* Espacement vertical */
    font-size: 80px; /* Taille de police */
}

/* Texte en contour */
.contour3 ,.contourmoins3 {
    position: absolute; /* Superposition des titres */
    top: 0; /* Alignement en haut */
    left: 50%; /* Centre horizontalement */
    transform: translateX(-50%); /* Ajuste pour un centrage parfait */
    font-family: 'Roboto', sans-serif; /* Police utilisée */
    color: transparent; /* Texte transparent */
    -webkit-text-stroke: 0.5px #C6AEBC; /* Contour blanc */
    z-index: 1; /* Derrière le texte plein */
}

/* Positionnement spécifique des titres en contour */
.contourmoins3 {
    top: -13px; /* Légèrement déplacé vers le haut */
    left: 50%; /* Décalage à gauche */
    opacity: 0.2; /* Opacité réduite pour un effet atténué */
    margin-top:3%;
}

.contour3 {
    top: 13px; /* Légèrement déplacé vers le bas */
    left: 50%; /* Décalage à droite */
    opacity: 0.6; /* Opacité réduite pour un effet atténué */
    margin-top:3%;

}

/* Texte plein au premier plan */
.plein3 {
    position: relative; /* Superposé au texte contour */
    font-family: 'Roboto-Medium', sans-serif; /* Police utilisée */
    color: #C6AEBC; /* Texte blanc */
    z-index: 2; /* Devant les contours */
    margin-top:3%;

}


.graphismeprojet{
    height: 553px;
    background-color: white;
}




.gridgraph {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}






.cardgraph{
    grid-column-start: 2;
}



.cardgraph,.cardgraph2{
    height:219px;
    width:405px;
    border-radius: 15px;
    background-color: #C6AEBC;
    box-shadow: none;
    transition: box-shadow 0.3s ease-in-out; /* Transition douce de l'ombre */
    margin-top:6%;
}

/* Pas d'ombre au survol */
.cardgraph:hover, .cardgraph2:hover{
    box-shadow: 7px 7px 0px 0px  rgb(0,0,0);
    transition: box-shadow 0.3s ease-in-out;
  }


#imgskop{
    height:100px;
    margin-top:4%;
    margin-left:15%;
    position: absolute;
}



#imginfographie{
    height:60px;
    margin-top:5%;
    margin-left:15%;
    position: absolute;
}


.grid a{
    text-decoration: none;
}

#titre{
    font-family: 'Roboto-Medium';
    position: absolute;
    text-align: center;
    color: #000000;
    font-size: 27px;
    margin-top:6%;
    margin-left:3%;
}


#titrecharte{
    font-family: 'Roboto-Medium';
    position: absolute;
    text-align: center;
    color: #000000;
    font-size: 27px;
    margin-top:5%;
    margin-left:3%;
}



#flechegestion{
    position: absolute;
    margin-top:11.5%;
    margin-left:3%;
}

#decouvrir1{
    color: #000000;
    font-family: 'Roboto-Regular';
    position:absolute;
    margin-top:11.65%;
    margin-left:5.5%;
}

/* Cacher la flèche et le texte "découvrir" par défaut */
#flechegestion,
#decouvrir1 {
    opacity: 0;
    transition: opacity 0.3s ease-in-out; /* Transition douce pour l'apparition */
}

/* Afficher la flèche et le texte au survol */
.cardgraph:hover #flechegestion,
.cardgraph:hover #decouvrir1,.cardgraph2:hover #flechegestion,
.cardgraph2:hover #decouvrir1 {
    opacity: 1; /* Rendre visible au survol */
}

/* Optionnel : Animation de déplacement */
#flechegestion {
    transform: translateY(10px);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.cardgraph:hover #flechegestion, .cardgraph2:hover #flechegestion {
    transform: translateY(0); /* Remonte à sa position initiale */
}


/* Animation du soulignement sur le texte "découvrir" */
#decouvrir1 {
    cursor: pointer; /* Curseur pointeur pour indiquer un élément cliquable */
    overflow: hidden;
}

#decouvrir1::after {
    content: '';
    display: block;
    width: 0%;
    height: 1.5px;
    background-color: #000000; /* Couleur de soulignement */
    transition: width 0.3s ease-in-out; /* Transition fluide */
    margin-top: 5px;
}

#decouvrir1:hover::after {
    width: 100%; /* Étend le soulignement sur toute la largeur */
}

  /* Responsive pour les écrans de taille inférieure à 768px (mobile) */
  @media (max-width: 768px) {

    /* Modifier le style de .titre pour qu'il soit bien centré et visible */
    .titregraphisme {
        font-size: 48px; /* Réduit la taille du texte sur mobile */
        margin-left: 5%;
        margin-right: 5%;
        text-align: center; /* Centre le texte pour les petits écrans */
    }

    .titregraphisme h1{
        font-size:40px;
        white-space: nowrap;
        padding-top:5%;
    }
    .plein3{
        position: absolute;
        top:18%;
        left:21%;
    }
    .contour3{
        position: absolute;
        top:2%;
        left:50%;
    }


    #graphismeprojet .gridgraph{
        display: grid;
        grid-template-columns: repeat(1, 1fr);

    }

    .cardgraph, .cardgraph2{
        width:80%;
        margin-left:10%;
    }

    .graphismeprojet{
        margin-bottom:25%;
    }

    .cardgraph, .cardgraph2 {
        position: relative;
        display: flex;
        justify-content: center;
    }
    
    .graphismeprojet .gridgraph .cardgraph #titre{
        margin-left:0;
        white-space: nowrap; /* Empêche les retours à la ligne */       
    }
    .graphismeprojet .gridgraph .cardgraph2 #titrecharte{
        margin-left:0;
        white-space: nowrap; /* Empêche les retours à la ligne */       
    }

    .graphismeprojet .gridgraph .cardgraph #imginfographie{
        position: absolute;
        bottom:70px;
        margin:0; 
    }

    .graphismeprojet .gridgraph .cardgraph2 #imgskop{
        position: absolute;
        bottom:30px;
        margin:0; 
    }
}