/* Grille */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.mp-card { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; transition: transform 0.2s; }
.mp-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Images et Badges */
.mp-card-img { height: 200px; background-size: cover; background-position: center; position: relative; }
.mp-badge { position: absolute; top: 10px; right: 10px; padding: 5px 10px; color: #fff; font-weight: bold; border-radius: 4px; font-size: 0.8em; }
.mp-badge.status-active { background: #e74c3c; } /* Rouge */
.mp-badge.status-found { background: #27ae60; } /* Vert */
.mp-badge.status-stopped { background: #7f8c8d; } /* Gris */

/* Corps de la carte */
.mp-card-body { padding: 15px; }
.mp-card-body h3 { margin: 0 0 10px; font-size: 1.1em; }
.mp-location { color: #666; font-size: 0.9em; margin-bottom: 15px; }
.mp-btn { display: block; width: 100%; text-align: center; background: #333; color: #fff; padding: 10px 0; text-decoration: none; border-radius: 4px; }
.mp-btn:hover { background: #555; }

/* Bannière Alerte */
.mp-banner-alert { background: #e74c3c; color: white; padding: 20px; border-radius: 8px; margin-bottom: 30px; }
.mp-banner-grid { display: flex; gap: 20px; margin-top: 15px; overflow-x: auto; }
.mp-banner-item { display: flex; gap: 10px; background: rgba(255,255,255,0.1); padding: 10px; border-radius: 5px; min-width: 250px; align-items: center;}
.mp-banner-item img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.mp-banner-item a { color: white; text-decoration: underline; }

/* Recherche */
.mp-search-container { margin-bottom: 30px; background: #f4f4f4; padding: 20px; border-radius: 8px; }
.mp-search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.mp-search-form input { flex: 1; padding: 10px; }
.mp-search-form button { padding: 10px 20px; background: #0073aa; color: white; border: none; cursor: pointer; }

/* --- STYLES FICHE UNIQUE (SINGLE) - STYLE CARTE FLOTTANTE --- */

/* --- STYLES FICHE UNIQUE (SINGLE) - THÈME MISSING / DOSSIER --- */

/* CORRECTION DE CONFLIT DE THÈME (Pas de changement) */
.mp-single-content, .mp-single-content .site-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* CARTE PRINCIPALE (L'Affiche/Le Dossier) */
.mp-stylish-card {
    max-width: 1000px !important;
    margin: 50px auto !important; /* Marge un peu plus grande */
    background: #fdfdfd; /* Fond blanc cassé/papier */
    border-radius: 0; /* Bords carrés pour un look "document" */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Ombre légère pour effet de papier */
    border: 3px solid #1c1c1c; /* Cadre noir marqué */
    padding: 30px;
    font-family: 'Times New Roman', serif; /* Police à empattement (Serif) */
    line-height: 1.5;
}

/* Séparateur (Ligne de Dossier) */
.mp-separator {
    border: 0;
    height: 1px;
    background-color: #bbbbbb; /* Ligne plus foncée */
    margin: 25px 0;
    border-top: 1px dashed #666; /* Ligne en pointillé/déchirée */
}

/* ------------------ EN-TÊTE (Photo d'Identité et Infos Clés) ------------------ */
.mp-single-profile-header {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Image (Vignette de Photo d'Identité) */
.mp-single-image-wrapper {
    flex-shrink: 0;
    width: 250px; /* Taille légèrement réduite */
    height: 300px;
    overflow: hidden;
    border-radius: 0; /* Bords carrés */
    box-shadow: none;
    border: 2px solid #555; /* Encadrement type photo */
}
.mp-single-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%); /* Effet photo ancienne/documentaire */
}

/* Nom et Statut */
.mp-person-name {
    font-size: 3.5em; /* Nom plus grand et impactant */
    margin: 0 0 10px 0;
    line-height: 1;
    color: #1c1c1c;
    font-weight: 900;
    font-family: Arial, sans-serif; /* Rendre le nom plus moderne pour l'impact */
}
.mp-single-header-status {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 0;
    margin-bottom: 25px;
    font-size: 1em;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px; /* Espacement pour l'effet "Alerte" */
    box-shadow: none;
    border: 1px solid transparent;
}
.status-active-single {
    background-color: #c0392b; /* Rouge Alerte */
    border-color: #c0392b;
}
.status-closed-single {
    background-color: #27ae60;
    border-color: #27ae60;
}

/* Grille des infos clés */
.mp-key-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Plus de place */
    gap: 20px 20px;
    padding: 15px 0;
    margin-top: 10px;
}
.mp-key-info-grid div {
    font-size: 1em;
    color: #444;
}
.mp-key-info-grid strong {
    display: block;
    font-size: 1.1em;
    color: #1c1c1c;
    margin-bottom: 3px;
    font-weight: 700;
    text-transform: uppercase; /* Titres en majuscules */
}
.mp-icon {
    display: none; /* Supprimer les icônes pour un look plus strict */
}


/* ------------------ CONTENU PRINCIPAL (Deux Colonnes) ------------------ */
.mp-single-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 30px;
}
.mp-single-info-col {
    flex: 2;
    line-height: 1.65;
    color: #333;
}
.mp-single-contact-col {
    flex: 1;
    position: sticky;
    top: 30px;
}

/* Styles des titres du contenu */
.mp-single-info-col h3 {
    font-size: 1.5em;
    color: #1c1c1c;
    border-left: none; /* Suppression de la barre bleue */
    border-bottom: 2px solid #1c1c1c; /* Soulignement noir strict */
    padding-left: 0;
    padding-bottom: 5px;
    margin-bottom: 20px;
    margin-top: 40px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mp-single-info-col h3:first-child { margin-top: 0; }

/* Styles de la description détaillée (Encadré spécial) */
.mp-description-box {
    padding: 20px;
    background: #f4f4f4; /* Fond gris légèrement ombré */
    border: 1px solid #aaa;
    border-left: 5px solid #2980b9; /* Ligne latérale Bleu/Gris de dossier */
    border-radius: 0;
    margin-bottom: 30px;
    font-style: italic; /* Style note d'enquête */
    color: #444;
}

/* Section Témoignage (La case d'alerte) */
.mp-temoignage-section {
    padding: 25px;
    background: #fff;
    border: 5px solid #e74c3c; /* Bordure Rouge très épaisse (Urgence) */
    border-radius: 0;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
}
.mp-temoignage-section h3 {
    color: #e74c3c;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 1.5em;
    text-align: center;
    text-transform: uppercase;
}
.mp-urgent-call {
    text-align: center;
    padding: 15px;
    background: #ffeded; /* Fond très clair */
    border: 1px solid #e74c3c;
    border-radius: 0;
    font-size: 1.2em;
    font-weight: 700;
}
.mp-phone-link {
    font-size: 2em;
    color: #c0392b !important;
    font-weight: 900;
    display: block;
}

/* --- Responsive pour les mobiles --- */
@media (max-width: 900px) {
    .mp-stylish-card {
        margin: 20px 10px !important;
        padding: 20px;
        border: 2px solid #1c1c1c;
    }
    .mp-single-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .mp-single-image-wrapper {
        width: 100%;
        max-width: 250px;
        height: 250px;
        margin: 0 auto 20px;
    }
    .mp-person-name {
        font-size: 2em;
    }
    .mp-single-layout {
        flex-direction: column;
    }
    .mp-single-contact-col {
        position: static;
        width: 100%;
    }
    .mp-temoignage-section {
        border: 3px solid #e74c3c;
    }
}

/* =======================================
   Styles pour la Galerie Photos (single-missing_person.php)
   ======================================= */

.mp-gallery-wrapper {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.mp-gallery-list {
    /* Supprime les puces par défaut */
    list-style: none;
    margin: 0;
    padding: 0;

    /* Mise en page en grille flexible */
    display: grid;
    gap: 10px; /* Espace entre les images */

    /* Crée des colonnes automatiques */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.mp-gallery-item {
    /* Assure que l'image remplit l'espace de la grille */
    width: 100%;
    overflow: hidden; /* Cache tout ce qui dépasse si l'image est redimensionnée */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mp-gallery-item img.mp-gallery-img {
    /* Assure que l'image couvre bien son conteneur sans déformation excessive */
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Effet de transition au survol si vous voulez un petit zoom */
    transition: transform 0.3s ease;
}

.mp-gallery-item img.mp-gallery-img:hover {
    transform: scale(1.05);
}

/* Optionnel : Ajustement pour les très grands écrans */
@media (min-width: 1200px) {
    .mp-gallery-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}
