/* =========================================================
   RESPONSIVE TABLETTE — VERSION ULTRA STABLE
   ANTI-DÉBORDEMENT SAFARI / FIREFOX / OPERA / MOBILE
========================================================= */

@media (max-width: 1120px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .site-wrapper,
    .navbar,
    .nav-container,
    .hero,
    .hero-content,
    .profile-hero,
    .profile-hero-inner,
    .container,
    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .footer-container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .profile-hero-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
        gap: 32px;
    }

    .hero-meta,
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-logo {
        min-width: auto;
        max-width: 100%;
    }

    .nav-container {
        position: relative;
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 18px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 44px;
        height: 44px;
        min-width: 44px;

        border-radius: 14px;

        flex-shrink: 0;
    }

    .nav-menu {
        display: none;

        position: absolute;

        top: calc(100% + 12px);
        left: 0;
        right: 0;

        width: 100%;
        max-width: 100%;

        background: rgba(255,255,255,0.98);

        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);

        padding: 18px;

        border-radius: 20px;

        box-shadow: 0 20px 50px rgba(15,23,42,0.12);

        flex-direction: column;
        align-items: stretch;

        gap: 8px;

        z-index: 9999;

        border: 1px solid rgba(226,232,240,0.9);

        overflow: hidden;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li,
    .nav-menu a {
        width: 100%;
        max-width: 100%;
    }

    .nav-menu a {
        display: flex;
        align-items: center;

        min-height: 46px;

        border-radius: 14px;

        overflow-wrap: anywhere;
    }

    .hero-content,
    .grid-2,
    .grid-3,
    .grid-4,
    .footer-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .hero-content {
        gap: 40px;
        min-height: auto;
        text-align: center;
    }

    .hero h1 {
        font-size: 36px;
        line-height: 1.1;
        overflow-wrap: anywhere;
    }

    .hero-photo {
        display: flex;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .hero-photo img {
        width: 100%;
        max-width: 250px;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
}

/* =========================================================
   RESPONSIVE MOBILE
========================================================= */

@media (max-width: 700px) {

    html,
    body {
        overflow-x: hidden !important;
    }

    .profile-hero {
        width: 100%;
        max-width: 100%;
        padding: 38px 18px 52px;
        overflow-x: hidden;
    }

    .profile-photo-card {
        width: 100%;
        max-width: 280px;
        margin: auto;

        overflow: hidden;

        transform: none !important;
    }

    .profile-photo-card img {
        width: 100%;
        height: auto;
        min-height: 320px;
        object-fit: cover;
    }

    .nav-logo-text {
        min-width: 0;
        overflow: hidden;
    }

    .nav-logo-text small {
        display: none;
    }

    .hero-meta {
        gap: 8px;
        justify-content: center;
    }

    .hero-meta span {
        font-size: 12px;

        max-width: 100%;

        overflow-wrap: anywhere;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn,
    .btn {
        width: 100%;
        max-width: 100%;
    }

    .card,
    .item {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
}

/* =========================================================
   PETITS MOBILES
========================================================= */

@media (max-width: 600px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 45px 18px;
        overflow-x: hidden;
    }

    .section-title {
        width: 100%;
        max-width: 100%;
    }

    .section-title h1,
    .section-title h2 {
        font-size: 28px;
        line-height: 1.2;

        overflow-wrap: anywhere;
    }

    .hero h1 {
        font-size: 31px;
        line-height: 1.12;

        overflow-wrap: anywhere;
    }

    .card {
        width: 100%;
        max-width: 100%;

        padding: 22px;

        border-radius: 18px;

        overflow: hidden;
    }

    .nav-brand {
        min-width: 0;
        max-width: 100%;
        gap: 10px;
    }

    .nav-brand strong {
        font-size: 13px;
        line-height: 1.2;

        overflow-wrap: anywhere;
    }

    .nav-brand span {
        font-size: 12px;

        overflow-wrap: anywhere;
    }

    .nav-brand img {
        width: 44px;
        height: 44px;
        min-width: 44px;

        flex-shrink: 0;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
        min-width: 42px;

        font-size: 20px;
    }

    .hero-photo {
        overflow: hidden;
    }

    .hero-photo img {
        width: 100%;
        max-width: 220px;
        height: auto;
    }

    .footer-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) !important;

        gap: 24px;

        width: 100%;
        max-width: 100%;

        overflow: hidden;
    }

    .footer p,
    .footer a,
    .footer h3,
    .footer h4 {
        overflow-wrap: anywhere;
    }

    table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
    }
}