/**
 * COMPONENTS - Composants d'interface réutilisables
 * Éléments modulaires et interactifs
 * Contient: cards, buttons, sliders, galleries
 * Version: 2.1.0 - Réorganisation: ERROR-404 et SEARCH RESULTS déplacés vers pages.css
 */

/* ==========================================================================
   CARDS - Article cards unified (vertical & horizontal) with fixed footer
   ========================================================================== */

/* Base commune pour toutes les cartes */
.card_post_vertical_single_article,
.card_post_horizontal {
    display: flex;
    background: var(--tk-color-gray-100);
    border-radius: var(--tk-radius-sd);
    box-shadow: var(--tk-shadow-md);
    transition: transform var(--tk-transition-base), box-shadow var(--tk-transition-base);
    overflow: hidden;
    margin: var(--tk-space-4) auto;
    /* Hauteur totale pour flexbox */
    height: 100%;
}

#home_prochains_voyages article.card_post_horizontal {
    height: 300px;
}

.card_post_vertical_single_article:hover,
.card_post_horizontal:hover {
    transform: translateY(-5px);
    box-shadow: var(--tk-shadow-xl);
}

/* Layout spécifique */
.card_post_vertical_single_article {
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    /* Hauteur minimale pour uniformité */
    min-height: 400px;
}

.card_post_horizontal {
    flex-direction: row;
    width: 100%;
    max-width: 1020px;
    /* Hauteur minimale pour uniformité */
    min-height: 300px;
}

/*  media screen inferieur 768 */
@media (max-width: 1000px) {

    .card_post_vertical_single_article,
    .card_post_horizontal {
        flex-direction: column;
    }
}

/* ==========================================================================
   IMAGES - Harmonisées
   ========================================================================== */

.card_post_vertical_single_article-thumbnail,
.card_post_horizontal-thumbnail {
    display: flex;
    justify-content: center;
    overflow: hidden;
    /* Empêche la compression */
    flex-shrink: 0;
}

.card_post_vertical_single_article-thumbnail {
    width: 100%;
    /* Hauteur fixe pour uniformité */
    height: 200px;
}

.card_post_horizontal-thumbnail {
    width: 50%;
    margin: var(--tk-space-4);
}

.card_post_horizontal-thumbnail-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--tk-radius-sd);
}

.card_post_vertical_single_article-thumbnail img,
.card_post_horizontal-thumbnail-container img {
    height: 100%;
    object-fit: cover;
    transition: transform var(--tk-transition-base);
}

.card_post_vertical_single_article-thumbnail img {
    border-radius: var(--tk-radius-sd) var(--tk-radius-sd) 0 0;
    width: 350px;
}

.card_post_horizontal-thumbnail-container img {
    border-radius: var(--tk-radius-sd);
    width: 110%;
}

.card_post_vertical_single_article:hover .card_post_vertical_single_article-thumbnail img,
.card_post_horizontal:hover .card_post_horizontal-thumbnail-container img {
    transform: scale(1.05);
}

@media (max-width: 1000px) {
    .card_post_horizontal-thumbnail {
        width: unset;
        margin: unset;
    }

    .card_post_vertical_single_article-thumbnail img {
        border-radius: var(--tk-radius-sd) var(--tk-radius-sd) 0 0;
        width: 350px;
    }

    #home_prochains_voyages article.card_post_horizontal {
        max-width: 350px;
    }
}

/* ==========================================================================
   CONTENEUR TEXTE - Structure flexbox pour bouton en bas
   ========================================================================== */

.card_post_vertical_single_article-text,
.card_post_horizontal-text {
    display: flex;
    flex-direction: column;
    padding: var(--tk-space-4);
    /* Prend tout l'espace disponible */
    flex: 1;
    /* Prend tout l'espace disponible */
    /* height: 100%; */
}

.card_post_horizontal-text {
    width: 50%;
}

/* Conteneur flexible pour le contenu principal */
.card_post_vertical_single_article-content,
.card_post_horizontal-content {
    /* Prend tout l'espace disponible */
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Footer fixé en bas */
.card_post_vertical_single_article-footer,
.card_post_horizontal-footer {
    /* Pousse le bouton vers le bas */
    margin-top: auto;
    /* Empêche la compression */
    flex-shrink: 0;
    text-align: center;
}

/* ==========================================================================
   TITRES - Harmonisés
   ========================================================================== */

.card_post_vertical_single_article-title,
.card_post_horizontal-title {
    font-size: var(--tk-font-size-lg);
    font-weight: var(--tk-font-weight-bold);
    margin: 0 0 var(--tk-space-2) 0;
    line-height: var(--tk-line-height-tight);
}

.card_post_vertical_single_article-title a,
.card_post_horizontal-title a {
    color: var(--tk-color-gray);
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--tk-transition-base);
}

.card_post_vertical_single_article-title a:hover,
.card_post_horizontal-title a:hover {
    color: var(--tk-color-orange);
}

/* ==========================================================================
   MÉTADONNÉES (date/catégorie) - Harmonisées
   ========================================================================== */

.card_post_vertical_single_article-cat-date,
.card_post_horizontal-date {
    font-size: var(--tk-font-size-sm);
    color: var(--tk-color-orange);
    margin: 0 0 var(--tk-space-3) 0;
    font-weight: var(--tk-font-weight-medium);
}

/* ==========================================================================
   EXTRAITS - Harmonisés
   ========================================================================== */

.card_post_vertical_single_article-excerpt,
.card_post_horizontal-excerpt {
    /* Prend l'espace restant */
    flex: 1;
    margin: 0 0 var(--tk-space-4) 0;
    text-decoration: none;
}

.card_post_vertical_single_article-excerpt p,
.card_post_horizontal-excerpt p {
    color: var(--tk-color-gray-700);
    font-size: var(--tk-font-size-sm);
    line-height: var(--tk-line-height-relaxed);
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card_post_vertical_single_article-excerpt:hover p,
.card_post_horizontal-excerpt:hover p {
    color: var(--tk-color-black);
}

/* ==========================================================================
   BOUTONS "En savoir plus" - Toujours en bas
   ========================================================================== */

.card_post_vertical_single_article-read-more,
.card_post_horizontal-read-more {
    margin: 0;
    text-align: center;
}

.card_post_vertical_single_article-read-more a,
.card_post_horizontal-read-more a {
    color: var(--tk-color-white);
    text-decoration: none;
    font-weight: var(--tk-font-weight-bold);
    font-size: var(--tk-font-size-sm);
    padding: var(--tk-space-2) var(--tk-space-4);
    display: inline-block;
    transition: all var(--tk-transition-base);
}

.card_post_vertical_single_article-read-more:hover,
.card_post_horizontal-read-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--tk-shadow-md);
}

/* ==========================================================================
   RESPONSIVE - Cards adaptatives
   ========================================================================== */

@media (max-width: 768px) {

    /* Les cartes horizontales deviennent verticales sur mobile */
    #home_prochains_voyages .card_grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .card_post_horizontal {
        max-width: 350px;
        min-height: 400px;
    }

    .card_post_horizontal-thumbnail,
    .card_post_horizontal-text {
        width: 100%;
    }

    .card_post_horizontal-thumbnail {
        margin: 0;
        /* Même hauteur que les cartes verticales */
        height: 200px;
    }

    .card_post_horizontal-thumbnail-container img {
        border-radius: var(--tk-radius-sd) var(--tk-radius-sd) 0 0;
    }

    /* Espacement mobile */
    .card_post_vertical_single_article,
    .card_post_horizontal {
        margin: var(--tk-space-3) auto;
        /* Ajustement pour mobile */
        min-height: 380px;
        flex-direction: column;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    /* Tablettes */
    #home_prochains_voyages .card_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card_post_horizontal {
        max-width: 769px;
    }

    .card_post_horizontal-thumbnail {
        height: 200px;
    }
}

@media (min-width: 960px) and (max-width: 1048px) {
    .card_post_horizontal-excerpt p {
        height: 128px;
    }
}

@media (max-width: 900px) {
    .card_post_horizontal-text {
        width: 100%;
        max-width: 595px;
        height: auto;
        margin: auto;
    }

    .card_post_horizontal-excerpt p {
        height: 20%;
    }
}

@media (max-width: 480px) {

    .card_post_vertical_single_article,
    .card_post_horizontal {
        flex-direction: column;
    }

    .card_post_horizontal-text {
        width: 100%;
        max-width: 595px;
        height: auto;
        margin: auto;
    }

    .card_post_horizontal-excerpt p {
        height: 20%;
    }
}

/* ==========================================================================
   GRILLES DE CARTES
   ========================================================================== */

/* Conteneur pour grilles de cartes */
.cards-grid {
    display: grid;
    gap: var(--tk-space-6);
    margin: var(--tk-space-8) 0;
}

/* Grille verticale (3 colonnes) */
.cards-grid--vertical {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Toutes les cartes ont la même hauteur */
    align-items: stretch;
}

/* Grille horizontale (1 colonne) */
.cards-grid--horizontal {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: var(--tk-space-8) auto;
}

@media (max-width: 768px) {
    .cards-grid--vertical {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        gap: var(--tk-space-4);
        margin: var(--tk-space-4) 0;
    }
}

/* ==========================================================================
   EFFETS VISUELS
   ========================================================================== */

/* Effet shadow_hover pour compatibilité */
.shadow_hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--tk-shadow-xl);
}

/* États actifs */
.card_post_vertical_single_article:active,
.card_post_horizontal:active {
    transform: translateY(-2px);
}

/* Focus pour accessibilité */
.card_post_vertical_single_article:focus-within,
.card_post_horizontal:focus-within {
    outline: 2px solid var(--tk-color-orange);
    outline-offset: 2px;
}

/* ==========================================================================
   BUTTONS - Action buttons and links
   ========================================================================== */

.btn {
    display: inline-block;
    padding: var(--tk-space-3) var(--tk-space-6);
    background-color: var(--tk-color-orange);
    color: var(--tk-color-white);
    text-decoration: none;
    border-radius: var(--tk-radius-sd);
    border: none;
    cursor: pointer;
    font-size: var(--tk-font-size-base);
    font-weight: var(--tk-font-weight-semibold);
    transition: all var(--tk-transition-base);
}

.btn:hover {
    background-color: var(--tk-color-orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--tk-shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--tk-color-orange);
    border: 2px solid var(--tk-color-orange);
}

.btn-secondary:hover {
    background-color: var(--tk-color-orange);
    color: var(--tk-color-white);
}

.bouton_arrondi {
    border-radius: 25px;
    padding: 10px 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.bouton_arrondi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.bouton_arrondi a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   SLIDERS - Enhanced Swiper sliders
   ========================================================================== */

.swiper {
    box-shadow: var(--tk-shadow-lg);
}

.swiper-wrapper {
    z-index: calc(var(--tk-z-dropdown) + 1);
}

.swiper-slide {
    margin: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.swiper-text {
    position: absolute;
    color: var(--tk-color-orange);
    text-align: end;
    line-height: var(--tk-line-height-normal);
    top: 100px;
    right: 15%;
    text-shadow: var(--tk-color-black) 2px 2px 3px;
    font-size: var(--tk-font-size-2xl);
    font-weight: var(--tk-font-weight-bold);
}

.swiper-text hr {
    width: 50%;
    margin: 0 0 0 auto;
}

.slider-img-title {
    font-size: large;
}

.slider-img-description {
    color: var(--tk-color-white);
    font-size: normal;
}

.swiper-pagination {
    display: none;
    bottom: var(--tk-space-4) !important;
    z-index: calc(var(--tk-z-dropdown) + 2);
    top: 60px;
}

.swiper-pagination-bullet {
    background: var(--tk-color-white);
    opacity: 0.5;
    transition: all var(--tk-transition-base);
}

.swiper-pagination-bullet-active {
    background: var(--tk-color-orange);
    opacity: 1;
    transform: scale(var(--tk-transform-scale));
}

span .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--tk-color-orange);
    opacity: 1;
}

.swiper-horizontal>.swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.swiper-pagination-fraction {
    width: 169% !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--tk-color-orange);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-top: calc(-25px);
    transition: all var(--tk-transition-base);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.7);
    color: var(--tk-color-orange-light);
}

/* Slider home spécifique */
#home_slider-container {
    max-width: calc(var(--tk-max-width)*1.5);
    position: relative;
    margin: auto;
    box-shadow: 0px 0px 300px 300px var(--tk-color-black);
}

#home_slider-overlay {
    position: absolute;
    height: 100%;
    z-index: 10;
}

#home_slider-overlay-path {
    z-index: 20;
    position: absolute;
    clip-path: polygon(81% 0, 54% 100%, 0 100%, 0 0);
    background: var(--tk-color-white);
    opacity: 0.8;
    height: 100%;
    width: 57vw;
    max-width: 1000px;
}


#home_slider-overlay-path-text {
    width: 50vw;
}

#home_slider-overlay-path-text h2,
#home_slider-overlay-path-text h3,
#home_slider-overlay-path-text p {
    margin-left: 11%;
}

#home_slider-overlay-path-text h1 {
    color: var(--tk-color-orange);
    font-size: 5rem;
    margin-top: 30px;
    margin-left: 11%;
}

#home_slider-overlay-path-text h3 {
    color: var(--tk-color-gray);
    font-size: 4.5rem;
}

#home_slider-overlay-path-text p {
    color: var(--tk-color-gray);
    font-size: medium;
}

#home_slider-rose {
    width: 200px;
    position: absolute;
    bottom: 16px;
    z-index: 10;
    right: 14%;
}

/* Responsive slider */
@media (max-width: 768px) {
    .swiper-slide img {
        height: 400px;
    }

    .slider-img-description {
        color: var(--tk-color-white);
        font-size: 1rem;
    }

    .swiper-text {
        top: var(--tk-space-8);
        right: var(--tk-space-4);
        font-size: var(--tk-font-size-xl);
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }

    #home_slider-overlay-path {
        width: 71vw;
    }

    #home_slider-overlay-path-text {
        width: 50vw;
    }

    #home_slider-overlay-path-text h1 {
        font-size: 1.5rem;
    }

    #home_slider-overlay-path-text h2 {
        margin-left: 5%;
    }

    #home_slider-overlay-path-text h3 {
        font-size: 1rem;
    }

    #home_slider-overlay-path-text p {
        font-size: 0.8rem;
    }

    #home_slider-rose {
        width: 100px;
        bottom: 44px;
        right: 5%;
    }
}


@media (min-width: 768px) and (max-width: 1048px) {
    #home_slider-overlay-path-text h1 {
        font-size: 2.7rem;
    }

    #home_slider-overlay-path-text h3 {
        font-size: 2.5rem;
    }

    #home_slider-overlay-path-text p {
        font-size: 0.8rem;
    }
}

@media (min-width: 1048px) and (max-width: 1390px) {
    #home_slider-overlay-path-text h1 {
        font-size: 3.6rem;
    }

    #home_slider-overlay-path-text h3 {
        font-size: 3.4rem;
    }
}

/* ==========================================================================
   GALLERIES - Enhanced gallery layouts
   ========================================================================== */

.gallery {
    margin-bottom: var(--tk-space-6);
    display: grid;
    grid-gap: var(--tk-space-6);
    margin: var(--tk-space-8) 0;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--tk-radius-sd);
    box-shadow: var(--tk-shadow-md);
    transition: transform var(--tk-transition-base);
}

.gallery-item:hover {
    transform: scale(var(--tk-transform-scale));
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform var(--tk-transition-slow);
}

.gallery-item:hover img {
    transform: scale(var(--tk-transform-scale));
}

/* Gallery columns */
.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
    grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
    grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
    grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
    display: block;
    padding: var(--tk-space-2);
    font-size: var(--tk-font-size-sm);
    color: var(--tk-color-gray);
    text-align: center;
}

/* Gallery Photo Model */
.modele_galerie_photo_flags {
    visibility: hidden;
    position: absolute;
    z-index: var(--tk-z-dropdown);
    color: var(--tk-color-orange);
}

.modele_galerie_photo_flags-subcats a {
    color: var(--tk-color-gray);
    text-decoration: none;
    transition: color var(--tk-transition-base);
}

.modele_galerie_photo_flags-subcats a:hover {
    color: var(--tk-color-orange);
}

.modele_galerie_photo_flags-subcats a::after {
    color: var(--tk-color-black);
    content: ' | ';
}

.modele_galerie_photo_flags-subcats a:last-child::after {
    content: '';
}

/* Responsive galleries */
@media (max-width: 768px) {

    .gallery-columns-2,
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6,
    .gallery-columns-7,
    .gallery-columns-8,
    .gallery-columns-9 {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery {
        grid-gap: var(--tk-space-3);
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--tk-space-3);
    }
}

@media (max-width: 480px) {

    .gallery-columns-2,
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6,
    .gallery-columns-7,
    .gallery-columns-8,
    .gallery-columns-9 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   STYLES SPÉCIFIQUES AU THÈME
   ========================================================================== */

/* Logo spécifique */
#greentripper_logo {
    max-width: 150px;
    position: relative;
    rotate: -0deg;
    transition-duration: 1s;
}

#greentripper_logo:hover {
    rotate: -20deg;
    transition-duration: 1s;
}

#greentripper_logo img {
    width: 100%;
    height: auto;
    border-radius: var(--tk-radius-sd);
}

/* ==========================================================================
   ACCESSIBILITY - Classes d'accessibilité
   ========================================================================== */

/* Text meant only for screen readers. */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Comments */
.comment-content a {
    word-wrap: break-word;
}

.bypostauthor {
    display: block;
}

/* Search */
.entry-meta {
    text-align: center;
}


/* ==========================================================================
   no-results - Page not found
   ========================================================================== */
.no-results {
    width: 700px;
}

.no-results h1 {
    font-size: 2.5rem;
    text-align: center;
}

.no-results .search-submit {
    min-width: auto;
}

.no-results .search-field {
    max-width: 300px;
    width: auto;
}