/**
 * Theme Name: Partage
 * Template:   generatepress
 */

/* ============================================
   FICHE OBJET — single-objet.php
   ============================================ */

.fiche-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.fiche-titre { margin: 0; flex: 1; }

.badge-statut {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-statut[data-statut="disponible"]           { background: #d4edda; color: #155724; }
.badge-statut[data-statut="indisponible"]          { background: #f8d7da; color: #721c24; }
.badge-statut[data-statut="indisponible_jusquau"]  { background: #fff3cd; color: #856404; }

.fiche-categorie { font-size: 0.85rem; color: #888; margin-bottom: 24px; }

.fiche-image { margin-bottom: 24px; }
.fiche-image img { width: 100%; height: auto; border-radius: 6px; }

.fiche-section { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid #eee; }
.fiche-section:last-child { border-bottom: none; }
.fiche-section h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: #888; margin-bottom: 16px; }

.fiche-details dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; }
.fiche-details dt { font-weight: 600; color: #555; }
.fiche-details dd { margin: 0; color: #222; }

.contact-logo { max-height: 60px; width: auto; display: block; margin-bottom: 12px; }
.contact-nom { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.contact-ville { color: #888; margin-bottom: 16px; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-contact {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.btn-contact:hover { opacity: 0.85; }
.btn-email { background: #1a1a1a; color: #fff; }
.btn-tel   { background: #f0f0f0; color: #1a1a1a; }


/* ============================================
   CATALOGUE — page-catalogue.php
   ============================================ */

.catalogue-filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 32px;
}

.filtre-group { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }

.filtre-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.filtre-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}

.filtre-actions { display: flex; gap: 10px; align-items: flex-end; }

.btn-filtrer {
    padding: 9px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-filtrer:hover { opacity: 0.8; }

.btn-reset {
    padding: 9px 16px;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.btn-reset:hover { color: #1a1a1a; }

.catalogue-count { font-size: 0.85rem; color: #888; margin-bottom: 16px; }

.catalogue-liste,
.catalogue-liste li { list-style: none; margin: 0; padding: 0; }
.catalogue-liste { display: flex; flex-direction: column; gap: 2px; }

.catalogue-item-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    transition: background 0.15s;
}
.catalogue-item-link:hover { background: #f5f5f5; }

.item-image {
    flex: 0 0 140px !important;
    width: 140px !important;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
}
.item-image img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.item-image-placeholder { width: 100%; height: 100%; background: #e8e8e8; }

.item-body { flex: 1 !important; min-width: 0; }

.item-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }

.item-titre { font-size: 1.05rem; font-weight: 700; margin: 0; color: #1a1a1a; }
.item-titre-lien { color: #1a1a1a; text-decoration: none; }
.item-titre-lien:hover { text-decoration: underline; }

.item-sous-titre { font-size: 0.9rem; color: #555; margin: 0 0 4px; }
.item-categorie  { font-size: 0.8rem;  color: #999; margin: 0 0 6px; }
.item-auteur     { font-size: 0.85rem; color: #666; margin: 0; }

.catalogue-vide { color: #888; font-style: italic; padding: 40px 0; text-align: center; }


/* ============================================
   PROFIL MEMBRE — author.php
   ============================================ */

.profil-header { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; }
.profil-avatar img { max-height: 80px; width: auto; display: block; }
.profil-infos { flex: 1; min-width: 0; }
.profil-nom { font-size: 1.6rem; margin: 0 0 4px; }
.profil-localisation { color: #888; font-size: 0.9rem; margin: 0 0 12px; }
.profil-bio { color: #444; font-size: 0.95rem; margin: 0 0 16px; line-height: 1.6; }
.profil-contact { display: flex; gap: 12px; flex-wrap: wrap; }
.profil-separateur { border: none; border-top: 1px solid #eee; margin: 0 0 32px; }
.profil-objets-titre { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: #888; margin-bottom: 20px; }


/* ============================================
   ANNUAIRE — page-annuaire.php
   ============================================ */

.annuaire-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.annuaire-item-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    transition: background 0.15s;
}
.annuaire-item-link:hover { background: #f5f5f5; }

.annuaire-avatar img { display: block; flex-shrink: 0; }

.annuaire-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.annuaire-nom  { font-weight: 700; font-size: 1rem; color: #1a1a1a; }
.annuaire-localisation { font-size: 0.85rem; color: #888; }

.annuaire-objets { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.objets-dispo { font-size: 0.82rem; font-weight: 600; background: #d4edda; color: #155724; padding: 2px 8px; border-radius: 12px; }
.objets-total { font-size: 0.8rem; color: #999; }
.objets-vide  { font-size: 0.8rem; color: #ccc; font-style: italic; }


/* ============================================
   CARTE MEMBRES
   ============================================ */

#carte-membres { width: 100%; height: 600px; border-radius: 6px; overflow: hidden; margin-top: 16px; }

.carte-infobulle { display: flex; gap: 12px; align-items: flex-start; min-width: 200px; max-width: 260px; padding: 4px 2px; font-family: inherit; }
.iw-avatar { width: 40px; height: 40px; flex-shrink: 0; }
.iw-body   { display: flex; flex-direction: column; gap: 4px; }
.iw-nom    { font-size: 0.95rem; font-weight: 700; color: #1a1a1a; display: block; }
.iw-loc    { font-size: 0.82rem; color: #888; display: block; }
.iw-objets { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.iw-dispo  { font-size: 0.78rem; font-weight: 600; background: #d4edda; color: #155724; padding: 2px 7px; border-radius: 10px; }
.iw-total  { font-size: 0.78rem; color: #999; }
.iw-vide   { font-size: 0.78rem; color: #ccc; font-style: italic; }
.iw-lien   { font-size: 0.82rem; color: #1a1a1a; font-weight: 600; text-decoration: none; margin-top: 4px; display: inline-block; }
.iw-lien:hover { text-decoration: underline; }


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .item-image { width: 90px !important; flex: 0 0 90px !important; height: 70px; }
    .catalogue-filtres { flex-direction: column; }
    .filtre-group { width: 100%; }
    #carte-membres { height: 400px; }
}

@media (max-width: 480px) {
    .annuaire-objets { display: none; }
}



/* ============================================
   FORMULAIRE TOOLSET FORMS
   ============================================ */

.cred-form {
    max-width: 700px;
    margin: 0 auto;
}

.cred-form .form-group {
    margin-bottom: 20px;
}

.cred-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 6px;
}

.cred-form .form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #1a1a1a;
    background: #fff;
    box-shadow: none;
    transition: border-color 0.2s;
}

.cred-form .form-control:focus {
    border-color: #1a1a1a;
    outline: none;
    box-shadow: none;
}

/* Catégories — checkboxes */
.cred-form .wpt-form-set-checkboxes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cred-form .wpt-form-set-checkboxes li {
    margin-bottom: 6px;
}

.cred-form .wpt-form-set-children {
    list-style: none;
    padding-left: 20px;
    margin: 4px 0;
}

.cred-form .wpt-form-checkbox-label {
    font-size: 0.9rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Masquer le lien "Ajouter un nouveau" pour les catégories */
.wpt-hierarchical-taxonomy-add-new-show-hide {
    display: none !important;
}

/* Bouton submit */
.cred-form .wpt-form-submit {
    display: inline-block;
    padding: 11px 28px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 8px;
}

.cred-form .wpt-form-submit:hover {
    opacity: 0.8;
}

/* Messages d'erreur */
.cred-form .wpt-form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}



/* ============================================
   MON CATALOGUE
   ============================================ */

.mon-catalogue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.mon-catalogue-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.mon-catalogue-success {
    background: #d4edda;
    color: #155724;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.btn-action {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
}

.btn-action:hover { opacity: 0.8; }

.btn-modifier {
    background: #f0f0f0;
    color: #1a1a1a;
}

.btn-supprimer {
    background: #f8d7da;
    color: #721c24;
}



/* ============================================
   CONVENTION DE PRÊT
   ============================================ */

.convention-form {
    max-width: 700px;
}

.convention-group {
    margin-bottom: 24px;
}

.convention-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 8px;
}

.form-control-date {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #1a1a1a;
    background: #fff;
    width: 100%;
}

.convention-periode {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.convention-periode .filtre-group {
    flex: 1;
    min-width: 160px;
}

.convention-objets-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.convention-objets-liste li {
    border-bottom: 1px solid #f0f0f0;
}

.convention-objets-liste li:last-child {
    border-bottom: none;
}

.convention-objet-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #1a1a1a !important;
    transition: background 0.15s;
}

.convention-objet-label:hover {
    background: #f8f8f8;
}

.conv-objet-titre {
    font-weight: 600;
}

.conv-objet-sous {
    color: #888;
    font-size: 0.85rem;
}

.convention-option-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #444 !important;
    cursor: pointer;
}


/* Date dépassée */
.item-date-depassee {
    border-left: 3px solid #e74c3c;
}

.badge-date-depassee {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e74c3c;
    white-space: nowrap;
}

/* Toggle disponibilité */
.btn-toggle-indispo {
    background: #fff3cd;
    color: #856404;
}

.btn-toggle-dispo {
    background: #d4edda;
    color: #155724;
}

