/*
Theme Name: Astra Child
Template: astra
*/

/* --- Variables globales --- */
:root {
    --rose: #ff4081;
    --gris-clair: #f9f9f9;
    --gris-fonce: #444;
    --gris-texte: #333;
}

/* --- Badges --- */
.badge-nouveau {
    background-color: var(--rose);
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: bold;
    vertical-align: middle;
}

/* --- Grille des galeries parentes --- */
.galeries-parents {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.galerie-item {
    text-align: center;
    position: relative;
}

.galerie-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: block;
}

.galerie-item .badge-nouveau {
    position: absolute;
    top: 10px;
    left: 10px;
}

/* --- Grille des galeries enfants (albums enfants) --- */
.galerie-enfants {
    margin: 40px 0;
}

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.galerie-enfant-item {
    text-align: center;
    background: var(--gris-clair);
    padding: 10px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.galerie-enfant-item:hover {
    transform: scale(1.03);
}

.galerie-enfant-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* --- Grille des images (galerie feuille) --- */
.grid-galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.grid-galerie a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4 / 3; /* change à 1 / 1 si tu veux des carrés */
}

.photo-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Wrapper des images + bouton supprimer --- */
.photo-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.form-supprimer {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
}

.btn-supprimer {
    background-color: rgba(244, 67, 54, 0.9);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-supprimer:hover {
    background-color: rgba(244, 67, 54, 1);
}

/* --- Boutons (ajout, retour, voir tout) --- */
.btn-ajout-photo,
.btn-ajouter-photo {
    display: inline-block;
    margin: 20px 0;
    padding: 5px 10px;
    background-color: #0073aa;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-ajout-photo:hover,
.btn-ajouter-photo:hover {
    background-color: #005a87;
}

.btn-voir-tout {
    background-color: #3f51b5;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

.btn-voir-tout:hover {
    background-color: #2c3e9e;
}

.retour-parent {
    margin: 20px 0;
    text-align: left;
}

.btn-retour {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.btn-retour:hover {
    background-color: #000;
}

.galerie-feuille {
    width: 100%;
    max-width: 100%;
}