/*
Theme Name: Amigos de España
Version: 1.0
*/

/* ========== RESET & BASE ========== */
.container {
    max-width: 2000px;
    /* un peu plus large que 1140px par défaut */
}

* {
    margin: 0;
    padding: 0;
}


main.home {
    background-image: url('images/background.svg');
    background-repeat: no-repeat;
    background-position: 100% 55%;
    background-size: 100% 45%;
    font-family: 'Inter', sans-serif;
    color: #17212D;
}

html,
body {
    font-family: 'Inter', sans-serif;
    color: #17212D;
    min-height: 100vh;
    overflow-x: hidden;
    height: 100vh
}

h1 {
    color: #DC6743;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
}

h2 {
    color: #002D5C;
    font-weight: 600;
}


h1 .amigos,
h1 .espana {
    font-size: 2.2rem;
}

h1.flamenco {
    color: #002D5C;
    margin-left: 5rem;
}

.flamenco-intro {
    margin: 0 8rem;
}

/* ========== CONTAINERS ========== */
#galerie.container {
    max-width: 1100px;
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.page-container section {
    margin-bottom: 3rem;
}

/* ========== NAVBAR ========== */

header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: #fff;
}

nav.navbar {
    min-height: 80px;
}

.navbar .nav-link,
.navbar .dropdown-item {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #17212D !important;
    background-color: transparent;
    border: none;
}

.navbar .nav-link:hover,
.navbar .nav-link.active,
.navbar .dropdown-item:hover {
    text-decoration: none;
    border-bottom: 2px solid #dc3545;
    padding-bottom: 4px;
    color: #dc3545 !important;
}

.navbar.bg-dark,
.navbar-dark .navbar-nav .nav-link {
    background-color: transparent !important;
}

.navbar-toggler {
    border: none;
    background-color: transparent;
    padding: 0.25rem 0.75rem;
    margin-left: auto;
    align-self: flex-start;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgb(23, 33, 45)' stroke-width='3' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* ✅ Style mobile UNIQUEMENT */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #fff;
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        width: 100%;
        overflow-y: auto;
        z-index: 1000;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}

/* ========== HEADER ========== */
@media (max-width: 768px) {
    header .col-auto img {
        width: 100px;
        height: auto;
    }

    h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    h1 .amigos,
    h1 .espana {
        font-size: 1.2rem;
    }
}

/* ========== CAROUSEL ========== */
#carouselExample {
    max-width: 800px;
    max-height: 400px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-inner {
    height: 400px;
}

.carousel-inner img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

/* ========== FLASH NEWS ========== */
#flash-news,
#asso-news {
    position: relative;
    padding: 3rem 2rem;
    border-radius: 1rem;
    overflow: visible;
    /* Important pour voir le débordement */
}

#flash-news::before,
#asso-news::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 120%;
    border-radius: 1rem;
    transform: translate(-50%, -50%);
    z-index: -1;
    /* Derrière le contenu */
    pointer-events: none;
    /* Pour que ça ne gêne pas les interactions */
}

#flash_news .coreo-btn {
    background-color: #DA6441;
    border-radius: 2rem;
    color: #FFFFFF;
    border: none;
    padding: 0.6rem 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin: 3rem auto 0 auto;
    display: inline-block;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

#flash_news .coreo:hover {
    background-color: #b34b35;
}

/* ========== LANGUAGES SECTION ========== */
#language h2 {
    margin-top: 7rem;
    border: 0;
}

#language .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #FFE0B2;
    border-radius: 30px;
    border: none;
    margin-top: 3rem;
}

#language .card h3 {
    text-align: center;
    margin: 1rem;
    text-transform: uppercase;
    font-size: 1.5rem;
    color: #002D5C;
    font-weight: 550;
}

.cours-card {
    width: 100%;
    max-width: 276px;
    margin: 0 auto;
}

#language .register {
    background-color: #DA6441;
    border-radius: 2rem;
    color: #FFFFFF;
    border: none;
    padding: 0.6rem 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin: 3rem auto 0 auto;
    display: inline-block;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

#language .register:hover {
    background-color: #b34b35;
}

.language-inscription {
    margin-top: 3rem;
    text-align: center;
}

#language .row>.col-auto,
#language .row.justify-content-center>.col-auto {
    display: flex;
    flex: 0 0 300px;
    max-width: 300px;
}

#language .register-2 {
    margin-top: 5rem;
}

.cours-btn {
    background-color: #002D5C;
    color: white;
    border-radius: 2rem;
}

.cours-btn:hover {
    background-color: #17212D;
    color: white;
}

/* ========== ACTIVITIES ========== */
#activity {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80vw;
    margin: 7rem auto 0 auto;
    gap: 1.5rem;
}

.infinite-slider {
    width: 80%;
    margin: 0 auto;
    overflow: hidden;
    white-space: nowrap;
}

.infinite-slider .slides {
    display: flex;
    gap: 1.5rem;
    animation: scroll 20s linear infinite;
    align-items: center;
}

.infinite-slider .slides img {
    height: 300px;
    width: 533px;
    object-fit: cover;
    margin-right: 10px;
    flex-shrink: 0;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-300px * 4 - 1.5rem * 4));
    }
}

/* ========== MONTH ACTIVITY ========== */
#month-activity {
    margin-top: 7rem;
}

#month-activity .month-activity-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #FFE0B2;
    border-radius: 1rem;
    border: none;
    margin-top: 1rem;
    padding: 0;
    overflow: hidden;
}

#month-activity .month-activity-card img {
    width: 100%;
    height: 150px;
    /* fixe la hauteur */
    object-fit: cover;
    /* remplit sans déformer */
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    display: block;
}

#month-activity .month-activity-card h3 {
    text-align: center;
    margin: 1rem;
    text-transform: uppercase;
}

#month-activity .month-activity-card p {
    padding: 1rem;
    margin: 0;
}

#month-activity .row>.col-auto {
    display: flex;
}

#month-activity .month-activity-register {
    background-color: #DA6441;
    border-radius: 2rem;
    color: #FFFFFF;
    border: none;
    padding: 0.6rem 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    margin: auto;
    display: inline-block;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
}

#month-activity .month-activity-register:hover {
    background-color: #b34b35;
}

/* ========== MODAL ========== */
.modal {
    margin-top: 10rem;
}

.modal .btn-close-modal {
    background-color: #FFFFFF;
    color: #17212D;
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal .btn-close-modal:hover {
    background-color: #b34b35;
    color: #FFFFFF;
}

.modal-content {
    background-color: #2E4053;
    color: white;
    border-radius: 1rem;
}

.modal-header,
.modal-body {
    border: none;
}

.btn-close.white-close {
    filter: invert(1);
    opacity: 1;
}

/* ========== FOOTER ========== */
.footer {
    background-color: #FDF6E3;
    margin-top: 10rem;
}

.custom-footer-link {
    color: #2E4053 !important;
}

.custom-footer-link:hover {
    text-decoration: underline;
}

/* ========== ARTICLES & BANNERS ========== */
#article {
    background-color: #fffef9;
    padding-bottom: 50px;
}

#banner {
    position: relative;
}

.banner-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

/* ========== TEXT SECTIONS ========== */
.intro,
.section3 {
    max-width: 900px;
    margin-top: 1.5rem;
    text-align: left;
}

.section-text-img {
    max-width: 900px;
    margin: 0 auto;
    min-height: 400px;
}

.image-contain {
    object-fit: contain;
    max-width: 100%;
}

.section5 img {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.section5 p {
    padding: 1rem 2rem;
    text-align: justify;
    max-width: 1000px;
    margin: auto;
}

/*========== NOS AMIS  ==========*/
.amis-img {
    max-height: 300px;
    object-fit: contain;
}

/* ========== UTILITIES ========== */
.mini-flag {
    height: 15px;
    width: 20px;
    margin-left: 5px;
    margin-bottom: 5px;
}

.welcome-text {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.link-utils {
    text-align: center;
    font-size: 0.95rem;
    padding: 2rem 1rem;
    background-color: #f7f4ed;
    color: #333;
    line-height: 1.6;
}

#lightbox-img {
    max-width: 90vw;
    /* Largeur max 90% de la largeur de la fenêtre */
    max-height: 50vh;
    /* Hauteur max 80% de la hauteur de la fenêtre */
    object-fit: contain;
    /* L’image garde ses proportions */
    margin: 0 auto;
    display: block;
}

.footer-droits {
    color: #17212D;
}

/* ========== FORMULAIRE CONTACT ========== */
h1.contact-title {
    color: #17212D !important;
}

.contact {
    max-width: 800px !important;
    margin: 30px auto !important;
    background-color: #FFE0B2 !important;
    padding: 20px 30px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

.contact-title {
    color: #17212D !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    font-weight: 700 !important;
}

.contact .wpforms-field input[type="text"],
.contact .wpforms-field input[type="email"],
.contact .wpforms-field textarea {
    width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 5px !important;
    border: 1px solid #ccc !important;
    box-sizing: border-box !important;
    transition: border-color 0.3s ease !important;
}

.contact .wpforms-field input[type="text"]:focus,
.contact .wpforms-field input[type="email"]:focus,
.contact .wpforms-field textarea:focus {
    border-color: #DA6441 !important;
    box-shadow: 0 0 0 2px #DA6441 !important;
    /* remplace la lueur bleue */
    outline: none !important;
}

.contact .wpforms-submit {
    background-color: #DA6441 !important;
    color: white !important;
    padding: 12px 30px !important;
    border-radius: 25px !important;
    display: block !important;
    margin: 20px auto 0 !important;
    font-weight: bold !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.contact .wpforms-submit:hover {
    background-color: #b35034 !important;
}


/* ========== RESPONSIVE GRID ========== */
.row-custom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(276px, 1fr));
    justify-content: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 993px) {
    .row-custom {
        grid-template-columns: repeat(3, 276px);
    }
}

@media (min-width: 601px) and (max-width: 992px) {
    .row-custom {
        grid-template-columns: repeat(2, 276px);
    }
}

@media (max-width: 600px) {
    .row-custom {
        grid-template-columns: 1fr;
    }
}

.card-wrapper {
    width: 100%;
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 450px) {
    .col-12.col-sm-6.col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .card-wrapper {
        padding: 0 1rem;
    }

    .cours-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ========== SECTION 1 ========== */
.section1 .content-box {
    width: 600px;
    max-width: 100%;
    padding: 20px;
}

.section1 p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.section1 img {
    display: block;
    width: 700px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}


/* ========== GALERIE ========== */
.gal-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.66%;
    overflow: hidden;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

.image-wrapper img:hover {
    transform: scale(1.05);
}

.gal-card p {
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
    margin: 0;
}

/* ========== LISTES UTILES ========== */
.page-container ul {
    text-align: left;
    display: inline-block;
    margin: 0 auto 1rem auto;
    padding-left: 1.2rem;
}

.page-container .row>.col a {
    display: inline-block;
    text-align: center;
}

.col-auto {
    margin-left: 0;
    margin-right: 0;
}

.carte-img-bottom {
    width: 100%;
    height: 150px;
    /* ou ajuste à ta convenance */
    object-fit: cover;
    display: block;
    margin: 0;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.modal-body img {
    max-height: 300px;
    /* hauteur max */
    width: auto;
    /* largeur automatique pour garder le ratio */
    max-width: 100%;
    /* jamais dépasser la largeur du conteneur */
    object-fit: contain;
    /* pour bien ajuster l’image si besoin */
}

@media (max-width: 991.98px) {

    body {
        background-image: none !important;
    }
}

@media (max-width: 991px) {

    #flash-news::before,
    #asso-news::before {
        content: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

@media (max-width: 767.98px) {

    /* Agrandir images flash-news et asso-news */
    #flash-news img,
    #asso-news img {
        width: 100% !important;
        /* remplacer le w-50 */
        max-width: 100%;
        /* au cas où */
        height: auto;
    }

    /* Bouton coreo plus petit */
    .coreo-btn {
        padding: 0.4rem 0.8rem !important;
        /* réduit padding */
        font-size: 0.9rem !important;
        /* taille texte plus petite */
        max-width: 200px;
        /* max largeur */
        width: 100%;
        /* responsive */
    }
}

@media (min-width: 1921px) {
    body.home {
        background-image: none !important;
    }
}

@media (max-width: 600px) {
    #activity {
        display: none;
    }
}

@media (max-width: 600px) {
    #welcome .col-md-6:last-child {
        display: none;
    }
}