/*
Theme Name: GeneratePress Child
Theme URI: https://wp.yab.ch/
Author: Ton Nom
Author URI: https://wp.yab.ch/
Description: Thème enfant basé sur GeneratePress pour Genève-archi.
Version: 1.0
Template: generatepress
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress-child
*/

/* Assurer que la page occupe toute la hauteur et que les côtés restent gris */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

body {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* <-- Change ici, remplace "center" par "stretch" */
}

#page, .site, .wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Conteneur principal qui prend toute la hauteur et est centré */
#page, .site, .wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 90%;
    max-width: 1400px;
    background-color: #fff; /* Assurer que tout reste blanc */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); /* Léger effet pour démarquer */
    flex-grow: 1; /* Remplit l'espace disponible */
}

/* Assurer que le contenu pousse bien le footer en bas */
#content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #fff; /* Assure le blanc partout */
}

/* Fixer le footer toujours en bas et aligné */
footer {
    width: 100%;
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa; /* Fond gris du footer */
    border-top: 1px solid #ddd;
}

/* Assurer que l'en-tête a la même largeur et le même style que le contenu */
.site-header {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto; /* Centre l'en-tête */
    background-color: #fff; /* Garde le fond blanc */
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); /* Même ombre que le contenu */
    border-radius: 8px; /* Adoucit légèrement les bords */
}

/* Styles pour la page de détail d'image */
.photo-detail-page .photo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.photo-detail-page .photo-image {
    flex: 1;
    min-width: 300px;
}

.photo-detail-page .photo-image img.detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
}

.photo-detail-page .photo-metadata {
    flex: 1;
    min-width: 300px;
}

.photo-detail-page .metadata-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.photo-detail-page .metadata-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.photo-detail-page .edit-button {
    font-size: 12px;
    margin-left: 10px;
    padding: 2px 5px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
}

.photo-detail-page .edit-form {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.photo-detail-page .edit-form input {
    width: 100%;
    padding: 5px;
    margin-bottom: 5px;
}

.photo-detail-page .save-button, 
.photo-detail-page .cancel-button {
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
}

.photo-detail-page .save-button {
    background: #0073aa;
    color: white;
    border: none;
}

.photo-detail-page .cancel-button {
    background: #f7f7f7;
    border: 1px solid #ddd;
}

.photo-detail-page .voies-list, 
.photo-detail-page .utilisation-list {
    margin: 0;
    padding-left: 20px;
}

.photo-detail-page #voies-select {
    width: 100%;
    min-height: 100px;
    margin-bottom: 10px;
}
.wiki-search-form {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    margin-bottom: 20px;
}

.wiki-search-results {
    margin: 15px 0;
}

.wiki-search-result {
    margin-bottom: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    overflow: hidden;
}

.wiki-search-result:last-child {
    margin-bottom: 0;
}

.wiki-search-result label {
    display: block;
    cursor: pointer;
    padding: 10px;
    transition: background-color 0.2s ease;
}

.wiki-search-result label:hover {
    background-color: #f0f0f0;
}

.wiki-search-result input[type="radio"] {
    vertical-align: top;
    margin-top: 10px;
}

.wiki-result-content {
    display: flex;
    align-items: flex-start;
}

.wiki-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

.wiki-result-details {
    flex: 1;
}

.wiki-result-details h4 {
    margin-top: 0;
    margin-bottom: 5px;
}

.wiki-result-details p {
    margin-top: 0;
    margin-bottom: 10px;
    color: #666;
}

.wiki-search-actions {
    margin-top: 15px;
    text-align: right;
}

.select-wiki-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.disable-wiki-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.manual-search-form {
    display: flex;
    margin-bottom: 10px;
}

.manual-search-form input[type="text"] {
    flex: 1;
    padding: 8px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.reset-wiki-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.enable-wiki-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.wiki-disabled-notice {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
    margin-bottom: 15px;
}

.wiki-blocked-notice {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
    margin-bottom: 15px;
}

.admin-controls {
    margin-bottom: 15px;
    background: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

/* Archive des voies: pleine largeur + colonnes lisibles /
.post-type-archive-voie .dataTables_wrapper { width: 100%; overflow-x: auto; }
.post-type-archive-voie table.dataTable {
width: 100% !important;
table-layout: fixed; / respecte nos largeurs de colonnes */
}

/* Retour à la ligne et césure si besoin */
.post-type-archive-voie table.dataTable th,
.post-type-archive-voie table.dataTable td {
white-space: normal;
word-break: break-word;
hyphens: auto;
}

/* Largeurs de colonnes (th + td) */
.post-type-archive-voie table.dataTable th.col-title,
.post-type-archive-voie table.dataTable td.col-title { width: 22%; }
.post-type-archive-voie table.dataTable th.col-code,
.post-type-archive-voie table.dataTable td.col-code { width: 8%; }
.post-type-archive-voie table.dataTable th.col-len,
.post-type-archive-voie table.dataTable td.col-len { width: 10%; }
.post-type-archive-voie table.dataTable th.col-addr,
.post-type-archive-voie table.dataTable td.col-addr { width: 7%; }
.post-type-archive-voie table.dataTable th.col-addrbat,
.post-type-archive-voie table.dataTable td.col-addrbat { width: 7%; }
.post-type-archive-voie table.dataTable th.col-secteurs,
.post-type-archive-voie table.dataTable td.col-secteurs { width: 35%; }
.post-type-archive-voie table.dataTable th.col-communes,
.post-type-archive-voie table.dataTable td.col-communes { width: 11%; }

/* Optionnel: forcer la zone de contenu en pleine largeur si le thème limite */
.post-type-archive-voie .wrap,
.post-type-archive-voie .container,
.post-type-archive-voie .site-main {
max-width: 100% !important;
width: 100%;
}