.grille-magique:has(.wp-block-group__inner-container) {
    display: block !important;
    width: 100% !important;
}

.grille-magique:not(:has(.wp-block-group__inner-container)),
.grille-magique > .wp-block-group__inner-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 50px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.grille-magique .post-it {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.grille-magique .polaroid-card {
    margin-top: 30px !important; 
    margin-bottom: 30px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.grille-magique .polaroid-card img {
    height: 350px !important; 
    width: 100% !important;
    object-fit: cover !important;
}


@media screen and (max-width: 1024px) {
    .grille-magique:not(:has(.wp-block-group__inner-container)),
    .grille-magique > .wp-block-group__inner-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 768px) {
    .grille-magique:not(:has(.wp-block-group__inner-container)),
    .grille-magique > .wp-block-group__inner-container {
        grid-template-columns: 1fr !important;
    }
}

.help-note { display: none; }
.polaroid-card { background-color: #ffffff; padding: 20px 15px 30px 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; max-width: 400px; margin: 40px auto 0 auto; display: flex; flex-direction: column; align-items: center; }
.polaroid-card .wp-block-image { width: 100%; margin: 0; }
.polaroid-card img { width: 100%; height: 250px; object-fit: cover; display: block; margin: 0 auto; }
.polaroid-grand { max-width: 500px; margin-bottom: 5px; }
.polaroid-grand img { height: 350px; }
.polaroid-card p { text-align: center; font-size: 1.4rem; font-weight: bold; font-style: italic; color: #222; margin-top: 20px !important; margin-bottom: 0 !important; }
.polaroid-card::before { content: ""; position: absolute; top: -20px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: 120px; height: 35px; background-color: rgba(220, 220, 220, 0.7); box-shadow: 0 1px 3px rgba(0,0,0,0.1); z-index: 5; }
.polaroid-card:hover { transform: scale(1.02) rotate(1deg); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); cursor: pointer; }
.polaroid-card p a { color: #222; text-decoration: none; }
.polaroid-card p a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; }

.post-it { background-color: #fdf4c8; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.13); max-width: 420px !important; margin: 0 auto 30px auto !important; display: flex; flex-direction: column; align-items: center; height: 100%; min-height: 300px; }
.post-it p:first-of-type, .post-it h2, .post-it h3 { font-size: 1.8rem; font-weight: bold; color: #000; margin-top: 0; margin-bottom: 5px; }
.post-it hr.wp-block-separator { border: none !important; border-top: 1.5px solid #000000 !important; width: 60% !important; margin: 10px auto 25px auto !important; opacity: 1; }
.post-it .wp-block-buttons { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.post-it .wp-block-button { width: 100%; max-width: 260px; height: 60px; font-size: large; align-items: center; justify-content: center; }
.post-it .wp-block-button__link { width: 100%; padding: 12px 20px; font-size: 0.9rem; }

.wp-block-details { border: 1px solid #dcdcdc; border-radius: 8px; margin-bottom: 20px; background-color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.wp-block-details summary { background-color: #f9f9f9; padding: 15px 20px; font-weight: bold; font-size: 16px; cursor: pointer; transition: background-color 0.5s ease, color 0.3s ease; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.wp-block-details summary:hover { background-color:#ededed }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "⌄"; font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; color: #333; }
.wp-block-details[open] summary {transform: scale(1.01); background-color: #ec6619; color: white; border-bottom: 1px solid #dcdcdc; border-radius: 10px;}
.wp-block-details[open] summary::after { content: "^"; color: white; }
.wp-block-details .wp-block-details__content { padding: 20px; }
.wp-block-details img { box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.wp-block-details p { padding: 0px 10% 0px 10%; }

.contact-card { background-color: #ffffff; border: 1px solid #eaeaea; border-radius: 12px; padding: 30px 20px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); height: 100%; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.contact-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); border-top: solid #ec6619; }
.contact-card p:first-child { font-size: 1.5rem; font-weight: bold; color: #ec6619; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f0f0f0; }
.contact-card p:not(:first-child) { font-size: 1rem; color: #444; line-height: 1.6; margin-bottom: 10px; }
.bloc-stats { background-color: #000000; border-radius: 15px; padding: 40px 20px; margin-top: 60px; box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.stat-chiffre { color: #fca311; font-size: 3rem; font-weight: bold; text-align: center; margin-bottom: 5px; }
.stat-texte { color: #ffffff; font-size: 2rem; text-align: center; text-transform: uppercase; margin-top: 0; }

.titre-parcours { border-bottom: 3px solid #000000; display: inline-block; padding-bottom: 5px; margin-bottom: 40px; }
.gpx-wrapper { width: 100%; clear: both; overflow: hidden; margin: 40px 0; background-color: #ffffff; border-radius: 8px; }
.gpx-wrapper iframe, .gpx-wrapper .gpx-view { width: 100% !important; max-width: 100%; }
.titre-histoire { text-align: center; margin-bottom: 50px; position: relative; }
.titre-histoire::after { content: ""; display: block; width: 60px; height: 3px; background-color: #ec6619; margin: 15px auto 0 auto; }
.image-stylee img { width: 100%; height: auto; align-items: end; object-fit: cover; border-radius: 25px; box-shadow: 0px 0px 15px 10px rgba(0, 0, 0, 0.13); }

.partner { background-color: #ffffff; border: 1px solid #f0f0f0; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);  transition: all 0.3s ease; display: flex; justify-content: center; align-items: center;
}

.partner:hover { transform: rotate(1deg) scale(1.03); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12); cursor: pointer; }

.partner img { max-width: 100%; height: auto; transition: transform 0.3s ease; }

.page-404 { display: flex; justify-content: center; align-items: center; min-height: 50vh; text-align: center; padding: 60px 20px; }
.erreur-404-content h1 { font-size: 8rem; color: #ec6619; margin: 0; line-height: 1; text-shadow: 2px 2px 5px rgba(0,0,0,0.1); }
.erreur-404-content h2 { font-size: 2.5rem; margin: 20px 0; color: #333; }
.erreur-404-content p { font-size: 1.2rem; color: #666; margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.6; }

.confidentialite { padding-bottom: 16px; }