/* =============================== */
/*   COMPONSANTS – CARTES VILLE     */
/* =============================== */

.ville-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.ville-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ville-card.open .ville-description {
    display: block;
}

/* Conteneur image + titre intégré */
.ville-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.ville-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Titre centré sur l'image */
.ville-nom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.6rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 10px;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

/* Contenu de la carte */
.ville-content {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ville-infos {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ville-infos p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 4px 0;
}

.ville-infos p span {
    font-weight: bold;
    color: #2e7d32;
    text-transform: uppercase;
    margin-right: 6px;
}

/* Description masquée par défaut */
.ville-description {
    display: none;
    margin-top: 8px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.ville-card.open .ville-description {
    display: block;
}

/* Lien "Voir plus/moins" */
.ville-card-toggle {
    cursor: pointer;
    color: #2e7d32;
    font-size: 0.9rem;
    margin-top: 6px;
    display: inline-block;
    transition: color 0.3s ease;
}

.ville-card-toggle:hover {
    color: #1b5e20;
}

/* Bouton de visite */
.site-link-button {
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 14px;
    background-color: #2e7d32;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    width: fit-content;
    max-width: 100%;
    transition: background-color 0.3s ease;
}

.site-link-button:hover {
    background-color: #1b5e20;
}

.site-link-button img {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px !important;
    max-height: 18px !important;
    object-fit: contain;
    flex: 0 0 18px;
    filter: brightness(0) invert(1);
}

.site-link-button span {
    font-weight: 500;
}

/* Palette culture (violet) */
.section-culture .ville-infos p span {
    color: rgba(49, 27, 146, 1);
}

.section-culture .ville-card-toggle {
    color: rgba(103, 58, 183, 1);
}

.section-culture .ville-card-toggle:hover {
    color: rgba(74, 20, 140, 1);
}

.section-culture .site-link-button {
    background-color: rgba(103, 58, 183, 1);
    margin-top: 6px;
}

.section-culture .site-link-button:hover {
    background-color: rgba(74, 20, 140, 1);
}

/* Structure simple culture: infos a gauche, affiche a droite */
.section-culture .culture-entry-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
}

.section-culture .culture-card {
    height: 100%;
}

.section-culture .culture-entry-infos {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.section-culture .culture-entry-poster {
    width: clamp(220px, 26vw, 300px);
    max-width: 40%;
    flex: 0 0 auto;
}

.section-culture .culture-poster-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

/* Palette personnage (orange) */
.section-personnage .ville-infos p span {
    color: rgba(230, 81, 0, 1);
}

.section-personnage .site-link-button {
    background-color: rgba(245, 124, 0, 1);
}

.section-personnage .site-link-button:hover {
    background-color: rgba(230, 81, 0, 1);
}

/* Structure personnage: infos a gauche, portrait a droite */
.section-personnage .personnage-card {
    height: 100%;
}

.section-personnage .personnage-entry-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
}

.section-personnage .personnage-entry-infos {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.section-personnage .personnage-entry-portrait {
    width: clamp(220px, 26vw, 300px);
    max-width: 40%;
    flex: 0 0 auto;
}

.section-personnage .personnage-index-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

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

@media (max-width: 768px) {
    .ville-nom {
        font-size: 1.2rem;
        padding: 6px 12px;
    }

    .ville-infos p {
        font-size: 0.9rem;
    }

    .section-culture .culture-entry-row {
        flex-direction: column-reverse;
        gap: 14px;
        padding: 16px;
    }

    .section-culture .culture-entry-poster {
        width: min(300px, 100%);
        max-width: 100%;
        align-self: center;
    }

    .section-personnage .personnage-entry-row {
        flex-direction: column-reverse;
        gap: 14px;
        padding: 16px;
    }

    .section-personnage .personnage-entry-portrait {
        width: min(300px, 100%);
        max-width: 100%;
        align-self: center;
    }
}
