/* ============================================
   📱 AUTEUR-MOBILE.CSS
   Responsive pour la page Auteur (auteur.html)
   Mobile-first, puis tablette
   ============================================ */

/* ===== MOBILE ≤ 768px ===== */
@media (max-width: 500px) and (pointer: coarse),
       (pointer: coarse) and (max-height: 600px) and (orientation: landscape) {

    .hero-left {
        max-width: 100%;
        padding: 0;
    }

    /* En-tête auteur */
    .author-header {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    /* L'image ne s'aligne qu'avec le nom francais (pas tout le bloc texte) :
       nom arabe et badge du'a passent en dessous, pleine largeur. display:contents
       sort les enfants de .author-identity-text de leur flex-column pour qu'ils
       deviennent des items directs de la grille .author-identity. */
    .author-identity {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 4px;
        align-items: center;
    }

    .author-identity-text {
        display: contents;
    }

    .author-image-nom-arabe {
        grid-column: 1;
        grid-row: 1;
        width: 64px;
        height: 64px;
    }

    .author-name {
        grid-column: 2;
        grid-row: 1;
        font-size: 1.8rem;
        text-align: left;
        margin: 0;
    }

    .author-arabic-name {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
    }

    /* Specificite egale a la regle desktop .author-identity-text .author-arabic-name
       (text-align:left) dans auteur-style.css — necessaire pour la surcharger ici. */
    .author-identity-text .author-arabic-name {
        text-align: right;
    }

    .author-dua-badge {
        grid-column: 1 / -1;
        grid-row: 3;
        align-self: start;
        justify-self: end;
        margin: 10px 0 0 0;
    }

    .author-dates {
        font-size: 0.95rem;
    }

    /* Section titre */
    .section-title {
        font-size: 1.4rem;
        gap: 8px;
    }

    .section-title svg {
        width: 22px;
        height: 22px;
    }

    /* Biographie */
    .author-bio {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Grille de livres */
    .author-books {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

    .book-card-info {
        padding: 10px;
    }

    .book-card-title {
        font-size: 0.95rem;
    }

    /* Désactiver hover → active */
    .book-card:hover {
        transform: none;
    }

    .book-card:active {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    }

    /* Grille d'informations */
    .author-info-grid {
        grid-template-columns: 1fr;
    }

    /* Œuvres */
    .author-oeuvres {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .oeuvre-card {
        padding: 1rem;
    }

    .oeuvre-card h4 {
        font-size: 1.05rem;
    }

    /* Tags */
    .author-tags {
        gap: 0.5rem;
    }

    .tag {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Citations */
    .citation {
        padding: 1rem;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Références */
    .ref-section h4 {
        font-size: 1rem;
    }
}

/* ===== PETIT MOBILE ≤ 480px ===== */
@media (max-width: 480px) {

    .author-name {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .author-books {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .book-card-title {
        font-size: 0.85rem;
    }

    .book-card-info {
        padding: 8px;
    }
}

/* ===== TABLETTE 769px – 1024px ===== */
@media (min-width: 769px) and (max-width: 1024px) {

    .hero-left {
        max-width: 100%;
        padding: 0 1rem;
    }

    .author-name {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .author-books {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 20px;
    }

    .author-oeuvres {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .author-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}
