/* =====================================
   BARRE DE RECHERCHE ELEMENTOR
   ===================================== */

.glossaire-recherche-wrapper {
    margin-bottom: 30px;
}

.recherche-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #2d5a27;
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(45, 90, 39, 0.15);
    transition: all 0.3s ease;
    max-width: 600px;
    margin: 0 auto;
}

.recherche-input-group:focus-within {
    box-shadow: 0 4px 20px rgba(45, 90, 39, 0.3);
    border-color: #c9a84c;
}

.recherche-icone {
    font-size: 1.2em;
    margin-right: 10px;
    flex-shrink: 0;
}

.glossaire-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Crimson Text', Georgia, serif;
    color: #333;
    background: transparent;
}

.glossaire-search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 1rem;
    padding: 2px 8px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.search-clear-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.recherche-info {
    margin-top: 10px;
    padding: 6px 20px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* =====================================
   CONTENEUR DES RÉSULTATS DE RECHERCHE
   Style identique au Loop Grid Elementor
   ===================================== */

#gsr-resultats {
    display: none; /* Caché par défaut, affiché via JS */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    #gsr-resultats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #gsr-resultats {
        grid-template-columns: 1fr;
    }
}

/* =====================================
   CARTE RÉSULTAT — Style Elementor
   Reproduit le template flip de Cloonnaraigh
   ===================================== */

.gsr-carte {
    background: #FFF8E7;               /* Fond crème identique au template */
    border: 3px solid #8B7355;         /* Bordure marron identique */
    border-radius: 20px;
    padding: 30px 25px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.gsr-carte:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: #c9a84c;
}

/* Ligne décorative en haut au hover */
.gsr-carte::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2d5a27, #c9a84c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.gsr-carte:hover::before {
    transform: scaleX(1);
}

.gsr-recto {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
}

/* Emoji — grand comme dans le template */
.gsr-emoji {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 15px;
}

/* Nom — Police Cinzel comme dans le template */
.gsr-nom {
    font-family: 'Cinzel', Georgia, serif !important;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d5a27;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Prononciation — italique gris */
.gsr-prononciation {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 0.95rem;
    color: #888;
    font-style: italic;
    margin: 0 0 8px 0;
}

/* Sous-catégorie — vert */
.gsr-sous-categorie {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4A6B4A;
    margin: 0 0 10px 0;
}

/* Badge Nouveau */
.gsr-badge-nouveau {
    display: inline-block;
    padding: 3px 10px;
    background: #c9a84c;
    color: #2d5a27;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

/* Séparateur doré */
.gsr-separateur {
    width: 80px;
    border: none;
    border-top: 2px solid #c9a84c;
    margin: 10px auto 12px;
}

/* Extrait */
.gsr-extrait {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 15px 0;
    flex: 1;
}

/* Lien Découvrir */
.gsr-decouvrir {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 0.95rem;
    color: #2d5a27;
    margin: auto 0 0 0;
    padding-top: 10px;
    font-weight: 600;
    transition: color 0.2s;
}

.gsr-carte:hover .gsr-decouvrir {
    color: #c9a84c;
}

/* =====================================
   ÉTAT VIDE (aucun résultat)
   ===================================== */

.gsr-vide {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.gsr-vide-icone {
    font-size: 4rem;
    margin-bottom: 15px;
}

.gsr-vide-titre {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.5rem;
    color: #2d5a27;
    margin: 0 0 10px 0;
}

.gsr-vide-texte {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.1rem;
    color: #666;
    margin: 5px 0;
}

/* =====================================
   SPINNER DE CHARGEMENT
   ===================================== */

.gsr-chargement {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 15px;
    color: #666;
    font-family: 'Crimson Text', Georgia, serif;
    font-style: italic;
}

.gsr-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #f0f0f0;
    border-top-color: #c9a84c;
    border-radius: 50%;
    animation: gsr-spin 0.8s linear infinite;
}

@keyframes gsr-spin {
    to { transform: rotate(360deg); }
}
