/* ==========================================================================
   emigreen.com : adaptations tablette et mobile
   Ce fichier est chargé en dernier sur toutes les pages.
   Il ne modifie rien sur grand écran (au-delà de 1100 px),
   à l'exception du bouton burger, invisible sur ordinateur.
   Pour revenir à l'état précédent : retirer ce fichier.
   ========================================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: clip;
}

/* --------------------------------------------------------------------------
   Barre du haut fixe, sur toute la largeur de l'écran
   En haut de page : fond transparent (le décor de la home reste visible).
   Dès qu'on défile : fond #F7F7F7 d'un bord à l'autre, sans ombre.
   La classe header_scrolled est ajoutée par menu.js.
   -------------------------------------------------------------------------- */

.header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1100;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: -1;
    width: 100vw;
    transform: translateX(-50%);
    background-color: #F7F7F7;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.header_scrolled .header {
    background-color: #F7F7F7;
}

.header_scrolled .header::before {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Liens du menu vers une section de la home (Derniers projets, Autrice)
   La barre du haut étant fixe, on laisse sa hauteur au-dessus du titre
   pour qu'il ne soit pas caché sous la barre à l'arrivée.
   -------------------------------------------------------------------------- */

#latest,
#author {
    scroll-margin-top: 120px;
}

@media (max-width: 900px) {
    #latest,
    #author { scroll-margin-top: 80px; }
}

/* --------------------------------------------------------------------------
   Pied de page : liens sous les titres de colonne (Quick Links…)
   Graisse plus légère que les titres, pour mieux les distinguer.
   -------------------------------------------------------------------------- */

.footer_section_title ~ a,
.footer_section_title ~ * a {
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Réalisations : noms des onglets (Identité visuelle, Logo…)
   Même graisse légère que les liens du pied de page.
   L'onglet actif reste repéré par son soulignement.
   -------------------------------------------------------------------------- */

.tablinks {
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Menu du haut : 6 liens depuis l'ajout d'« Autrice »
   Chaque lien reste sur une seule ligne ; l'espacement se resserre
   un peu sur les écrans d'ordinateur portable.
   -------------------------------------------------------------------------- */

.header_nav li {
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .header_nav li { padding: 0 8px; }
}

/* --------------------------------------------------------------------------
   Menu : panneau et bouton burger
   Sur ordinateur, le panneau n'a aucun effet sur la mise en page.
   -------------------------------------------------------------------------- */

.header_panel {
    display: contents;
}

.menu_toggle,
.menu_backdrop {
    display: none;
}

/* ==========================================================================
   Tablette (1100 px et moins)
   ========================================================================== */

@media (max-width: 1100px) {

    /* En-tête */
    .header_title { font-size: 30px; }
    .header_nav li { padding: 0 7px; font-size: 14px; }
    .header_social li { padding: 0 6px; }

    /* Home */
    .big_title { padding: 180px 0; }
    .big_title_title { font-size: 110px; line-height: 70px; }
    .big_title_subtitle { font-size: 60px; line-height: 60px; }
    .about { padding: 120px 5%; }
    .skills_item { padding: 40px 0; }
    .discuss_form_container { padding: 150px 8% 80px 8%; }

    /* Fiches projet */
    section#title { margin: 180px 5%; text-align: center; }
    section#images { padding: 0 4%; }
    section#images img { max-width: 100%; height: auto; }
    section#desc { margin: 100px 15%; }
    .similar_title { margin: 0 15%; margin-bottom: 20px; }
    .similar_item { width: 42%; }

    /* Réalisations : titres de survol plus petits */
    .img_title { width: 80%; font-size: 26px; line-height: 32px; }

    /* Infos */
    .presentation_container { padding: 140px 10%; }
    .presentation_header { margin-bottom: 120px; }
    .presentation_header_name { font-size: 80px; line-height: 80px; }

    /* Contact */
    .contact_right { padding: 60px 40px; }

    /* Privacy */
    .privacy_container { padding: 140px 10%; }
}

/* ==========================================================================
   Mobile et petite tablette (900 px et moins)
   ========================================================================== */

@media (max-width: 900px) {

    /* ---------- En-tête et menu burger ---------- */

    .header {
        padding-top: 18px;
        padding-bottom: 12px;
    }

    .header_title { font-size: 26px; }

    .menu_toggle {
        position: relative;
        z-index: 1300;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-right: -7px;
        padding: 0;
        border: none;
        background: transparent;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .menu_toggle::before,
    .menu_toggle::after,
    .menu_toggle_line {
        content: '';
        position: absolute;
        left: 7px;
        width: 30px;
        height: 2px;
        background-color: #000;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .menu_toggle::before { transform: translateY(-9px); }
    .menu_toggle::after { transform: translateY(9px); }

    .menu_open .menu_toggle::before { transform: rotate(45deg); }
    .menu_open .menu_toggle::after { transform: rotate(-45deg); }
    .menu_open .menu_toggle_line { opacity: 0; transform: scaleX(0); }

    .header_panel {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        height: 100dvh;
        padding: 90px 30px 40px;
        box-sizing: border-box;
        overflow-y: auto;
        background-color: #F7F7F7;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s ease, visibility 0.35s;
    }

    .menu_open .header_panel {
        transform: translateX(0);
        visibility: visible;
    }

    .header_panel .header_nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .header_panel .header_nav li {
        padding: 0;
        font-size: 18px;
    }

    .header_panel .header_social {
        justify-content: flex-start;
        padding-top: 30px;
        border-top: 1px solid #000;
    }

    .header_panel .header_social ul {
        justify-content: flex-start;
        margin: 0;
        padding: 0;
        gap: 18px;
    }

    .header_panel .header_social li { padding: 0; }

    .menu_backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1050;
        background-color: rgba(0, 0, 0, 0.35);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s;
    }

    .menu_open .menu_backdrop {
        opacity: 1;
        visibility: visible;
    }

    body.menu_open { overflow: hidden; }

    /* ---------- Éléments communs ---------- */

    .go_top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .carousel_header { align-items: center; }
    .carousel_header_title { flex: 1; width: auto; font-size: 28px; line-height: 32px; }
    .carousel_header_btn_container { padding-left: 0; }
    .carousel_header_button { margin-left: 24px; }

    /* Le lien "tout voir" passe sous le titre */
    .carousel_header { flex-wrap: wrap; row-gap: 10px; }
    .carousel_header_view_all {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        font-size: 15px;
        height: 40px;
    }
    .carousel_header_view_all > a { position: static; display: inline-flex; align-items: center; }
    .carousel_header_view_all > a > div {
        position: relative;
        bottom: auto;
        width: 36px;
        height: 36px;
    }

    .carousel { margin: 24px 0; gap: 12px; }
    .carousel_item { padding: 0; }
    .carousel_item .carousel_item_img {
        width: 78vw;
        max-width: 420px;
        height: auto;
        aspect-ratio: 720 / 548;
    }
    .carousel_image_description_text { font-size: 13px; }

    /* Survol impossible au doigt : le titre des vignettes
       s'affiche dans un bandeau sous l'image */
    .tab_item .img_overlay,
    .similar_item .img_overlay {
        position: relative;
        height: auto;
        gap: 4px;
        box-sizing: border-box;
        padding: 12px 44px 14px 0;
        overflow: visible;
    }
    .tab_item a:hover .img_overlay,
    .similar_item a:hover .img_overlay { height: auto; }
    .img_cat { width: auto; font-size: 12px; padding-left: 16px; padding-top: 0; }
    .img_title { width: auto; font-size: 20px; line-height: 26px; padding-left: 16px; }
    .img_desc { width: auto; font-size: 13px; padding-left: 16px; padding-bottom: 0; }
    .img_overlay img { right: 16px; bottom: 16px; width: 20px; height: 20px; }
    .tab_item img,
    .similar_item img { display: block; }

    /* ---------- Pied de page ---------- */

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
        padding: 60px 6% 30px;
    }

    .footer_title { font-size: 40px; }
    .footer_title img { display: block; width: 70px; height: auto; }

    .footer_menu_top {
        flex-wrap: wrap;
        gap: 30px 12%;
        padding-bottom: 40px;
    }

    .phone_number {
        writing-mode: horizontal-tb;
        transform: none;
        flex-basis: 100%;
        font-size: 22px;
    }
    .phone_number > a::after {
        border-left: none;
        border-bottom: #000 solid 2px;
        height: 1px;
        top: auto;
        bottom: -2px;
        transform: scaleX(0);
    }
    .phone_number > a:hover::after { transform: scaleX(1); }

    .footer_section_title { font-size: 22px; }

    .footer_menu_bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 20px;
    }

    .footer_copyright { line-height: 20px; }

    /* ---------- Home ---------- */

    .background_image {
        height: 100vh;
        height: 100svh;
    }
    .big_title {
        box-sizing: border-box;
        min-height: calc(100vh - 80px);
        min-height: calc(100svh - 80px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 60px 5%;
    }
    .big_title_title { font-size: 64px; line-height: 48px; }
    .big_title_subtitle { font-size: 38px; line-height: 44px; }
    .big_title_text { font-size: 14px; padding: 16px 0; }

    .latest { padding: 60px 0; }

    .about {
        flex-direction: column;
        gap: 50px;
        padding: 80px 6%;
    }
    .about_left,
    .about_right { width: 100%; }
    .about_left img { height: 420px !important; }
    .about_left_text { font-size: 16px; line-height: 24px; }
    .about_right { gap: 24px; }
    .about_right_title { font-size: 30px; line-height: 34px; }
    .about_right_text { font-size: 16px; line-height: 24px; text-align: left; }
    .about_button_container { justify-content: flex-start; height: 50px; }
    .about_button > a { position: static; display: inline-flex; align-items: center; }
    .about_button > a > div { position: relative; bottom: auto; }

    .skills { padding: 70px 6%; gap: 20px; }
    .skills_title { font-size: 30px; line-height: 34px; }
    .skills_item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 30px 0;
    }
    .skills_item_title,
    .skills_item_text { width: 100%; }
    .skills_item_title { font-size: 20px; }
    .skills_item_text { line-height: 22px; }

    .discuss_form_container { padding: 90px 5% 60px; }
    .discuss_form { width: 100%; padding: 100px 6% 60px; box-sizing: border-box; }
    .discuss_form_title { font-size: 34px; line-height: 36px; top: -40px; }
    .discuss_form_id { flex-direction: column; gap: 30px; }

    .author { padding: 60px 0; }

    /* ---------- Réalisations ---------- */

    section#realisations { padding: 40px 6%; }
    .title { font-size: 36px; line-height: 40px; }
    .tabnav { gap: 12px 18px; padding: 24px 0 30px; }
    .tablinks { font-size: 15px; padding: 6px 0; }

    .tabcontent.active { gap: 30px; }
    .tab_row {
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 30px 4%;
    }
    .tab_item { width: 48%; }

    /* ---------- Fiches projet ---------- */

    section#title { margin: 80px 6%; }
    .title_text { font-size: 34px; line-height: 40px; }

    section#images { padding: 0 4%; }
    section#images img {
        max-width: 100%;
        height: auto;
    }

    section#desc { margin: 60px 6%; }
    .desc_title { font-size: 26px; line-height: 32px; }
    .desc_text { font-size: 16px; line-height: 24px; padding-bottom: 40px; }

    section#similar { margin-bottom: 60px; }
    .similar_title { font-size: 26px; margin: 0 6%; margin-bottom: 20px; }
    .similar_links {
        align-items: flex-start;
        gap: 4%;
        padding: 0 6%;
    }
    .similar_item { width: 48%; }

    /* ---------- Infos ---------- */

    .presentation_container { padding: 70px 6%; }
    .presentation_pre_header { font-size: 16px; }
    .presentation_header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        margin-bottom: 60px;
    }
    .presentation_header_name { font-size: 48px; line-height: 52px; }
    .presentation_link_button {
        position: static;
        justify-content: flex-start;
        font-size: 16px;
        height: 50px;
    }
    .presentation_link_button > a { position: static; display: inline-flex; align-items: center; }
    .presentation_link_button > a > div { position: relative; bottom: auto; }
    .presentation_desc {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        font-size: 16px;
    }
    .presentation_desc_left,
    .presentation_desc_right { width: 100%; }
    .presentation_desc_left { font-size: 26px; line-height: 32px; }
    .presentation_desc_right { font-size: 18px; line-height: 26px; }

    /* ---------- Contact ---------- */

    section#contact {
        flex-direction: column;
        align-items: stretch;
        gap: 50px;
        margin: 60px 6%;
    }
    .contact_left,
    .contact_right { width: 100%; box-sizing: border-box; }
    .contact_links { padding: 50px 0; }
    .contact_links a { font-size: 24px; overflow-wrap: anywhere; }
    .contact_social ul { flex-wrap: wrap; gap: 14px 24px; }
    .contact_right { padding: 50px 6%; }

    /* ---------- Privacy ---------- */

    .privacy_container { padding: 70px 6%; }
    .privacy_title { font-size: 36px; line-height: 40px; }
    .privacy_updated { margin-bottom: 30px; }
    .privacy_section_title { font-size: 22px; line-height: 28px; }
    .privacy_section p,
    .privacy_section li { font-size: 16px; line-height: 25px; overflow-wrap: anywhere; }
}

/* ==========================================================================
   Téléphone (560 px et moins)
   ========================================================================== */

@media (max-width: 560px) {

    .big_title_title { font-size: 54px; line-height: 42px; }
    .big_title_subtitle { font-size: 32px; line-height: 38px; }

    .about_left img { height: 360px !important; }

    /* Réalisations et fiches : une vignette par ligne */
    .tab_row { flex-direction: column; gap: 30px; }
    .tab_item { width: 100%; }

    .similar_links { flex-direction: column; gap: 30px; }
    .similar_item { width: 100%; }

    .title_text { font-size: 30px; line-height: 36px; }
    section#images { padding: 0; }

    .presentation_header_name { font-size: 40px; line-height: 44px; }
    .contact_links a { font-size: 20px; }
}
