/* ==========================================================
   GALERIE PHOTO — PROFIL
   ========================================================== */

.galerie-page {
    width: 100%;
}

.galerie-intro {
    margin: 8px 0 12px;
    color: #6b7280;
    font-size: 15px;
}

.galerie-counter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 14px;
}

.galerie-counter strong {
    font-size: 16px;
}


/* ==========================================================
   MESSAGES
   ========================================================== */

.galerie-message {
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 14px;
}

.galerie-message-success {
    background: #e8f7ee;
    color: #176b3a;
    border: 1px solid #b9e6c9;
}

.galerie-message-error {
    background: #fdecec;
    color: #a11a1a;
    border: 1px solid #f2b8b8;
}


/* ==========================================================
   ZONE AJOUT PHOTO
   ========================================================== */

.galerie-upload-section {
    margin-bottom: 30px;
}

.galerie-upload-form {
    padding: 22px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}


/* ==========================================================
   BOUTON CHOISIR UNE PHOTO
   ========================================================== */

.galerie-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    min-height: 110px;

    border: 2px dashed #cbd5e1;
    border-radius: 14px;

    background: #ffffff;
    color: #374151;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.galerie-file-label:hover {
    border-color: #3b82f6;
    background: #f8fbff;
    transform: translateY(-1px);
}

.galerie-file-icon {
    font-size: 30px;
}


/* On cache l'input original */

#galerie-photo {
    display: none;
}


/* ==========================================================
   APERÇU
   ========================================================== */

.galerie-preview {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.galerie-preview img {
    width: 180px;
    height: 180px;
    object-fit: cover;

    border-radius: 14px;
    border: 1px solid #e5e7eb;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}


/* ==========================================================
   AIDE
   ========================================================== */

.galerie-help {
    margin: 14px 0 18px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   LIMITE 6 PHOTOS
   ========================================================== */

.galerie-limit-message {
    padding: 18px;
    margin-bottom: 30px;

    border-radius: 12px;

    background: #f8fafc;
    border: 1px solid #e5e7eb;

    color: #4b5563;
    line-height: 1.6;
}


/* ==========================================================
   GRILLE
   ========================================================== */

.galerie-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-top: 18px;
}


/* ==========================================================
   PHOTO
   ========================================================== */

.galerie-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.galerie-image-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.galerie-image-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.galerie-image-link:hover img {
    transform: scale(1.06);
    filter: brightness(0.9);
}

.galerie-note {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 10;

    margin: 0;
    padding: 8px 10px;

    text-align: center;

    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.galerie-note-label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
}

.galerie-note-affichage {
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.galerie-note-etoile {
    font-size: 20px;
    line-height: 1;
}

.galerie-note-etoile.active {
    color: #f5b301;
}

.galerie-note-etoile.inactive {
    color: #ccc;
}

.galerie-note-valeur {
    margin-left: 6px;
    font-size: 13px;
    font-weight: 600;
}

.galerie-note-nombre {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #888;
}

.galerie-note-vide {
    color: #888;
    font-size: 13px;
}


/* ==========================================================
   BOUTON SUPPRESSION
   ========================================================== */

.galerie-delete-form {
    position: absolute;

    top: 10px;
    right: 10px;

    z-index: 5;

    margin: 0;
}

.galerie-delete-button {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(220, 38, 38, 0.92);

    color: #ffffff;

    font-size: 16px;

    cursor: pointer;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.galerie-delete-button:hover {
    background: #dc2626;
    transform: scale(1.08);
}


/* ==========================================================
   RETOUR / ACTIONS
   ========================================================== */

.galerie-actions {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-top: 30px;

    padding-top: 25px;

    border-top: 1px solid #e5e7eb;
}

.galerie-actions .bouton {
    text-decoration: none;
}


/* ==========================================================
   ÉTAT VIDE
   ========================================================== */

.profil-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 150px;

    padding: 25px;

    text-align: center;

    color: #6b7280;

    background: #f8fafc;

    border: 1px dashed #d1d5db;

    border-radius: 14px;
}

.profil-empty span:first-child {
    font-size: 35px;
}


/* ==========================================================
   RESPONSIVE TABLETTE
   ========================================================== */

@media (max-width: 700px) {

    .galerie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .galerie-upload-form {
        padding: 16px;
    }

    .galerie-actions {
        flex-direction: column;
    }

    .galerie-actions .bouton {
        width: 100%;
        text-align: center;
    }	
	
}


/* ==========================================================
   RESPONSIVE MOBILE
   ========================================================== */

@media (max-width: 430px) {

    .galerie-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
    }

    .galerie-item {
        border-radius: 11px;
    }

    .galerie-delete-button {
        width: 32px;
        height: 32px;

        font-size: 14px;

        top: 6px;
        right: 6px;
    }

    .galerie-file-label {
        min-height: 90px;
    }

    .galerie-preview img {
        width: 150px;
        height: 150px;
    }
}

/* ==========================================================
   GALERIE PHOTO — PROFIL PUBLIC
   ========================================================== */

.profil-gallery-section {
    margin-top: 28px;
}

.profil-gallery-section h2 {
    margin-bottom: 20px;
}

/* Grille */
.profil-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

/* Cadre extérieur de chaque photo */
.profil-gallery-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 5px;
    overflow: hidden;

    background: #ffffff;

    border: 2px solid #dbe4f0;
    border-radius: 18px;

    text-decoration: none;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.08),
        0 1px 3px rgba(15, 23, 42, 0.05);

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

/* Image */
.profil-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: cover;

    border-radius: 12px;

    transition:
        transform .35s ease,
        filter .35s ease;
}

/* Effet au survol */
.profil-gallery-item:hover {
    transform: translateY(-4px);

    border-color: #3b82f6;

    box-shadow:
        0 10px 25px rgba(37, 99, 235, 0.15),
        0 4px 10px rgba(15, 23, 42, 0.08);
}

.profil-gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(.94);
}

/* Petit reflet au survol */
.profil-gallery-item::after {
    content: "";
    position: absolute;
    inset: 5px;

    border-radius: 12px;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.20),
        transparent 45%
    );

    pointer-events: none;
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 700px) {
	
    .profil-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }	

    .profil-gallery-item {
        padding: 4px;
        border-radius: 15px;
    }

    .profil-gallery-item img {
        border-radius: 10px;
    }

    .profil-gallery-item::after {
        inset: 4px;
        border-radius: 10px;
    }
}

@media (max-width: 430px) {

    .profil-gallery {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    .profil-gallery-item {
        padding: 3px;
        border-width: 2px;
        border-radius: 13px;
    }

    .profil-gallery-item img {
        border-radius: 9px;
    }

    .profil-gallery-item::after {
        inset: 3px;
        border-radius: 9px;
    }
}