* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}
.section_index {
    background: linear-gradient(to bottom, #FFFFFF, #F0F0F0, #E0E0E0, #D1D1D1, #C2C2C2, #B3B3B3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
}

.section_index img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ccc;
}

.section_index a {
    margin-top: 20px;
    text-decoration: none;
    font-size: 18px;
    color: black;
    background-color: #A6A6A6;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.section_index a:hover {
    background-color: #557;
}
.grid-container {
    display: grid;
    grid-template-areas: 
        "header header"
        "nav section"
        "footer footer";
    grid-template-columns: 1fr 3fr;
    grid-template-rows: 17vh auto 7vh;
    height: 100vh;
    overflow: hidden;
}
.header {
    grid-area: header;
    background-color:#F0F0F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    height: 17vh;
    position: relative;
    border-bottom: 2px solid black;
    color: black;
}
.photo_info_container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.photo_profil img {
    height: 100px;
    width: 100px;
    border-radius: 50%;
    border: 2px solid black;
}
.info_photo {
    display: flex;
    flex-direction: column;
    color: black;
    font-size: 14px;
}
.header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    margin: 0;
}
.home_contacte {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.home_contacte img {
    height: 30px;
}
.home_contacte a {
    text-decoration: none;
    color: black;
    font-size: 14px;
}
.contacte {
    border: 2px solid black;
    color: black;
    background-color: gray;
    padding: 5px 10px;
    border-radius: 5px;
}
.nav {
    grid-area: nav;
    display: flex;
    flex-direction: column;
    background-color:#B3B3B3;
    padding: 0;
    overflow-y: auto;
}
.nav a {
    flex: 1;
    text-decoration: none;
    color: black;
    border: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    font-size: 18px;
    font-weight: bold;
}
.img_etude{
    background: linear-gradient(to bottom,#F0F0F0,#E0E0E0);
}
.img_travail{
    background: linear-gradient(to bottom,#E0E0E0,#D1D1D1);
}
.img_competences{
    background: linear-gradient(to bottom,#D1D1D1,#C2C2C2);
}
.img_loisir{
    background: linear-gradient(to bottom,#C2C2C2,#B3B3B3);
}
.section {
    grid-area: section;
    background: linear-gradient(to bottom, #FFFFFF, #F0F0F0, #E0E0E0, #D1D1D1, #C2C2C2, #B3B3B3);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    
}
.font_ecriture {
    line-height: 1.6;
    color: black;
    background-color: #A6A6A6;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
.centretoi {
    text-align: center;
}
.footer {
    grid-area: footer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #B3B3B3;
    padding: 10px;
    border: solid black;
}

.footer img {
    height: 40px;
}
.comps{
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
    gap: 30px;
}
.comp{
    position: relative;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    margin: 10px 40px;
}
.comp img {
    height: 80px;
}
.comp p {
    text-align: center;
    background-color:  #A6A6A6;
    border-radius: 25%;
    padding: 10px;
}
.loisirs{
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
    gap: 30px;
}
.loisir{
    position: relative;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    margin: 10px 70px;
}
.loisir img {
    max-width: 150px;
}
.loisir img:hover{
    transform: scale(2.2);
}
.loisir p {
    text-align: center;
    background-color:  #A6A6A6;
    border-radius: 25%;
    padding: 10px;
}
.contenu_contacte {
    display: flex;
    padding: 0 40px;
}
.info_contacte {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 2px solid black;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: 17vh auto auto 7vh;
        grid-template-areas: 
            "header"
            "section"
            "nav"
            "footer";
    }

    .nav {
        flex-direction: row;
        justify-content: space-around;
        height: auto;
    }

    .nav a {
        flex: none;
        padding: 10px;
    }
}
