/* styles/homepage-author.css */
/* CSS spécifique page auteur (home/posts/author) — en complément de annonces.css */

.author-general-container {
    flex: 1 1 var(--footer-width);
    max-width: var(--footer-width);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-columns > .author-general-container {
    flex: 1 1 var(--footer-width);
    max-width: var(--footer-width);
    width: 100%;
    min-width: 0;
    margin: 0;
}

/* ===== Carte auteur ===== */
.author-general-container .author-container {
    position: relative;
    background-color: var(--bg-post-container);
    border-radius: .8rem;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, .05);
}

/* ===== Bouton signalement en haut à droite ===== */
.author-report-actions {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-report-actions .button-author-report {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 999px;
    text-decoration: none;
}

.author-report-actions .button-author-report img {
    width: 25px;
    height: 25px;
    display: block;
    filter: var(--logo-color);
}

.author-report-actions .button-author-report:hover {
    background: var(--button-shadow-hover);
}

/* ===== Version grisée avec texte visible ===== */
.author-report-actions .button-author-report--loginhint {
    width: auto;
    min-height: 40px;
    padding: 0 .75rem;
    gap: .5rem;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.12);
    border: 1px solid var(--general-line);
    color: var(--text-color);
    opacity: .72;
}

.author-report-actions .button-author-report--loginhint:hover {
    background: rgba(128, 128, 128, 0.18);
    opacity: .88;
    text-decoration: none;
}

.author-report-actions .button-author-report--loginhint img {
    width: 20px;
    height: 20px;
    opacity: .8;
}

.author-report-actions .button-author-report__text {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-color);
}

/* ===== Titre section annonces ===== */
.author-general-container .other-container > h2 {
    margin: 0 0 .75rem 0 !important;
    color: var(--text-color);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .02em;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--general-line);
}

/* ===== Liste annonces ===== */
.author-general-container .annonces-list {
    max-width: 100%;
    width: 100%;
}

/* ===== Carte annonce ===== */
.author-general-container .annonce-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-areas: "image content";
    grid-template-rows: auto !important;
    grid-auto-rows: auto !important;
    row-gap: 0 !important;
    column-gap: 1rem;
    gap: 1rem;
    background-color: var(--bg-post-container);
    color: var(--text-color);
    border-radius: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, .05);
    padding: 1rem;
    transition: transform .2s, box-shadow .2s;
    align-items: start;
}

.author-general-container .annonce-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(0, 0, 0, .12);
}

.author-general-container .annonce-content h2,
.author-general-container .annonce-content p {
    margin: 0;
}

.author-general-container .annonce-image-wrap {
    grid-area: image;
    width: 250px;
    height: 250px;
    overflow: hidden;
    border-radius: .8rem;
}

.author-general-container .annonce-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-general-container .annonce-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
}

.author-general-container .annonce-content .annonce-date {
    margin-top: 20px;
    font-size: .875rem;
    opacity: .85;
}

.author-general-container .annonce-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .35rem;
    align-items: center;
}

.author-general-container .annonce-tags-inline .tag {
    border-radius: 1rem;
    padding: .25rem .6rem;
    font-size: .875rem;
    font-weight: 700;
}

/* ===== Bloc boutons notation sans fond parasite ===== */
.author-rating-actions-block {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: .75rem;
    border-radius: 0 !important;
}

.author-rating-actions-block .author-rating-display {
    display: block;
    text-align: left;
}

.author-rating-actions-block .rating-actions-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: .5rem;
    margin-top: .5rem;
}

.author-rating-actions-block .rating-actions-compact .button-style {
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .detail-page .pub-left,
    .detail-page .pub-right {
        display: none;
    }

    .author-general-container .annonce-item {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "content";
    }

    .author-general-container .other-container .annonce-title {
        margin-top: 5px;
    }

    .author-general-container .annonce-image-wrap {
        width: 100%;
        height: auto;
    }

    .author-general-container .annonce-image {
        width: 100%;
        height: auto;
    }

    .author-rating-actions-block .rating-actions-compact {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
    }

    .author-rating-actions-block .rating-actions-compact .button-style {
        width: 100%;
        max-width: 100%;
    }

    .author-report-actions {
        margin-top: 0;
    }

    .author-report-actions .button-author-report--loginhint {
        max-width: min(220px, calc(100vw - 3rem));
        padding: 0 .65rem;
    }

    .author-report-actions .button-author-report__text {
        font-size: .8rem;
    }
}

/* =========================
   Profil public : badges + description
   ========================= */

.author-profile-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, auto) minmax(160px, 1fr);
    grid-template-areas: "badges author report";
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.author-profile-grid > .author-meta {
    grid-area: author;
    justify-self: center;
    width: 100%;
    max-width: 360px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-identity-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .85rem;
    width: 100%;
    min-width: 0;
}

.author-identity-row .avatar {
    flex: 0 0 86px;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.author-identity-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    text-align: left;
}

.author-identity-text .nickname {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.author-badges-side {
    grid-area: badges;
    justify-self: start;
    align-self: center;
    width: 100%;
    max-width: 360px;
    min-width: 0;
}

.author-profile-grid > .author-report-actions {
    grid-area: report;
    position: static;
    justify-self: end;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 2;
}

/* Le container peut accueillir environ 15 badges */
.author-badges-side .user-badges-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    row-gap: .25rem;
    column-gap: 0;
    padding: .45rem .25rem;
    min-height: 180px;
    max-width: 100%;
}

/* Badges page publique auteur : 80px */
.author-badges-side .user-badge-img {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    object-fit: contain;
    margin-right: -18px;
    margin-bottom: -4px;
    position: relative;
    filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .18));
}

/* Alternance de profondeur pour l’effet chevauché */
.author-badges-side .user-badge-img:nth-child(odd) {
    z-index: 2;
}

.author-badges-side .user-badge-img:nth-child(even) {
    z-index: 1;
}

.author-badges-side .user-badge-img:hover {
    transform: scale(1.14) rotate(0deg) !important;
    z-index: 20;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, .26));
}

/* Rotations légères “aléatoires” */
.author-badges-side .user-badge-img--1 { transform: rotate(-11deg) translateY(3px); }
.author-badges-side .user-badge-img--2 { transform: rotate(7deg) translateY(-4px); }
.author-badges-side .user-badge-img--3 { transform: rotate(-4deg) translateY(6px); }
.author-badges-side .user-badge-img--4 { transform: rotate(12deg) translateY(1px); }
.author-badges-side .user-badge-img--5 { transform: rotate(-8deg) translateY(-3px); }
.author-badges-side .user-badge-img--6 { transform: rotate(4deg) translateY(5px); }
.author-badges-side .user-badge-img--7 { transform: rotate(-14deg) translateY(2px); }
.author-badges-side .user-badge-img--0 { transform: rotate(9deg) translateY(-5px); }

.author-badges-side .user-badges-empty {
    color: var(--text-color);
    text-align: center;
    opacity: .75;
    margin: 0;
    padding: .75rem;
}

/* Description sous les 3 zones : badges / auteur / signalement */
/* Description sous les 3 zones : badges / auteur / signalement */
.author-public-description-card {
    width: 100%;
    max-width: none;
    margin: 1rem 0 0;
    padding: 1rem;
    border-radius: .8rem;
    background: var(--bg-post-subcontainer);
    color: var(--text-color);
    box-sizing: border-box;
}

.author-public-description-title {
    margin: 0 0 .75rem 0;
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: .02em;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--general-line);
}

.author-public-description {
    margin: 0 auto;
    color: var(--text-color);
    font-size: .95rem;
    line-height: 1.55;
    text-align: center;
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* Responsive page auteur */
@media (max-width: 768px) {
    .author-profile-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "report"
            "author"
            "badges";
        align-items: center;
        gap: .85rem;
    }

    .author-profile-grid > .author-report-actions {
        justify-self: end;
        align-self: start;
        width: auto;
    }

    .author-report-actions .button-author-report--loginhint {
        width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        border-radius: 999px;
    }

    .author-report-actions .button-author-report__text {
        display: none;
    }

    .author-report-actions .button-author-report--loginhint img {
        width: 22px;
        height: 22px;
    }

    .author-profile-grid > .author-meta {
        justify-self: center;
        width: 100%;
        max-width: 100%;
    }

    .author-identity-row {
        justify-content: center;
    }

    .author-identity-row .avatar {
        flex-basis: 72px;
        width: 72px;
        height: 72px;
    }

    .author-identity-text {
        align-items: flex-start;
        text-align: left;
    }

    .author-rating-actions-block .author-rating-display {
        text-align: center;
    }

    .author-rating-actions-block .rating-actions-compact {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .author-rating-actions-block .rating-actions-compact .button-style {
        width: fit-content;
        max-width: 100%;
        text-align: center;
    }

    .author-badges-side {
        justify-self: center;
        max-width: 100%;
        width: 100%;
    }

    .author-badges-side .user-badges-cloud {
        justify-content: center;
        min-height: auto;
        padding: .75rem .25rem;
    }

    .author-badges-side .user-badge-img {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        margin-right: -14px;
    }

    .author-public-description-card {
        margin-top: .75rem;
        padding: .85rem;
    }

    .author-public-description-title {
        font-size: 1rem;
    }

    .author-public-description {
        text-align: center;
        max-width: 100%;
    }
}