/* ========================================
   RESPONSIVE - TABLETTE (≤ 1024px)
   ======================================== */
@media (max-width: 1024px) {

    /* Contact : l'écart de 100px est trop grand sur tablette */
    .contact-wrapper {
        gap: 50px;
    }

    .projects-grid {
        gap: 30px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (≤ 768px)
   ======================================== */
@media (max-width: 768px) {

    /* --- Taches d'arrière-plan : plus petites et plus douces --- */
    body::before,
    body::after,
    body.theme-accueil::before,
    body.theme-accueil::after,
    body.theme-services::before,
    body.theme-services::after,
    body.theme-projets::before,
    body.theme-projets::after,
    body.theme-contact::after {
        width: 300px;
        height: 300px;
        filter: blur(40px);
    }

    .blob-extra {
        display: none !important;
    }

    /* --- Navigation : menu burger --- */
    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 16px 0 auto;
        background: none;
        border: 2px solid var(--texte-principal);
        border-radius: 6px;
        color: var(--texte-principal);
        font-family: inherit;
        font-size: 1.1rem;
        font-weight: 600;
        padding: 10px 18px;
        cursor: pointer;
    }

    /* Les trois barres de l'icône */
    .menu-toggle-icon,
    .menu-toggle-icon::before,
    .menu-toggle-icon::after {
        display: block;
        width: 22px;
        height: 2px;
        background-color: currentColor;
        transition: transform 0.3s ease, background-color 0.3s ease;
    }

    .menu-toggle-icon {
        position: relative;
    }

    .menu-toggle-icon::before,
    .menu-toggle-icon::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .menu-toggle-icon::before {
        top: -7px;
    }

    .menu-toggle-icon::after {
        top: 7px;
    }

    /* Menu ouvert : l'icône devient une croix */
    .menu-toggle[aria-expanded="true"] .menu-toggle-icon {
        background-color: transparent;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Liste des liens : cachée tant que le menu est fermé
       (si le JavaScript ne charge pas, la liste reste visible) */
    nav ul {
        flex-direction: column;
    }

    .js nav ul {
        display: none;
    }

    .js .menu-toggle[aria-expanded="true"]+ul {
        display: flex;
        margin-top: 15px;
    }

    nav ul li {
        margin: 4px 0;
    }

    /* --- Contenu principal --- */
    main {
        padding: 40px 16px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 1.6rem;
    }

    /* --- Page Accueil : liste des offres --- */
    .offer-item {
        gap: 15px;
        padding: 20px;
    }

    .offer-number {
        font-size: 1.5rem;
    }

    /* --- Page À propos --- */
    .about-page {
        padding-inline: 0;
    }

    .about-lead {
        font-size: 1.15rem;
    }

    .about-banner-img {
        max-height: 200px;
    }

    .about-split {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    /* Sur mobile : toujours texte puis image */
    .about-split--reverse .about-split-image {
        order: 0;
    }

    /* Les 280px minimum déborderaient sur les petits téléphones */
    .about-split-text,
    .about-split-image {
        min-width: 0;
    }

    /* --- Bloc mis en valeur --- */
    .highlight-box {
        padding: 20px;
    }

    /* --- Page Contact : colonnes empilées --- */
    .contact-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .contact-info,
    .contact-form {
        min-width: 0;
    }

    .contact-form {
        align-self: stretch;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.5rem;
    }

    form {
        padding: 20px;
    }

    /* --- Page Projets --- */
    .projects-header {
        margin-bottom: 35px;
    }

    .projects-header p {
        font-size: 1.05rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0;
    }

    /* --- Page Services --- */
    .services-header {
        margin-bottom: 35px;
    }

    section.services-block {
        margin-bottom: 50px;
        padding: 0;
    }

    section.services-block h2 {
        margin-bottom: 25px;
    }

    .rate-box .price-tag {
        font-size: 1.6rem;
    }

    .cta-block a {
        padding: 14px 24px;
    }

    /* --- Pages légales : tableaux défilables horizontalement --- */
    table.data-table {
        display: block;
        overflow-x: auto;
    }

    /* --- Footer : plus compact sur mobile --- */
    footer {
        padding: 20px 16px;
        margin-top: 40px;
    }

    .footer-links {
        margin-bottom: 8px;
    }

    /* --- Footer : liens sur plusieurs lignes si besoin --- */
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }

    .footer-links a {
        margin: 0;
    }
}

/* ========================================
   RESPONSIVE - PETIT TÉLÉPHONE (≤ 480px)
   ======================================== */
@media (max-width: 480px) {

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    /* Texte courant : jamais sous 16px, pour la lisibilité */
    p {
        font-size: 1rem;
    }

    /* Offres : le numéro passe au-dessus du texte */
    .offer-item {
        flex-direction: column;
        gap: 10px;
    }

    /* Boutons d'appel à l'action : pleine largeur, plus faciles à toucher */
    .cta-block a {
        display: block;
    }

    button[type="submit"] {
        padding: 13px 20px;
    }
}