/* =============================================================
   AMINATA FATY — responsive.css
   Adaptations : Large / Laptop / Tablette / Mobile
   Aucun élément ne doit casser, aucun texte ne doit déborder.
   ------------------------------------------------------------- */


/* =============================================================
   ÉCRANS TRÈS LARGES (≥ 1600px) — on garde les proportions
   ============================================================= */
@media (min-width: 1600px){
    :root{
        --container: 1420px;
    }
    .hero-inner{
        min-height: 560px;
    }
    .hero-title{
        font-size: 56px;
    }
    .hero-title-script{
        font-size: 66px;
    }
}


/* =============================================================
   LAPTOP (≤ 1280px)
   ============================================================= */
@media (max-width: 1280px){
    :root{
        --gutter: 32px;
    }

    /* Header */
    .logo-name{ font-size: 40px; }
    .nav-list{ gap: 38px; }
    .main-nav{ margin-right: 40px; }
    .nav-link{ font-size: 11.5px; }

    /* Hero */
    .hero{ padding: 50px 0 118px; }
    .hero-inner{ min-height: 470px; }
    .hero-title{ font-size: 45px; }
    .hero-title-script{ font-size: 54px; }
    .hero-content{ max-width: 430px; }
    .hero-media{ width: 56%; }
    .torn-paper svg{ height: 78px; }

    /* Section projet */
    .section-title{ font-size: 29px; }
    .section-script{ font-size: 25px; }
    .card{ min-height: 452px; }
    .card-body{ padding: 28px 26px 32px; }
    .card-icon{ width: 76px; height: 76px; }
    .card-icon svg{ width: 40px; height: 40px; }
    .card-title{ font-size: 42px; }
    .card-text{ font-size: 12.5px; }
    .btn--solid{ padding: 15px 22px; font-size: 11px; }

    /* Notre histoire */
    .story-title{ font-size: 23px; }
    .story-script{ font-size: 21px; }
    .gallery-row--top .gallery-item{ height: 175px; }
    .gallery-row--bottom .gallery-item{ height: 148px; }

    /* Footer */
    .footer-script{ font-size: 25px; }
    .footer-col--social,
    .footer-col--news{ padding-left: 34px; }
    .footer-links{ gap: 26px; }
}


/* =============================================================
   PETIT LAPTOP / GRANDE TABLETTE (≤ 1080px)
   Le menu passe en panneau latéral.
   ============================================================= */
@media (max-width: 1080px){

    /* ---- Header : burger + panneau ---- */
    .nav-toggle{
        display: flex;
        order: 3;
    }

    .header-social{
        order: 2;
        gap: 13px;
    }

    .main-nav{
        position: fixed;
        top: 0;
        right: 0;
        z-index: 120;
        display: flex;
        align-items: center;
        justify-content: center;
        width: min(330px, 84vw);
        height: 100vh;
        margin: 0;
        padding: 40px 30px;
        background-color: var(--background);
        box-shadow: -12px 0 40px rgba(44, 33, 26, .14);
        transform: translateX(100%);
        transition: transform .45s var(--ease);
        visibility: hidden;
    }

    .main-nav.is-open{
        transform: translateX(0);
        visibility: visible;
    }

    .nav-list{
        flex-direction: column;
        align-items: flex-start;
        gap: 26px;
    }

    .nav-link{
        font-size: 14px;
        letter-spacing: 1.6px;
    }

    /* Voile sombre derrière le panneau */
    .nav-overlay{
        position: fixed;
        inset: 0;
        z-index: 110;
        background-color: rgba(44, 33, 26, .42);
        opacity: 0;
        visibility: hidden;
        transition: opacity .4s var(--ease), visibility .4s var(--ease);
    }

    .nav-overlay.is-open{
        opacity: 1;
        visibility: visible;
    }

    /* Croix du burger quand le menu est ouvert */
    .nav-toggle.is-open .nav-toggle-bar:nth-child(1){
        transform: translateY(6.6px) rotate(45deg);
    }
    .nav-toggle.is-open .nav-toggle-bar:nth-child(2){
        opacity: 0;
    }
    .nav-toggle.is-open .nav-toggle-bar:nth-child(3){
        transform: translateY(-6.6px) rotate(-45deg);
    }

    /* ---- Hero ---- */
    .hero{ padding: 42px 0 100px; }
    .hero-inner{ min-height: 420px; }
    .hero-title{ font-size: 39px; }
    .hero-title-script{ font-size: 47px; }
    .hero-content{ max-width: 370px; }
    .hero-text{ max-width: 300px; margin-top: 20px; font-size: 12.5px; }
    .hero-media{ width: 54%; }
    .torn-paper svg{ height: 62px; }

    /* ---- Cartes : passage en colonne (image au-dessus) ---- */
    .project-grid{ gap: 26px; }

    .card--left,
    .card--right{
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .card-media{
        height: 220px;
        -webkit-clip-path: none !important;
        clip-path: none !important;
    }

    /* Sur mobile, l'image reste toujours en haut de la carte */
    .card--right .card-media{ order: -1; }

    .card-title{ font-size: 40px; }

    .project-heart{ display: none; }

    /* ---- Notre histoire ---- */
    .story-grid{
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .story-title{ font-size: 25px; }

    /* ---- Footer ---- */
    .footer-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 30px;
        align-items: start;
    }

    .footer-col--intro{
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-heart{
        margin-left: auto;
        margin-right: auto;
    }

    .footer-col--social{ padding-left: 0; }
    .footer-col--social::before{ display: none; }
}


/* =============================================================
   TABLETTE (≤ 860px) — le hero passe en une colonne
   ============================================================= */
@media (max-width: 860px){

    .hero{
        padding: 34px 0 90px;
    }

    .hero-inner{
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .hero-content{
        max-width: 100%;
        order: 1;
    }

    /* La photo repasse dans le flux, sous le texte */
    .hero-media{
        position: relative;
        order: 2;
        width: calc(100% + var(--gutter) * 2);
        height: 380px;
        margin: 34px calc(var(--gutter) * -1) 0;
    }

    .hero-media-fade{
        background:
            linear-gradient(to bottom,
                var(--background) 0%,
                rgba(253, 245, 236, .5) 8%,
                rgba(253, 245, 236, 0) 22%);
    }

    .hero-text{
        max-width: 460px;
    }

    .torn-paper svg{ height: 48px; }

    /* Section projet */
    .section-title{ font-size: 24px; letter-spacing: 1.2px; }
    .section-script{ font-size: 22px; }
    .section--project{ padding: 10px 0 30px; }

    /* Blog */
    .post-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Pages intérieures */
    .page-title{ font-size: 32px; }
}


/* =============================================================
   MOBILE (≤ 600px)
   ============================================================= */
@media (max-width: 600px){
    :root{
        --gutter: 20px;
        --radius: 10px;
    }

    /* ---- Header ---- */
    .site-header{ padding: 14px 0 10px; }
    .site-header.is-stuck{ padding: 9px 0; }
    .logo-name{ font-size: 31px; }
    .logo-baseline{
        margin-top: 5px;
        font-size: 8px;
        letter-spacing: .9px;
    }
    .social-link{ width: 22px; height: 22px; }
    .social-link svg{ width: 19px; height: 19px; }
    .nav-toggle{ margin-left: 12px; }

    /* ---- Hero ---- */
    .hero{ padding: 26px 0 68px; }
    .hero-overline{ font-size: 10px; letter-spacing: 1.3px; }
    .hero-title{
        margin-top: 16px;
        font-size: 31px;
        line-height: 1.16;
    }
    .hero-title-script{ font-size: 38px; }
    .hero-text{
        margin-top: 18px;
        font-size: 12.5px;
        line-height: 1.85;
    }
    .hero-rule{ margin-top: 20px; }
    .hero-media{
        height: 300px;
        margin-top: 26px;
    }
    .torn-paper svg{ height: 34px; }

    /* ---- Section projet ---- */
    .section--project{ padding: 8px 0 26px; }
    .section-script{ font-size: 19px; }
    .section-title{ font-size: 19px; letter-spacing: .8px; }
    .section-rule{ width: 58px; margin-top: 12px; }
    .project-grid{ margin-top: 24px; gap: 22px; }
    .card-media{ height: 190px; }
    .card-body{ padding: 24px 22px 28px; }
    .card-icon{ width: 68px; height: 68px; }
    .card-icon svg{ width: 36px; height: 36px; }
    .card-title{ font-size: 34px; }
    .card-text{ font-size: 12.5px; line-height: 1.9; }
    .card-body .btn{ margin-top: 22px; }
    .btn{ font-size: 10.5px; letter-spacing: 1.1px; }
    .btn--solid{ padding: 14px 20px; }
    .btn--outline{ padding: 13px 18px; }

    /* Les retours à la ligne forcés sont neutralisés sur mobile */
    .card-text br,
    .story-text br,
    .hero-text br{
        display: none;
    }

    /* ---- Notre histoire ---- */
    .section--story{ padding: 30px 0 30px; }
    .story-title{ font-size: 21px; line-height: 1.4; }
    .story-text{ font-size: 12.5px; }
    .story-script{ font-size: 19px; }
    .gallery-row{ gap: 10px; }
    .story-gallery{ gap: 10px; }
    .gallery-row--top .gallery-item{ height: 120px; }
    .gallery-row--bottom .gallery-item{ height: 92px; }

    /* ---- Footer ---- */
    .footer-torn svg{ height: 22px; }
    .footer-main{ padding: 32px 0 30px; }

    .footer-grid{
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        text-align: center;
    }

    .footer-col--news{
        padding-left: 0;
    }

    .footer-col--news::before{
        display: none;
    }

    .footer-script{ font-size: 22px; line-height: 1.6; }
    .footer-script br{ display: none; }
    .footer-text br{ display: none; }
    .footer-title{ font-size: 10.5px; letter-spacing: 1.4px; }

    .footer-bottom{ padding: 16px 0; }

    .footer-bottom-inner{
        flex-direction: column;
        gap: 10px;
        text-align: center;
        font-size: 10.5px;
    }

    .footer-links{
        flex-direction: column;
        gap: 7px;
    }

    /* ---- Pages intérieures ---- */
    .page-hero{ padding: 40px 0 34px; }
    .page-title{ font-size: 26px; }
    .page-body{ padding: 34px 0 44px; }
    .post-grid{ grid-template-columns: minmax(0, 1fr); }
}


/* =============================================================
   TRÈS PETITS ÉCRANS (≤ 380px)
   ============================================================= */
@media (max-width: 380px){
    .logo-name{ font-size: 27px; }
    .logo-baseline{ font-size: 7px; }
    .hero-title{ font-size: 27px; }
    .hero-title-script{ font-size: 33px; }
    .card-title{ font-size: 30px; }
    .section-title{ font-size: 17px; }
}


/* =============================================================
   IMPRESSION
   ============================================================= */
@media print{
    .site-header,
    .nav-toggle,
    .site-footer,
    .torn-paper{
        display: none !important;
    }
    body{
        color: #000;
        background: #fff;
    }
    [data-animate]{
        opacity: 1 !important;
        transform: none !important;
    }
}
