/* ==========================================================================
   6. RESPONSIVE
   ========================================================================== */

/* --- Breakpoint: Tablettes larges & petits laptops (<= 1190px) --- */
@media (max-width: 1190px) {
    .about-block.reverse-another {
        flex-direction: column-reverse;
    }

    .princesse-amandine {
        padding: 60px 20px 0px;
    }

    /* --- Navigation --- */
    header {
        padding-bottom: 20px;
    }

    .top-bar {
        display: none;
    }

    .logo {
        left: 20%;
        transform: translateX(-50%);
        bottom: -30px;
    }

    .logo img {
        height: 80px;
        width: fit-content;
    }

    .nav-social {
        width: 100%;
        order: 4;
        justify-content: center;
    }

    .menu-toggle {
        display: block;
        bottom: 15px;
        position: absolute;
        right: 5px;
    }

    nav {
        display: none;
        flex-direction: column;
        background-color: var(--color-white);
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    nav.active {
        display: flex;
    }

    nav a {
        border-right: none;
        border-bottom: 1px solid var(--color-primary-header);
        padding: 10px 0;
        width: 100%;
    }

    nav a:last-child {
        border-bottom: none;
    }

    /* --- Conteneurs Flex : Passage en colonne --- */
    .amandine-section,
    .about-block,
    .about-block.reverse,
    .princesse-amandine .container,
    .engagements .content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .amandine-left {
        background-size: 220px auto;
        background-position: right -45px bottom;
    }

    .amandine-left-text {
        margin-right: 7rem;
        margin-left: inherit;
    }

    .amandine-buttons {
        align-items: center;
    }

    .amandine-right {
        min-height: 300px;
        width: 100%;
    }

    .about-block {
        gap: 1rem;
    }

    .about-text {
        text-align: left;
        /* Garder une bonne lisibilité */
    }

    .engagement-text-content {
        margin-left: 0;
        text-align: left;
    }

    /* --- Grid Recettes : Effet Carousel --- */
    .recipes-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 85%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 1rem 0;
        grid-template-columns: none;
        /* Annulation des colonnes desktop */
        grid-template-rows: auto;
    }

    .recipes-grid::-webkit-scrollbar {
        height: 8px;
    }

    .recipes-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

    .recipes-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .recipe-card {
        scroll-snap-align: start;
    }

    .recipe-card.large {
        grid-row: auto;
    }

    .footer-image {
        display: none;
    }

    .image-container img {
        max-width: 40%;
    }

    .section-title-base {
        margin-bottom: 2rem;
    }

    .text-container {
        flex: inherit;
    }
    
    .image-container {
        flex: 1 1 100px;
    }

    .section-title-lined::before,
    .section-title-lined::after {
        width: 50px;
        margin: 0 10px;
    }
}

/* --- Breakpoint: Tablettes (<= 992px) --- */
@media (max-width: 992px) {

    /* Page Recettes */
    .hero img {
        display: none;
    }

    .section-recette .text {
        flex-direction: column;
        gap: 2rem;
    }

    .section-recette .image-recette {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* --- Breakpoint: Mobiles & Tablettes verticales (<= 768px) --- */
@media (max-width: 768px) {

    .container {
        padding: 0;
    }

    .social-icons {
        margin-left: 190px;
        top: 5px;
        position: relative;
    }

    /* Sections page d'accueil */
    .amandine-left {
        background-size: 260px auto;
    }

    .amandine-left,
    .amandine-right,
    .about-text,
    .about-image,
    .engagements .left,
    .engagements .right {
        flex: 1 1 100%;
        width: 100%;
    }

    .princesse-amandine .container {
        text-align: center;
    }

    .text-container {
        padding: 0;
        flex: 0;
    }

    .text-container h2 {
        font-size: 1.7rem;
    }

    .text-container .btn {
        width: 100%;
        top: 30px;
        position: relative;
    }

    .engagements .title,
    .engagements .subtitle {
        text-align: left;
    }

    .engagement-panel {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* FAQ & Contact titres */
    .faq-title,
    .contact-title {
        font-size: 2rem;
    }

    .faq-subtitle {
        font-size: 1.2rem;
    }

    .faq-text {
        font-size: 0.95rem;
    }

    .contact-subtitle {
        font-size: 1rem;
    }

    .contact-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    /* --- Pages Recettes --- */
    .section-recette {
        flex-direction: column;
    }

    .section-recette .text {
        flex-direction: column-reverse;
    }

    .section-recette .text .flex {
        width: 100%;
        padding: 0 0rem 0rem 3rem;
    }

    .section-recette .image-recette {
        width: 100%;
    }

    .recette-moment-titre {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        text-align: center;
        width: 100%;
    }

    .recette-moment-titre::before,
    .recette-moment-titre::after {
        content: '';
        width: 50px;
        height: 1px;
        background-color: var(--color-primary);
    }

    .more-recette {
        margin: 1rem auto 0;
    }

    .section-all-recettes .flex {
        flex-direction: column;
    }

    .filter-toggle-button {
        display: block;
    }

    .filters {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        flex: 1;
        order: -1;
    }

    .filter-group {
        flex: 1 1 45%;
        min-width: 150px;
    }

    .filters.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        padding: 2rem;
        overflow-y: auto;
        justify-content: flex-start;
        align-items: center;
    }

    .filters.open .filter-group {
        text-align: center;
        width: 80%;
        flex: 1 1 100%;
    }

    .filters.open .close-filters,
    .filters.open .apply-filters-button {
        display: block;
    }

    /* Détail recette & autres recettes */
    .recipe-detail-main {
        flex-direction: column;
        padding: 0 1rem;
    }

    .recipe-info-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        border: none;
    }

    .recipe-body {
        padding: 0 1rem;
        flex-direction: column;
        gap: 2.5rem;
    }

    .other-recipes-section {
        padding: 0 1rem;
    }

    .grid-recettes,
    .other-recipes-section .grid-recettes {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    /* Page Contact */
    .contact-layout {
        flex-direction: column;
        gap: 3rem;
        padding: 0 1rem;
    }
}

/* --- Breakpoint: Petits Mobiles (<= 480px) --- */
@media (max-width: 480px) {
    .faq-section {
        padding: 15rem 1rem;
    }

    .faq-content {
        max-width: 90%;
    }

    .recipes-grid {
        grid-auto-columns: 95%;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-column .left {
        top: 0;
    }

    .footer-logo+.footer-column {
        margin-top: 3rem;
    }

    /* Page Recettes */
    .hero h1 {
        font-size: 1.8rem;
    }

    .section-recette h2 {
        font-size: 1.5rem;
    }

    .grid-recettes,
    .other-recipes-section .grid-recettes {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }

    .recette-card {
        height: 200px;
    }

    .recipe-title-main {
        font-size: 2rem;
    }

    .amandine-left {
        background: inherit;
    }

    .amandine-left-text {
        margin-left: 9rem;
    }

    .btn-arrowed {
        min-width: 200px;
    }
}