/* Le conteneur principal de la galerie (Affichage en Grille) */
.galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px; 
    padding: 20px 0;
    margin-top: 20px;
}

/* La carte blanche qui entoure l'image et le texte */
.carte-creation {
    background-color: #fff;
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    display: flex;
    flex-direction: column; /* Permet d'empiler l'image puis le texte */
}

.carte-creation:hover {
    transform: translateY(-8px); 
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15); 
}

/* L'image à l'intérieur de la carte */
.carte-creation img {
    width: 100%;
    /* C'est l'IMAGE qui est carrée, pas la carte complète */
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    display: block;
}

/* ==== NOUVEAU : La zone de texte sous l'image ==== */
.carte-infos {
    padding: 15px 20px;
    text-align: left;
}

.carte-infos h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #222;
    font-family: 'DynaPuff', cursive, sans-serif;
}

.carte-infos p {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #555;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

/* Petit badge pour la taille (façon "À propos" de votre page d'accueil) */
.badge-dim {
    display: inline-block;
    background-color: #f3f0e1;
    color: #c4a914;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 5px;
}

/* ==== BADGE NOUVEAU FLASHY ==== */
.badge-nouveau {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff007b, #ff4b2b); /* Dégradé rose/orange très moderne */
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 20px;
    z-index: 10;
}

/* ==== ZONE DE RECHERCHE ==== */
.conteneur-recherche {
    display: flex; 
    flex-direction: column-reverse; /* Sur mobile : on inverse l'ordre ! La recherche monte, le tri descend. */
    align-items: flex-start; /* Tout aligné à GAUCHE sur mobile */
    gap: 15px; /* Espace vertical entre les deux */
    margin-bottom: 20px; 
}

/* Le petit conteneur qui garde la loupe et l'input côte à côte */
.groupe-recherche {
    display: flex;
    align-items: center;
    gap: 4px; /* Même gap que le bouton tri */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    padding: 8px 18px; /* Exactement le même padding que le bouton de tri ! */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.groupe-recherche:hover {
    border-color: #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Conteneur flex pour aligner le titre et le bouton */
.titre-creation-container {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin: 0 0 10px 0;
}

/* Le bouton lien "Commander" */
.order-mini-redirect {
    background: #ffffff; 
    border: 1px solid #e0e0e0; /* border */
    border-radius: 8px; /* Coins arrondis */
    padding: 6px 8px; /* Espace autour de l'image */
    cursor: pointer; 
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); /* Toute petite ombre douce */
}

.order-mini-redirect img {
    width: 22px; /* J'ai très légèrement réduit l'image pour compenser le cadre */
    height: auto;
    display: block;
}

.order-mini-redirect:hover {
    transform: scale(1.05); /* Petit effet de zoom */
    border-color: #c4a914; /* La fine ligne prend votre couleur dorée au survol ! */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Sur PC (écrans larges), on le fixe tout en haut à droite */
@media(min-width: 900px) {
    .conteneur-recherche {
        flex-direction: row; /* Sur PC : on les remet côte à côte ! */
        position: absolute;
        top: 30px;
        right: 40px;
        margin-bottom: 0;
    }
}

.loupe-bouton {
    width: 34px;
    cursor: pointer;
    transition: transform 0.2s;
}

.loupe-bouton:hover {
    transform: scale(1.1) scaleX(-1) !important;
}

.mon-bouton-texte {
    color: #222;
    font-family: 'Inter', sans-serif;
    font-size: 14px; /* Même taille que le bouton Tri */
    font-weight: normal;
    cursor: pointer;
    margin: 0;
    transition: color 0.2s;
}

.mon-bouton-texte:hover {
    color: #c4a914;
}