/* Reset minimal */
* {
    box-sizing: border-box;
}

img {
    display: block;
    height: auto;
}

/* Body */
body {
    font-family: Verdana, Arial, sans-serif;
    text-align: center;
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top, #e3e8ff 0%, #c7d0ff 45%, #b8c2ff 100%);
}

/* Header */
#header {
    background: linear-gradient(to bottom, #7D92FF 0%, #5C77FF 45%, #4A63D6 100%);
    border-bottom: 3px solid white;
    padding-top: 30px;
    position: relative;
}

#text-header {
    width: 380px;
    max-width: 100%;
    filter: drop-shadow(1px 0 white) drop-shadow(-1px 0 white)
            drop-shadow(0 1px white) drop-shadow(0 -1px white);
    margin: 0 auto;
}

#max {
    position: absolute;
    width: 120px;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
     filter:
        drop-shadow(1px 0 0 white)
        drop-shadow(-1px 0 0 white)
        drop-shadow(0 1px 0 white)
        drop-shadow(0 -1px 0 white);
}

#pencil {
    width: 300px;
    margin: -15px auto 15px auto;
}

/* Sous-titre */
#sub-title {
    padding: 0 30px 15px 30px;
}

/* Projets */
.projets {
    width: 80%;
    margin: 30px auto;
    padding: 20px 40px 20px 30px;
    border: 2px solid white;
    border-radius: 5px;

    display: flex;
    align-items: center;
    gap: 20px;

    background: rgba(0, 0, 255, 0.07);
}

/* Images dans les projets */
.projets img {
    flex-shrink: 0; /* empêche les déformations */
}

/* Logos PHP / JS */
.php-js {
    filter: drop-shadow(2px 0 black) drop-shadow(-2px 0 black)
            drop-shadow(0 2px black) drop-shadow(0 -2px black);
    width: 90px;
}

/* Nom du projet */
.nom-projet {
    width: 130px;
    filter: drop-shadow(1px 0 white) drop-shadow(-1px 0 white)
            drop-shadow(0 1px white) drop-shadow(0 -1px white);
}

/* Nom du projet */
.nom-projet2 {
    max-width: 130px;
    width: 100%;
    filter: drop-shadow(1px 0 white) drop-shadow(-1px 0 white)
            drop-shadow(0 1px white) drop-shadow(0 -1px white);
}

/* Texte */
.align {
    text-align: justify;
    flex: 1; /* le texte prend l’espace restant */
}

.red {
    color: #c00000;
}
.white {
    color: white;
}

/* Footer */
#footer {
    background: linear-gradient(to bottom, #0e2f5e 0%, #092a53 45%, #061c3a 100%);
}

#foot {
    width: 100px;
    margin: 0 auto;
}

.mail-icons {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#autreImage {
    max-width: 350px;;
}
#envelop {
        width: 80px;
    }

/* les div du dessus     */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 par ligne par défaut */
    gap: 40px;
    max-width: 82%;
    margin: 20px auto;
    padding: 20px;
}

.box {
    min-height: 70px;
    height: 140px;              /* même hauteur pour toutes */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    background-color: #4242FF;
    padding: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;          /* standard */
    -webkit-user-select: none; /* Chrome/Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* anciens Edge */
    overflow: hidden;          /* coupe ce qui dépasse */
    position: relative;   /* IMPORTANT pour l’absolu */
}

.box img:not(.see) {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /*display: block; */
}

.box:hover {
    cursor: pointer;
    transform: translateY(-3px);
    box-shadow: 0 0 12px rgba(255,255,255,0.25);
    background-color: #B21A1F;
}

.box-inactive {
    min-height: 70px;
    height: 140px;              /* même hauteur pour toutes */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    background-color: #4242FF;
    padding: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;          /* standard */
    -webkit-user-select: none; /* Chrome/Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* anciens Edge */
    overflow: hidden;          /* coupe ce qui dépasse */
    position: relative;   /* IMPORTANT pour l’absolu */
}

.box-inactive img:not(.see) {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /*display: block; */
}

.box-inactive:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 12px rgba(255,255,255,0.25);
}

.see {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 45px;
    pointer-events: none;
    transition: opacity 0.15s ease;
    pointer-events: none; /* ne bloque pas les clics */
}

/* état normal */
.see-hover {
    opacity: 0;
}

/* au hover de la box */
.box:hover .see-hover {
    opacity: 1;
}

.box:hover .see-normal {
    opacity: 0;
}

#glyph {
    color: white;
}


.glyphicon-copyright-mark {
    font-size: 15px;
    color: #ccc;
}
.glyphicon-share-alt {
    color: #ccc;
    font-size: 15px;
}

/* Responsive 1200px */
@media (max-width: 1200px) {
    .projets {
        width: 90%;
        flex-direction: column;
        gap: 10px;
    }
    .grid-container {
        max-width: 93%;
    }
}

/* Responsive sous 800px */
@media (max-width: 800px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 par ligne */
        gap: 20px;
    }
}

/* Responsive 1200px */
@media (max-width: 950px) {
    #max {
       display: none;
    }
}

/* Responsive 420px */
@media (max-width: 420px) {
    body {
        font-size: 14px;
    }

    #header {
        padding-top: 20px;
    }

    #text-header {
        width: 280px;
        margin: 0 auto;
    }

    .box {
    min-height: 50px;
    }

    #pencil {
        width: 200px;
        margin-top: -10px;
    }

    #sub-title {
        padding: 0 15px 15px 15px;
        font-size: 0.95em;
    }

    .projets {
        width: 95%;
        padding: 8px 15px 8px 15px;
        gap: 5px;
    }

    .grid-container {
        max-width: 98%;
    }

    .align {
        text-align: left;
        line-height: 1.5;
    }

    .php {
        width: 80px;
    }

    .js {
        width: 60px;
    }

    .nom-projet {
        width: 130px;
        margin: -15px 0 -15px 0;
    }

    .mail-icons {
        flex-direction: column;
        gap: 10px;
    }

    #autreImage {
        width: 290px;
    }

    #envelop {
        width: 60px;
    }

    #max {
    width: 160px;

}
}
