body {
    background-color: #f7f7f7;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

main {
    max-width: 800px;
    /*max-width: 33.33vw;*/
    margin: 40px auto;
    padding: 0 20px;
}

.table-container {
    width: 100%;
}

.table-container h2 {
    text-align: center;
    color: #a70011;
    margin-bottom: 30px;
}

.card {
    background-color: #f2f2f2;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out; /* douce transition au survol */
}

.card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
}

.card-row div {
    display: flex;
    gap: 4px;
}

a.mediator-link {
    color: inherit;           /* hérite de la couleur du texte normal */
    text-decoration: none;    /* enlève le soulignement */
    display: block;           /* rend toute la carte clickable */
}

a.mediator-link:hover {
    background-color: #f5f5f5; /* effet léger au survol */
    transform: scale(1.02);    /* zoom léger */
    border-radius: 10px;
}

a.mediator-link .label,
a.mediator-link .value {
    color: inherit;            /* texte normal */
    text-decoration: none;     /* pas de soulignement */
}


.button-enregistrer {
    background-color: #B11016;
    color: white;
    font-size: 18px;
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.button-enregistrer:hover {
    background-color: #8e0e13;
}

.adresse-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.adresse-wrapper input {
    width: 100%;
    box-sizing: border-box;
}

#suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 100%;
    max-width: 400px;
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

#suggestions li {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

#suggestions li:last-child {
    border-bottom: none;
}

#suggestions li:hover {
    background-color: #f5f5f5;
}

.form-container {
    max-width: 800px;        /* ou 900px selon la largeur voulue */
    width: 90%;              /* pour du responsive */
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.card-row.card-justify {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.card-infos {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.card-infos .label {
    font-weight: bold;
    color: #af1923;
    margin-right: 4px;
}

.delete-form {
    flex-shrink: 0;
}

.delete-button {
    background-color: white;
    border: 2px solid #af1923;
    color: #af1923;
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.delete-button:hover {
    background-color: #af1923;
    color: white;
}
.card-infos-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}


.card-infos-grid .label {
    font-weight: bold;
    color: #af1923;
}

.card-infos-grid .value {
    color: #000;
}
.card-infos-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.grid-row {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.info {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    flex: 1;
}

.label {
    font-weight: bold;
    color: #af1923;
    white-space: nowrap;
}

.value {
    word-break: break-word;
    color: #000;
}

.popup-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #af1923;
    padding: 30px 40px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-radius: 10px;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.popup-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn-confirm {
    background-color: #af1923;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}

.btn-cancel {
    background-color: #e0e0e0;
    color: black;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}
.card-wrapper {
    position: relative;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.delete-form {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.card-clickable {
    display: block;
    text-decoration: none;
    color: inherit;
    z-index: 1;
}
.card-clickable {
    display: block;
    text-decoration: none;
    color: inherit;
    z-index: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* effet sur toute la carte, pas juste sur le lien */
.card-wrapper:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
.error-bulle {
  margin-top: 4px;
  background-color: #f8d7da;
  color: #721c24;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9em;
  display: inline-block;
  border: 1px solid #f5c6cb;
}
.retour-liste {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}
.retour-liste:hover {
    background-color: #dcdcdc;
    color: #000;
}

/* Forcer l’empilement vertical pour la page liste,
   même si <main> est en flex au niveau global */
.liste-page {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Optionnel : s’assurer que le bloc du filtre prend toute la ligne */
.region-filter-block {
    flex: 0 0 auto;   /* pas d’étirement horizontal parasite */
    width: 100%;
}

#region-filter-form { margin-bottom:.75rem; width:100%; /* max-width:520px; */ }
#region-filter-form label { display:block; margin-bottom:.25rem; }
#region-input { width:100%; /* max-width:520px; */ }
#organisme-input { width: 100%; }
.table-container .actions { text-align:right; margin-bottom:20px; }

#region-filter-form input {
    width: 100%;
    max-width: 520px;
    margin-bottom: .5rem;
}

.filter-row {
    display: flex;
    gap: 20px;          /* espace horizontal entre les champs */
}

.filter-item {
    flex: 1 1 50%;      /* chaque item prend la moitié de la ligne */
    max-width: 50%;     /* limite stricte à 50% */
}

.filter-item label {
    display: block;
    margin-bottom: 4px;
}

.filter-item input {
    width: 100%;
    box-sizing: border-box;
}

.row-cp-ville {
    display: flex;
    gap: 10px; /* espace entre CP et Ville */
    margin-bottom: 1rem;
}

.field-cp {
    flex: 0 0 25%; /* 25% largeur fixe */
}

.field-ville {
    flex: 0 0 75%; /* 75% largeur fixe */
}

.field-cp input,
.field-ville input {
    width: 100%; /* pour remplir le conteneur */
    box-sizing: border-box;
}
