/* RESET ET BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    text-decoration: none;
}

html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background-color: white; }

/* HEADER COMMUN */
header {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}
.lien-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
#header-logo {
    display: block;
    width: 150px;
    height: auto;
    max-width: 55vw;
    max-height: none;
    object-fit: contain;
    opacity: 1;
    visibility: visible;
}
#buttons-header { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.header-button {
    background-color: #493cff;
    color: white;
    border-radius: 10px;
    padding: 8px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.header-button:hover { background-color: #9B94FF; color: white; }

/* MAIN */
main { padding-top: 50px; background-color: white; margin-bottom: 50px; }

/* HERO */
.hero { position: relative; width: 100%; }
.portfolio-container {
    position: relative;
    width: 100%;
    margin-top: min(15vh, 200px);
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    z-index: 1;
}
.hero-description {
    position: relative;
    grid-column: 1 / -1;
    width: 50%;
    padding: 0 2vw;
    margin-bottom: 5px;
    font-size: clamp(10px, 1vw, 16px);
    line-height: 1.2;
    font-weight: bold;
    color: #483CFF;
    z-index: 2;
}
.portfolio {
    grid-column: 1;
    position: relative;
    font-size: min(30vw, 60vh);
    font-weight: 700;
    line-height: 0.65;
    padding-right: 5vw;
    height: 1.15em;
}
.portfolio-port { display: block; color: #9B94FF; }
.portfolio-folio {
    display: block;
    position: absolute;
    top: 0.45em;
    left: 0;
    color: #493CFF;
}
.hero-arrow {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}
#fleche { display: block; width: 10vw; max-height: 30vh; }

/* PROJETS À LA UNE */
.carousel-projects { margin-top: 60px; padding: 45px; }
.projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5vw;
    width: 100%;
    margin-bottom: 70px;
}
.project {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2vw, 30px);
    font-size: 0.5rem;
    border: 1px solid #8f8f8f;
    border-radius: 12px;
    padding: 25px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.project:hover { border-color: #493CFF; box-shadow: 0 6px 20px rgba(73, 60, 255, 0.12); cursor: pointer; }
.project img {
    display: block;
    width: clamp(60px, 12vw, 200px);
    height: clamp(60px, 12vh, 200px);
    object-fit: contain;
    flex-shrink: 0;
    background-color: white;
}
.project-brief { flex: 1; min-width: 0; overflow: hidden; }
.title { overflow-wrap: normal; font-size: 1rem; color: #000000; }
.description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: small;
}

/* BOUTON VOIR PLUS DE PROJETS */
#plus-de-projets {
    background-color: #493cff;
    font-family: 'Poppins', sans-serif;
    color: white;
    border-radius: 10px;
    padding: 8px 15px;
    line-height: normal;
    width: fit-content;
    margin: 0 auto;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}
#plus-de-projets:hover { background-color: #9B94FF; color: white; }

/* TABLETTE */
@media (max-width: 800px) {
    .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project img { width: clamp(60px, 25vw, 130px); height: clamp(60px, 25vh, 130px); }
}
/* MOBILE */
@media (max-width: 650px) {
    header { padding: 15px 20px; }
    #header-logo { width: 120px; max-width: 55vw; }
    .hero-description { width: 90%; }
    .carousel-projects { padding: 20px; }
    .projects { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .project img { width: clamp(60px, 25vw, 200px); height: clamp(60px, 25vh, 200px); }
}

/* FOOTER COMMUN : MÊMES TAILLES SUR LES DEUX PAGES */
footer {
    background-color: #9B94FF;
    display: flex;
    flex-direction: column;
    padding: 50px;
    font-size: 16px;
}
.footer-content {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 25px;
    font-size: 16px;
}
.case { padding-left: 30px; }
.footer-category { font-size: 1rem; color: white; padding-bottom: 15px; }
.categorie { color: white; font-size: 1rem; }
.categorie:hover { color: #483CFF; }
.social-media { display: flex; flex-direction: row; align-items: flex-start; gap: 5px; }
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}
.social-icon:hover { color: #483CFF; }
.social-icon svg { display: block; width: 30px; height: 30px; fill: currentColor; }
.email, .telephone { color: white; font-size: 1rem; transition: color 0.3s ease; }
.email:hover, .telephone:hover { color: #483CFF; }
.footer-credits { text-align: center; padding-top: 100px; font-size: 0.75rem; color: white; }
#contact:target { animation: footer-bleu 2s ease-in-out; }
@keyframes footer-bleu {
    1%, 49% { background-color: #9B94FF; }
    50%, 99% { background-color: #483CFF; }
    100% { background-color: #9B94FF; }
}

/* FOOTER TABLETTE */
@media (max-width: 800px) {
    .footer-content, .footer-content a, .footer-content p, .footer-content h5,
    .footer-category, .categorie, .email, .telephone { font-size: 0.8rem; }
    .footer-credits { font-size: 0.6rem; }
}
/* FOOTER TÉLÉPHONE */
@media (max-width: 600px) {
    footer { padding: 30px 20px; }
}

/* =========================================
   RESPONSIVE TÉLÉPHONE — HEADER ET FOOTER
   ========================================= */

   @media screen and (max-width: 600px) {

    .projects {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .project {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
        overflow: visible;
    }

    .project img {
        display: block;
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: auto;
        object-fit: contain;
    }

    /* TEXTE DU PROJET */

    .project .project-info,
    .project .project-text,
    .project .project-texte {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 15px;
    }
}

@media screen and (max-width: 600px) {

    /* BASE */

    html, body {
        width: 100%;
        max-width: 100%;
    }

    body {
        overflow-x: hidden;
    }

    /* HEADER */

    header {
        width: 100%;
        min-height: 75px;
        max-height: none;
        padding: 12px 15px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    /* LOGO */

    .lien-logo {
        display: flex;
        align-items: center;
        flex-shrink: 1;
        min-width: 0;
    }

    #header-logo {
        display: block;
        width: 105px;
        max-width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }

    /* BOUTONS DU HEADER */

    #buttons-header {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 6px;
        flex-shrink: 0;
    }

    .header-button {
        display: inline-block;
        padding: 6px 10px;
        font-size: 11px;
        line-height: 1.3;
        border-radius: 8px;
        text-align: center;
        white-space: nowrap;
    }

    /* FOOTER */

    footer {
        width: 100%;
        padding: 35px 20px 25px;
        display: flex;
        flex-direction: column;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 30px;
        width: 100%;
    }

    /* BLOCS DU FOOTER */

    .case {
        padding-left: 0;
        width: 100%;
        min-width: 0;
    }

    .footer-category {
        font-size: 14px;
        line-height: 1.5;
        padding-bottom: 10px;
    }

    .categorie,
    .email,
    .telephone {
        font-size: 13px;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    /* RÉSEAUX SOCIAUX */

    .social-media {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 20px;
    }

    .social-icon svg {
        display: block;
        width: 28px;
        height: 28px;
    }

    /* CRÉDITS */

    .footer-credits {
        width: 100%;
        padding-top: 45px;
        text-align: center;
        font-size: 11px;
        line-height: 1.6;
    }

    .footer-credits p {
        font-size: inherit;
    }
}

/* TÉLÉPHONES TRÈS ÉTROITS */

@media screen and (max-width: 360px) {

    header {
        padding: 10px;
        gap: 6px;
    }

    #header-logo {
        width: 85px;
    }

    .header-button {
        padding: 5px 8px;
        font-size: 10px;
    }

    footer {
        padding-left: 15px;
        padding-right: 15px;
    }
}