/* ---- Page collectivités ---- */

.domain-corrected-note {
    font-size: 12px;
    color: #555;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f0f4ff;
    border-radius: 4px;
    text-align: left;
}

/* Bande tricolore en haut de page */
body::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(to right, #1a2e6e 33.33%, #e8e8e8 33.33% 66.66%, #e63946 66.66%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Fond de page */
body {
    background-color: #fff;
}

/* Masquer la barre navy sur la page collectivités */
.logo_mail {
    background: transparent;
}

/* Fond de la carte */
.container {
    background: #f4f6fb;
    border: 1px solid #dde2f0;
    box-shadow: none;
}

/* Titre h1 et h2 */
h1, h2 {
    color: #1a2e6e;
}

/* Header de carte */
.container h1 {
    background: #1a2e6e;
    border-bottom: 3px solid #e63946;
    font-family: Georgia, 'Book Antiqua', Palatino, 'Palatino Linotype', serif;
}


/* Input identique à #domain dans style.css */
#commune-search {
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    box-sizing: border-box;
    background: #fff;
    border: 1.5px solid #c8d0e8;
    border-radius: 4px;
    font-size: 16px;
    color: #1a2e6e;
}

/* Bouton principal */
.decouverte,
.manual-domain-input-row button {
    background: #1a2e6e;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.manual-domain-input-row button:hover {
    background: #273678;
}

/* Zone résultat */
#result {
    background: transparent;
    border: none;
}

/* Bouton "Copier le lien de partage" */
.share-button {
    border-color: #1a2e6e;
    color: #1a2e6e;
}

.share-button:hover {
    background: #1a2e6e;
    color: #fff;
}

/* Carte résultat */
.result-card {
    background: #fff;
    border: 1px solid #dde2f0;
    border-left: 3px solid #5aafcc;
}

/* Survol des liens secondaires */
.avance-button:hover,
.info-button:hover,
.liste:hover {
    color: #e63946;
    background: transparent;
}

/* Lien "Retour à l'outil principal" */
.lien-collectivites a {
    display: block;
    text-align: center;
    margin: 12px 0 8px;
    padding: 8px;
    background: #eef1fb;
    border: 1px solid #273678;
    border-radius: 6px;
    color: #273678;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.lien-collectivites a:hover {
    background: #273678;
    color: #fff;
}

/* Footer */
footer {
    background: #f4f6fb;
    border-top: 1px solid #dde2f0;
}

/* Autocomplétion */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #c8d0e8;
    border-top: none;
    border-radius: 0 0 6px 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 260px;
    overflow-y: auto;
}

.autocomplete-list li {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autocomplete-list li:last-child {
    border-bottom: none;
}

.autocomplete-list li:hover,
.autocomplete-list li.active {
    background: #eef1f9;
    color: #1a2e6e;
}

.autocomplete-cp {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    margin-left: 8px;
}

/* Sous-titre commune + domaine au-dessus de la carte */
.commune-caption {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    text-align: center;
}

.commune-caption strong {
    color: #1a2e6e;
}

.commune-caption code {
    font-size: 12px;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 3px;
    color: #555;
}

/* Saisie manuelle domaine */
.result-domain-not-found {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    text-align: left;
}

.dnf-icon {
    color: #5aafcc;
    margin-bottom: 10px;
}

.dnf-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a2e6e;
    margin: 0 0 6px 0;
}

.dnf-sub {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
}

.dnf-hint {
    font-size: 13px;
    color: #444;
    margin: 0 0 8px 0;
}

.manual-domain-input-row {
    display: flex;
    gap: 6px;
}

.manual-domain-input-row input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #c8d0e8;
    border-radius: 4px;
    font-size: 14px;
}

/* États de chargement */
.result-loading {
    background: #f4f6fb;
    border: 1px dashed #dde2f0;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #dde2f0;
    border-top-color: #1a2e6e;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    font-style: italic;
}
