/*
 Theme Name: Extra Child
 Template: extra
*/
/* =========================================================
   TROMBINOSCOPE — GRILLE RESPONSIVE INTELLIGENTE
   ========================================================= */

.trombinoscope {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 10px;
}

/* Chaque carte garde une taille fixe */
.trombinoscope .membre {
    width: 240px;
    flex-shrink: 0;
}


/* =========================================================
   POPUP OVERLAY
   ---------------------------------------------------------
   padding-top = hauteur du menu rose desktop (160px)
   ========================================================= */

.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;

    display: none;

    align-items: flex-start;
    justify-content: center;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;

    /* Desktop : padding-top = hauteur menu rose */
    padding:
        calc(160px + env(safe-area-inset-top))
        12px
        calc(30px + env(safe-area-inset-bottom));
}


/* =========================================================
   POPUP — RESPONSIVE TABLETTE (769px à 1024px)
   ---------------------------------------------------------
   Le menu rose est moins haut sur tablette,
   on réduit le padding-top en conséquence.
   ========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .popup {
        padding:
            calc(80px + env(safe-area-inset-top))
            12px
            calc(30px + env(safe-area-inset-bottom));
    }
}


/* =========================================================
   POPUP — RESPONSIVE MOBILE (max 768px)
   ---------------------------------------------------------
   Sur mobile le menu est escamoté,
   petit padding et centrage automatique.
   ========================================================= */
@media (max-width: 768px) {
    .popup {
        align-items: flex-start;
        padding:
            calc(40px + env(safe-area-inset-top))
            12px
            calc(40px + env(safe-area-inset-bottom));
    }

    .popup-content {
        margin: auto;
    }
}


/* =========================================================
   CONTENU POPUP
   ========================================================= */

.popup-content {
    background: #fff;
    border-radius: 22px;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 22px 35px;
    position: relative;
    animation: popupFade .25s ease;
    transform: translateZ(0);
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   PHOTO POPUP
   ========================================================= */

.popup-photo {
    width: 190px;
    height: 190px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto 20px;
}


/* =========================================================
   TEXTE POPUP
   ========================================================= */

.popup-content h2 {
    text-align: center;
    margin: 15px 0;
}

.popup-content p {
    text-align: justify;
    line-height: 1.65;
    overflow-wrap: break-word;
    word-break: break-word;
}


/* =========================================================
   BOUTON FERMETURE
   ========================================================= */

.close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    background: #fff;
    border-radius: 10px;
    padding: 4px 10px;
    z-index: 1000000;
}


/* =========================================================
   ACTIONS — BOUTONS CV ET LINKEDIN
   ========================================================= */

.actions {
    text-align: center;
}

.actions a {
    display: inline-block;
    margin: 14px 6px 0;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    color: #fff !important;
    transition: .25s;
}

.actions a:hover {
    transform: translateY(-2px);
}

.btn-linkedin { background: #0077b5; }
.btn-cv { background: #2c3e50; }


/* =========================================================
   IMAGES CARTES
   ========================================================= */

.trombinoscope .portrait-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}


/* =========================================================
   CENTRAGE TITRES DES CARTES
   ========================================================= */

.trombinoscope .membre h3 {
    text-align: center;
    margin-top: 15px;
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.member-name {
    display: block;
}


/* =========================================================
   FIX TEXTE INTRO DIVI MOBILE
   ========================================================= */

.et_pb_text_inner {
    white-space: normal !important;
    overflow: visible !important;
}

.et_pb_module {
    overflow: visible !important;
}


/* =========================================================
   CARTE MEMBRE — VERSION VERT D'EAU
   ========================================================= */

.trombinoscope .membre {
    background: #DFF3F1;
    border-radius: 22px;
    border: 1px solid rgba(0, 150, 136, 0.15);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .35s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.trombinoscope .membre:hover {
    background: #C7E9E6;
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   BLOC INFO RGPD
   ========================================================= */

.rgpd-info {
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #eef7f6;
    border-left: 4px solid #5bb8ad;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}


/* =========================================================
   CASE À COCHER CONSENTEMENT TROMBINOSCOPE
   ========================================================= */

#trombinoscope_consent {
    vertical-align: middle;
    margin-right: 8px;
}

#label-consent {
    vertical-align: middle;
    font-size: 14px;
    cursor: pointer;
}


/* =========================================================
   PROTECTION TEXTE ET IMAGES — CLASSE .no-copy
   ========================================================= */

.no-copy,
.no-copy * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.no-copy img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}


/* =========================================================
   BARRE DE RECHERCHE TROMBINOSCOPE
   ========================================================= */

.trombi-search-wrap {
    text-align: center;
    margin: 0 auto 30px;
    max-width: 500px;
}

#trombi-search {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #5bb8ad;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: .25s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#trombi-search:focus {
    border-color: #2c3e50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .trombi-search-wrap {
        padding: 0 12px;
    }
}