/* ==========================================================================
   1. RESET & VARIABLES DE BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cabin', sans-serif;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background-color: #181717; 
    /* Motif de points signature */
    background: radial-gradient(#ed6a6c 1px, #181717 1px);
    background-size: 30px 30px;
    background-attachment: fixed;
}

/* ==========================================================================
   2. COMPOSANTS FIXES (Header, Transition, Réseaux)
   ========================================================================== */
.page-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #181717;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.page-transition.hidden {
    opacity: 0;
}

header {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    z-index: 1001;
}

header .navig {
    flex: 0 1 auto;
    order: 1; 
    display: flex;
    font-size: 1.4em;
    font-weight: 500;
    border-radius: 50px;
    border: 3px solid #e5e4e4;
    background-color: #181717;
}

header .navig a {
    text-decoration: none;
    padding: 10px 30px;
    color: #e5e4e4;
    transition: all 0.2s;
}

header .navig a:hover, 
header .navig a.active {
    color: #ed6a6c;
    text-decoration: underline;
    background-color: #e5e4e4;
    border-radius: 50px;
}

header .logo {
    flex: 1; 
    display: flex;
    justify-content: flex-end;
    align-items: center;
    order: 3;
}

header .logo img {
    width: 15%;
}

header::after { 
    content: "";
    flex: 1;
    order: 2;
}

#burger-bouton { display: none; }

footer .reseaux {
    position: fixed;
    top: 4vh; left: 20px; 
    height: 92vh;
    display: grid;
    grid-template-rows: repeat(10, 1fr);
    z-index: 1000;
    justify-items: center;
    align-items: center; 
}

footer img {
    height: 40px;
    filter: invert(100%);
    transition: transform 0.2s, filter 0.3s;
}

footer img:hover {
    transform: scale(1.2);
    filter: brightness(1.2) invert(100%);
}

footer a:nth-child(1) { grid-row: 2; }
footer a:nth-child(2) { grid-row: 5; }
footer a:nth-child(3) { grid-row: 8; } 

/* ==========================================================================
   3. STRUCTURE DU PROFIL (Grid)
   ========================================================================== */
section {
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    scroll-snap-align: start;
}

#profil {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

h2 {
    font-size: 2.1em;
    background-color: #ed6a6c;
    color: #e5e4e4;
    padding: 15px 30px;
    border-radius: 50px;
    border: solid 3px #e5e4e4;
    transition: all 0.5s;
    text-align: center;
    text-transform: uppercase;
    width: fit-content;
}

/* ==========================================================================
   4. BLOCS PRÉSENTATION
   ========================================================================== */
.photo-container {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 100px;
}

.profilphoto {
    width: 50%;
    border-radius: 50px;
    border: solid 3px #ed6a6c;
    transition: transform 0.3s ease;
}

.presentation {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.titre-profil { margin-top: 100px; }

#profil p {
    color: #ed6a6c;
    background-color: #e5e4e4;
    font-size: 1.4em;
    line-height: 1.7;
    text-align: justify;
    margin-top: 20px;
    padding: 30px;
    border-radius: 50px;
    border: solid 3px #ed6a6c;
}

/* ==========================================================================
   5. CADRE COMPÉTENCES
   ========================================================================== */
.cadre {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    padding: 40px; 
    gap: 30px;
    margin: 40px 0;
    border-radius: 50px;
    border: 3px solid #ed6a6c;
    width: 100%;
}

.domaine {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.domaine h3 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #e5e4e4;
    border: solid 3px #ed6a6c;
    color: #ed6a6c;
    border-radius: 50px;
    font-size: 1.1em;
}

.logiciel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 25px;
    background-color: #e5e4e4;
    border: solid 3px #ed6a6c;
    border-radius: 50px;
    justify-items: center;
}

.logiciel img {
    width: 100%;
    max-width: 60px;
    filter: saturate(0);
    transition: all 0.5s ease;
}

.logiciel img:hover {
    filter: saturate(1.5);
    transform: scale(1.15);
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
@media screen and (max-width: 1024px) {
    #profil { grid-template-columns: 1fr; gap: 40px; }
    .photo-container { grid-row: 1; margin-top: 120px; }
    .presentation { grid-row: 2; grid-column: 1; }
    .cadre { grid-row: 3; }
    .profilphoto { width: 60%; }
}

@media screen and (max-width: 900px) {
    .burger-icone { display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 2000; order: 1; }
    .burger-icone span { display: block; width: 35px; height: 3px; background-color: #e5e4e4; border-radius: 5px; transition: 0.3s; }
    
    #burger-bouton:checked ~ .burger-icone span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    #burger-bouton:checked ~ .burger-icone span:nth-child(2) { opacity: 0; }
    #burger-bouton:checked ~ .burger-icone span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    header .navig {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background-color: #181717; flex-direction: column; justify-content: center;
        align-items: center; gap: 40px; border-radius: 0; border-left: 3px solid #ed6a6c;
        transition: 0.5s ease; z-index: 1500;
    }

    #burger-bouton:checked ~ .navig { right: 0; }
    header .logo { order: 2; }
    header .logo img { width: 60px; }

    #profil p { font-size: 1.1em; padding: 20px; border-radius: 30px; }
    .domaine { flex-direction: column; gap: 10px; }
    .logiciel { grid-template-columns: repeat(2, 1fr); }

    footer .reseaux {
        position: relative; height: auto; width: 100%; top: 0; left: 0;
        display: flex; flex-direction: row; justify-content: center;
        gap: 30px; padding: 40px 0; background-color: #181717;
    }
    
    footer { scroll-snap-align: end; }
}

@media screen and (max-width: 480px) {
    .titre-profil { margin-top: 60px; }
    h2 { font-size: 1.4em; }
    .profilphoto { width: 80%; }
}