
/* ========================================
   1. RÉGLAGES GÉNÉRAUX
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Heebo', sans-serif;
    background-color: #ffffff;
    color: #333333;
}


/* ========================================
   2. HEADER ET NAVIGATION
======================================== */


header {
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: #21243d;
    font-weight: bold;
}


/* ========================================
   3. SECTION HERO
======================================== */

.hero {
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    color: #21243d;
    font-size: 42px;
}

.hero p {
    font-size: 18px;
    max-width: 650px;
    line-height: 1.6;
}

/* Bouton principal */

.btn {
    display: inline-block;
    background-color: #cc4545;
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    margin-top: 20px;
}


/* ========================================
   4. SECTION SERVICES
======================================== */


.services {
    padding: 80px 20px;
    background-color: #edf7fa;
    text-align: left;
}

.services h2 {
    color: #21243d;
    font-size: 32px;
    margin-bottom: 15px;
}

.section-intro {
    color: #555555;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Grille des services */

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Cartes des services */


.service-card {
    background-color: white;
    padding: 25px;
    border-radius: 3px;
    box-shadow: none;
}


.service-icon {
    font-size: 40px;
}

.service-card h3 {
    color: #21243d;
    margin-top: 0;
}

.service-card p {
    color: #555555;
    line-height: 1.6;
}


/* ========================================
   5. SECTION PORTFOLIO
======================================== */

.portfolio {
    padding: 80px 20px;
    background-color: #f5f8ff;
    text-align: center;
}

.portfolio h2 {
    color: #2457a7;
    font-size: 32px;
}

.portfolio-intro {
    color: #555555;
    margin-bottom: 40px;
}

/* Grille du Portfolio */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Cartes Portfolio */

 
.portfolio-card {
    background-color: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}


/* Images fluides */

.portfolio-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* Visuels illustratifs */

.portfolio-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    font-size: 65px;
}

.visuel-web {
    background-color: #e0f2ed;
}

.visuel-mobile {
    background-color: #f5e7f7;
}

/* Contenu des cartes */

.portfolio-content {
    padding: 20px;
    text-align: left;
}


/* ========================================
   6. SECTION CONTACT
======================================== */

.contact {
    padding: 80px 20px;
    background-color: #ffffff;
    text-align: center;
}

.contact h2 {
    color: #2457a7;
    font-size: 32px;
}

.contact p {
    color: #555555;
    margin-bottom: 35px;
}

/* Formulaire */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-form label {
    color: #2457a7;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid #2457a7;
    outline-offset: 2px;
}

/* Bouton du formulaire */

.contact-form button {
    background-color: #000000;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}


.contact-form button:hover {
    background-color: #21243d;
}



/* ========================================
   7. FOOTER
======================================== */

footer {
    text-align: center;
    background-color: white;
    padding: 25px;
}


/* ========================================
   8. RESPONSIVE - TABLETTES
   Écrans de 900px et moins
======================================== */

@media (max-width: 900px) {

    .hero h1 {
        font-size: 34px;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ========================================
   9. RESPONSIVE - SMARTPHONES
   Écrans de 600px et moins
======================================== */

@media (max-width: 600px) {

    /* Navigation */

    nav {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    /* Hero */

    .hero {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 28px;
    }

    /* Services */

    .services {
        padding: 50px 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Portfolio */

    .portfolio {
        padding: 50px 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */

    .contact {
        padding: 50px 15px;
    }

    .contact-form {
        padding: 20px;
    }

}

/* Portrait de Thomas */
.hero-photo {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
}


/* Accueil Thomas : texte à gauche, photo à droite */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    grid-template-areas:
        "titre photo"
        "texte photo"
        "bouton photo";
    column-gap: 50px;
    row-gap: 15px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
    align-content: center;
}

.hero h1 {
    grid-area: titre;
    margin: 0;
}

.hero p {
    grid-area: texte;
    margin: 0;
}

.hero .btn {
    grid-area: bouton;
    justify-self: start;
    margin-top: 10px;
}

.hero-photo {
    grid-area: photo;
}

/* Accueil sur smartphone */

@media (max-width: 600px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "titre"
            "photo"
            "texte"
            "bouton";
        text-align: center;
        justify-items: center;
    }

    .hero .btn {
        justify-self: center;
    }

    .hero-photo {
        width: 180px;
        height: 180px;
    }
}

/* Informations des articles récents */
.service-card .article-meta {
    font-size: 14px;
    font-weight: 500;
    color: #555555;
    margin: 12px 0;
}

/* Portfolio Thomas : projets en liste */
.portfolio-grid {
    grid-template-columns: 1fr;
}

/* Portfolio Thomas : image à gauche et texte à droite */

.portfolio-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
}

.portfolio-card img,
.portfolio-card .portfolio-placeholder {
    width: 100%;
    height: 180px;
    aspect-ratio: auto;
}

/* Adaptation du Portfolio sur smartphone */

@media (max-width: 600px) {
    .portfolio-card {
        grid-template-columns: 1fr;
    }

    .portfolio-card img,
    .portfolio-card .portfolio-placeholder {
        height: 200px;
    }
}

/* Portfolio : années et catégories */

.portfolio-content .project-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 12px 0 18px;
}

.portfolio-content .project-year {
    display: inline-block;
    background-color: #21243d;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 20px;
}

.portfolio-content .project-category {
    color: #596b7e;
    font-size: 16px;
}

/* Contact Thomas : deux colonnes */

.contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 40px;
    padding-left: max(20px, calc((100% - 1100px) / 2));
    padding-right: max(20px, calc((100% - 1100px) / 2));
}

/* Le titre et l'introduction occupent toute la largeur */
.contact > h2,
.contact > p {
    grid-column: 1 / -1;
}

/* Informations à gauche */
.contact-info {
    text-align: left;
}

.contact-info h3 {
    color: #21243d;
}

/* Formulaire à droite */
.contact-form {
    width: 100%;
    margin: 0;
}

/* Contact sur smartphone */
@media (max-width: 600px) {
    .contact {
        grid-template-columns: 1fr;
        padding: 50px 15px;
    }
}

/* Style du menu déroulant Contact */

.contact-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    background-color: white;
    color: #333333;
    font: inherit;
}

.contact-form select:focus {
    outline: 2px solid #2457a7;
    outline-offset: 2px;
}

/* Réseaux sociaux de Thomas */

.social-links {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.social-links li {
    margin-bottom: 15px;
    color: #21243d;
    font-size: 16px;
}

/* Contact : formulaire conforme à la maquette */

.contact-form {
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

/* Champs du formulaire Thomas */

.contact-form input,
.contact-form select,
.contact-form textarea {
    background-color: #f5f5f5;
    border: none;
    border-radius: 0;
}

/* Menu hamburger : caché sur ordinateur */
.mobile-menu {
    display: none;
}

/* Navigation sur smartphone */
@media (max-width: 600px) {

    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    /* Cacher les liens du menu ordinateur */
    nav > ul {
        display: none;
    }

    /* Afficher le bouton hamburger */
    nav .mobile-menu {
        display: block;
        position: relative;
    }

    .mobile-menu summary {
        list-style: none;
        cursor: pointer;
        font-size: 28px;
        color: #21243d;
        padding: 5px 10px;
    }

    .mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    /* Liens du menu ouvert */
    .mobile-menu ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        width: 180px;
        padding: 15px;
        margin: 0;
        gap: 15px;
        background-color: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
        z-index: 20;
    }
}
