/* =========================================================
   PROJET PYTHON — FRONT
   Réseau UJA

   Feuille de style commune aux interfaces front :
   - Modifier mon profil
   - Fiche membre
   - Annuaire

   Identité visuelle inspirée du site UJA
   ========================================================= */


/* =========================================================
   0. POLICES
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Spectral:wght@400;500;600;700&display=swap');


/* =========================================================
   1. FOND ET BASE GÉNÉRALE
   ========================================================= */

/*
 * Fond utilisé actuellement sur CCLV.
 * À terme, cette règle pourra être adaptée/supprimée
 * lorsque le site sera intégré au véritable environnement UJA.
 */

body {
    background: #f5f5f5 !important;
}


/*
 * Conteneur général du front Projet Python.
 */

.pp-front {
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 24px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: #212529;
}


/*
 * Tous les éléments contenus dans notre interface utilisent
 * le modèle de boîte border-box.
 */

.pp-front *,
.pp-front *::before,
.pp-front *::after {
    box-sizing: border-box;
}


/* =========================================================
   2. MODIFIER MON PROFIL
   ========================================================= */


/* ---------------------------------------------------------
   2.1 Carte principale
   --------------------------------------------------------- */

.pp-edit-profile {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
}


/* ---------------------------------------------------------
   2.2 Titres
   --------------------------------------------------------- */

.pp-edit-profile h1 {
    margin: 0 0 35px;
    font-family: 'Poppins', sans-serif;
    font-size: calc(1.275rem + 0.3vw);
    font-weight: 700;
    line-height: 1.2;
    color: #0071ff;
}

.pp-edit-profile h2 {
    margin: 35px 0 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0071ff;
}


/* ---------------------------------------------------------
   2.3 Séparateur
   --------------------------------------------------------- */

.pp-edit-profile hr {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #e5e5e5;
}


/* ---------------------------------------------------------
   2.4 Paragraphes
   --------------------------------------------------------- */

.pp-edit-profile p {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
}


/* ---------------------------------------------------------
   2.5 Champs du formulaire
   --------------------------------------------------------- */

.pp-profile-field {
    margin-bottom: 30px;
}

.pp-profile-field > p:first-child {
    margin: 0 0 8px;
}

.pp-profile-field > p:first-child strong {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}


/* ---------------------------------------------------------
   2.6 Messages d'information
   --------------------------------------------------------- */

.pp-profile-field em {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.5;
}


/*
 * Valeur actuellement affichée lorsqu'une modification
 * est en attente de validation.
 */

.pp-edit-profile .pp-current-value {
    display: block;
    margin-top: 2px;
    color: #0071ff !important;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
}


/*
 * Libellé "Valeur actuellement affichée".
 */

.pp-edit-profile .pp-current-value-label {
    display: block;
    margin-bottom: 2px;
    color: #6c757d !important;
    font-size: 0.875rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   2.7 Boutons
   --------------------------------------------------------- */


/*
 * Bouton principal "Enregistrer les modifications".
 */

.pp-edit-profile button[name="pp_save_profile"] {
    display: inline-block;
    padding: 12px 24px;
    border: 0;
    border-radius: 6px;
    background: #D45635;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s ease;
}

.pp-edit-profile button[name="pp_save_profile"]:hover {
    opacity: .85;
}


/*
 * Liens/boutons secondaires :
 * "Annuler la demande de modification", etc.
 */

.pp-edit-profile button[name="pp_cancel_change"],
.pp-edit-profile .button-link {
    display: inline !important;
    width: auto !important;
    margin-left: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #D45635 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.pp-edit-profile button[name="pp_cancel_change"]:hover,
.pp-edit-profile .button-link:hover {
    background: transparent !important;
    color: #D45635 !important;
    text-decoration: underline !important;
}


/* =========================================================
   3. FICHE MEMBRE
   ========================================================= */


/* ---------------------------------------------------------
   3.1 Conteneur général
   --------------------------------------------------------- */

.pp-profile {
    max-width: 900px;
    margin: 50px auto;
}


/* ---------------------------------------------------------
   3.2 Cartes
   --------------------------------------------------------- */

.pp-profile .pp-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
}


/* ---------------------------------------------------------
   3.3 En-tête : photo + identité
   --------------------------------------------------------- */

.pp-profile .pp-header {
    display: flex;
    align-items: center;
    gap: 30px;
}


/* ---------------------------------------------------------
   3.4 Photo de profil
   --------------------------------------------------------- */

.pp-profile .pp-avatar {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
}

.pp-profile .pp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/*
 * Bouton permettant d'ouvrir la photo en grand.
 */

.pp-profile .pp-avatar-button {
    display: block;
    width: 120px;
    height: 120px;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.pp-profile .pp-avatar-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ---------------------------------------------------------
   3.5 Identité
   --------------------------------------------------------- */

.pp-profile .pp-identite h1 {
    margin: 0;
    color: #0071ff;
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.pp-profile .pp-identite p {
    margin: 8px 0;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 400;
}


/* ---------------------------------------------------------
   3.6 Domaines d'activité
   --------------------------------------------------------- */


/*
 * Conteneur des badges sur la fiche membre.
 */

.pp-profile-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 25px;
}


/* ---------------------------------------------------------
   3.7 Coordonnées
   --------------------------------------------------------- */

.pp-profile .pp-card h2 {
    margin: 0 0 25px;
    color: #0071ff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.pp-profile .pp-card p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #212529;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.pp-profile .pp-card p strong {
    font-weight: 600;
}

.pp-profile .pp-card a {
    color: #0071ff;
    text-decoration: none;
}

.pp-profile .pp-card a:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   3.8 Carte OpenStreetMap
   --------------------------------------------------------- */

.pp-profile #pp-map {
    height: 300px;
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
}


/* ---------------------------------------------------------
   3.9 Agrandissement de la photo
   --------------------------------------------------------- */

.pp-photo-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .85);
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.pp-photo-modal.is-open {
    display: flex;
}

.pp-photo-modal img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.pp-photo-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}


/* ---------------------------------------------------------
   3.10 Retour vers l'annuaire
   --------------------------------------------------------- */

.pp-back-directory {
    display: inline-block;
    margin-bottom: 20px;
    color: #0071ff;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.pp-back-directory:hover {
    color: #0071ff;
    text-decoration: underline;
}


/* =========================================================
   4. ANNUAIRE
   ========================================================= */


/* ---------------------------------------------------------
   4.1 Conteneur général
   --------------------------------------------------------- */

.pp-directory {
    max-width: 900px;
    margin: 50px auto;
}


/* ---------------------------------------------------------
   4.2 Titre
   --------------------------------------------------------- */

.pp-directory h1 {
    margin: 0 0 35px;
    color: #0071ff;
    font-family: 'Poppins', sans-serif;
    font-size: calc(1.275rem + 0.3vw);
    font-weight: 700;
    line-height: 1.2;
}


/* ---------------------------------------------------------
   4.3 Liste des membres
   --------------------------------------------------------- */

.pp-directory-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* ---------------------------------------------------------
   4.4 Carte membre
   --------------------------------------------------------- */

.pp-member-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    width: 100%;
    min-height: 150px;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    border-top-left-radius: 65px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
    color: #212529;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.pp-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}


/*
 * Colonne de droite : zone cliquable vers la fiche membre.
 */

.pp-member-content {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none !important;
}

.pp-member-content:hover {
    color: inherit;
    text-decoration: none !important;
}


/* ---------------------------------------------------------
   4.5 Colonne photo
   --------------------------------------------------------- */

.pp-member-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 10px;
}


/*
 * Photo ronde.
 */

.pp-member-photo {
    width: 110px;
    height: 110px;
    overflow: hidden;
    border-radius: 50%;
    background: #f2f3f5;
}

.pp-member-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


/*
 * Initiales affichées lorsqu'aucune photo n'est renseignée.
 */

.pp-member-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: #0071ff;
    font-size: 30px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   4.6 Boutons de contact
   --------------------------------------------------------- */


/*
 * Groupe des trois boutons :
 * LinkedIn / e-mail / téléphone.
 */

.pp-member-social {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}


/*
 * Style commun des trois boutons.
 */

.pp-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
}


/*
 * Les trois boutons utilisent volontairement
 * la même couleur.
 */

.pp-social-linkedin,
.pp-social-email,
.pp-social-phone {
    background: #dbe5f7;
    color: #315fc4 !important;
}


/*
 * Effet au survol.
 */

.pp-social-link:hover {
    background: #cbd9f2;
    color: #315fc4 !important;
    opacity: 1;
}


/*
 * Icônes SVG.
 */

.pp-social-link svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ---------------------------------------------------------
   4.7 Informations du membre
   --------------------------------------------------------- */

.pp-member-info {
    height: 100%;
    padding: 25px 30px;
}


/*
 * Nom.
 */

.pp-member-info h2 {
    margin: 0 0 8px;
    color: #0071ff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}


/*
 * Profession, structure et autres informations textuelles.
 */

.pp-member-info p {
    margin: 4px 0;
    color: #6c757d;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
}


/*
 * Adresse professionnelle.
 * Elle est volontairement plus petite et plus claire.
 */

.pp-directory .pp-member-card .pp-member-content .pp-member-info p.pp-member-address {
    color: #999 !important;
    font-size: 0.78rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
}


/* ---------------------------------------------------------
   4.8 Domaines d'activité
   --------------------------------------------------------- */


/*
 * Conteneur des badges.
 */

.pp-member-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}


/*
 * Style commun de toutes les tuiles.
 */

.pp-activity-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 20px;
    background: rgba(0, 113, 255, .08);
    color: #0071ff;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   4.9 Couleurs des familles juridiques
   --------------------------------------------------------- */


/*
 * Droit des affaires
 */

.pp-area-business {
    background: #fff0e6;
    color: #c45b20;
}


/*
 * Droit social
 */

.pp-area-social {
    background: #e8f0ff;
    color: #315fc4;
}


/*
 * Droit immobilier
 */

.pp-area-immobilier {
    background: #e8f4ea;
    color: #397447;
}


/*
 * Droit pénal
 */

.pp-area-penal {
    background: #eeeeee;
    color: #555555;
}


/*
 * Famille et personnes
 */

.pp-area-family {
    background: #f8e8ef;
    color: #a34569;
}


/*
 * Droit public
 */

.pp-area-public {
    background: #f9e6e1;
    color: #D45635;
}


/*
 * Droit fiscal
 */

.pp-area-fiscal {
    background: #eee8f8;
    color: #7250a3;
}


/*
 * Droit international
 */

.pp-area-international {
    background: #e7f4f5;
    color: #28777d;
}


/*
 * Numérique et propriété intellectuelle
 */

.pp-area-digital {
    background: #e9e9f8;
    color: #4d4da3;
}


/*
 * Procédure et règlement des différends
 */

.pp-area-procedure {
    background: #f2eee6;
    color: #806b45;
}


/*
 * Domaine non encore classé.
 */

.pp-area-default {
    background: #f1f1f1;
    color: #666666;
}


/* =========================================================
   5. RESPONSIVE — MOBILE
   ========================================================= */


/* ---------------------------------------------------------
   5.1 Modifier mon profil
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .pp-front {
        margin: 25px auto;
        padding: 0 15px;
    }

    .pp-edit-profile {
        padding: 25px 20px;
    }

    .pp-edit-profile h1 {
        font-size: 30px;
    }

    .pp-edit-profile h2 {
        font-size: 19px;
    }
}


/* ---------------------------------------------------------
   5.2 Fiche membre
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .pp-profile {
        margin: 25px auto;
    }

    .pp-profile .pp-card {
        padding: 25px 20px;
    }

    .pp-profile .pp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .pp-profile .pp-identite h1 {
        font-size: 28px;
    }

    .pp-profile .pp-avatar,
    .pp-profile .pp-avatar-button {
        width: 100px;
        height: 100px;
    }
}


/* ---------------------------------------------------------
   5.3 Annuaire
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .pp-directory {
        margin: 25px auto;
    }

    .pp-member-card {
        grid-template-columns: 100px 1fr;
        min-height: 120px;
        border-top-left-radius: 50px;
    }

    .pp-member-sidebar {
        padding-top: 10px;
    }

    .pp-member-photo {
        width: 80px;
        height: 80px;
    }

    .pp-member-social {
        gap: 4px;
        margin-top: 6px;
    }

    .pp-social-link {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .pp-member-info {
        padding: 18px 15px;
    }

    .pp-member-info h2 {
        font-size: 1.05rem;
    }
}