/* #006d77 */
section.head {
    margin: 110px 0 0 0;
}
div.head {
    width: 100%;
    height: 25vh;
    background-size: cover;
    background-position: center center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
div.head h1 {
    text-align: center;
    text-align: left;
    color: #fff;
    font-size: 3em;
    margin: 0;
    padding: 10px 50px;
    border-radius: 15px;
    text-shadow: 4px 3px 10px rgba(0, 0, 0, 1);
    position: relative;
}
div.head h1 strong {
    display: block;
    line-height: 100px;
}

main div.content {
    width: 100%;
    max-width: 1200px;
    margin: -20px auto 50px;
    background: #fff;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 9;
    padding: 40px 50px;
    position: relative;
}
h2 {
    font-size: 3em;
    text-align: center;
    color: #209551;
}

div.articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
}
div.articles div.article {
    width: 100%;
    border-radius: 7px;
    box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: pointer;
}
div.articles div.article div.image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}
div.articles div.article div.image div.img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    transition: 0.5s;
}
div.articles div.article:hover div.image div.img {
    transform: scale(1.5);
    transition: 0.5s;
}
div.articles div.article div.infos {
    width: 100%;
    height: auto;
    padding: 15px;
}
div.articles div.article div.infos p.titre {
    margin: 5px 0;
    padding: 0;
}
div.articles div.article div.infos p a {
    color:#209551;
}
div.articles div.article div.infos p.resume {
    margin: 0;
    padding: 0;
    color: rgba(0, 0, 0, 0.5);
}

article {
    margin: 30px 0;
    display: flex;
    gap: 2rem; 
    align-items: flex-start;
}
article div.article {
    flex: 3; /* 3/4 */
}
article div.article img {
    display: block;
    max-width: 50%;
    margin: 10px auto;
    padding: 5px;
    background: #fff;
    border: solid 1px rgba(0, 0, 0, 0.1);
}
article div.article p.date {
    font-size: 1.5em;
    font-weight: bold;
    color:#000;
    text-align: center;
}
article div.article p.accroche {
    display: block;
    max-width: 50%;
    margin: 0 auto;
    padding: 5px;
    background: #fff;
    text-align: center;
}

article  {
    margin: 30px 0;
    display: flex;
    gap: 2rem; 
    align-items: flex-start;
}
article div.relateds {
    flex: 1; /* 1/4 */
    width: 100%;
}
article div.relateds div.related {
    width: 100%;
    height: auto;
    overflow: hidden;
    margin: 0 0 10px 0;
    border-radius: 7px;
    box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: pointer;

}
article div.relateds div.related div.image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}
article div.relateds div.related div.image div.img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    transition: 0.5s;
}
article div.relateds:hover div.related div.image div.img {
    transform: scale(1.5);
    transition: 0.5s;
}
article div.relateds div.related div.infos {
    width: 100%;
    height: auto;
    padding: 15px;
}
article div.relateds div.related div.infos p.titre {
    margin: 5px 0;
    padding: 0;
}
article div.relateds div.related div.infos p a {
    color:#209551;
}
article div.relateds div.related div.infos p.resume {
    margin: 0;
    padding: 0;
    color: rgba(0, 0, 0, 0.5);
}

/*** ANNUAIRE ***/
.annuaire-filters {
    margin: 1.75rem 0 1.5rem;
}

.annuaire-types {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .5rem;
    margin: 0;
    border-radius: 999px;
    background: rgba(0,0,0,.02);
    overflow-x: auto;
}
.type-pill {
    border-radius: 999px;
    padding: .4rem 1.1rem;
    font-size: 0.9em;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.3;
    transition:
        background-color .15s ease,
        color .15s ease,
        border-color .15s ease,
        transform .08s ease;
}
.type-pill:hover {
    transform: translateY(-1px);
    background: rgba(0,0,0,.03);
}
.type-pill.active {
    background: var(--accent-color, #006d77);
    color: #fff;
    border-color: transparent;
}
.type-pill:focus-visible {
    outline: 2px solid var(--accent-color, #006d77);
    outline-offset: 2px;
}

.annuaire-liste {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.annuaire-letter {
    margin: 0;
    font-size: 1.5em;
    text-transform: uppercase;
    letter-spacing: .15em;
    opacity: .75;
}

.annuaire-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

/* Carte contact */

.contact {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .9rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,.05);
    box-shadow: 0 4px 12px rgba(0,0,0,.03);
    cursor: pointer;
    transition:
        transform .12s ease,
        box-shadow .12s ease,
        border-color .12s ease,
        background-color .12s ease;
}

.contact:hover,
.contact:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,.07);
    border-color: rgba(0,0,0,.08);
}

/* Logo / initiale */

.logo {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.03);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo.placeholder span {
    font-weight: 600;
    font-size: 1.2rem;
}

/* Infos contact */

.infos {
    flex: 1;
    min-width: 0;
}

.infos .nom {
    margin: 0 0 .15rem;
    font-size: 1em;
    font-weight: 600;
    color:#209551;
}

.infos .activite {
    margin: 0 0 .1rem;
    font-size: 1em;
    opacity: .9;
}

.infos .ville {
    margin: 0;
    font-size: 0.8rem;
    opacity: .7;
}

/* Message vide */

.annuaire-empty {
    margin-top: 1rem;
    padding: .9rem 1.1rem;
    border-radius: .9rem;
    background: rgba(0,0,0,.02);
    font-size: 1em;
}

div.actions {
    margin: 20px 0;
    display: flex;
    gap: 15px;
}
div.actions a {
    display: block;
    background: #fff;
    color: #209551;
    border: solid 1px #209551;
    padding: 0 15px;
    height: 40px; 
    line-height: 40px; 
    border-radius: 20px;
    text-decoration: none;
    transition: .5s;
}
div.actions a:hover {
    background: #209551;
    color: #fff;
    transition: .5s;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 640px) {
    .vl-card,
    .contact {
        padding: .85rem .9rem;
        border-radius: .9rem;
    }

    .vl-header h1 {
        font-size: 1.7rem;
    }

    .vl-header h2 {
        font-size: 1.1rem;
    }

    .annuaire-group {
        grid-template-columns: 1fr;
    }
}

a.utile {
    color:#209551;
}

.btn-retour {
    color: #209551;
    color: #333;
    text-decoration: none;
}
.btn-retour:hover {
    color: #209551;
}

div.content div.logos {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
div.content div.logos img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   FORMULAIRE ANNUAIRE – FRONT-END
   Harmonisé avec le style global du site (Merriweather)
   ============================================================ */

   .annuaire-edit.front {
    max-width: 850px;
    margin: 40px auto;
    padding: 20px;
    font-family: "Merriweather", serif;
}

.annuaire-edit.front h2 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 25px;
    color: #209551; /* même vert que hover du menu */
}

/* Messages */
.annuaire-edit.front .alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: 1em;
    line-height: 1.4;
}

.annuaire-edit.front .alert-success {
    background: #dff6e7;
    border-left: 5px solid #209551;
}

.annuaire-edit.front .alert-danger {
    background: #ffe0e0;
    border-left: 5px solid #d9534f;
}

/* Formulaire */
.annuaire-edit.front form {
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* Champs */
.annuaire-edit.front .form-group {
    margin-bottom: 20px;
}

.annuaire-edit.front .form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.95em;
}

.annuaire-edit.front input[type="text"],
.annuaire-edit.front input[type="email"],
.annuaire-edit.front textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
    font-family: "Merriweather", serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.annuaire-edit.front input:focus,
.annuaire-edit.front textarea:focus {
    border-color: #209551;
    box-shadow: 0 0 4px rgba(32,149,81,0.4);
    outline: none;
}

.annuaire-edit.front textarea {
    min-height: 100px;
    resize: vertical;
}

/* Bouton */
.annuaire-edit.front button.btn-primary {
    background: #209551;
    color: #fff;
    padding: 12px 25px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-family: "Merriweather", serif;
    display: inline-block;
    margin-top: 15px;
}

.annuaire-edit.front button.btn-primary:hover {
    background: #1a7c42;
}

/* Alignement centré du bouton */
.annuaire-edit.front form button {
    display: block;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 600px) {
    .annuaire-edit.front {
        padding: 10px;
    }

    .annuaire-edit.front form {
        padding: 15px 20px;
    }
}


/* PAGE 404 – Style personnalisé pour la mairie d'Elsenheim */

.page-404 {
    min-height: calc(100vh - 150px); /* header fixe compensé */
    padding-top: 180px; /* espace sous header */
    padding-bottom: 80px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    font-family: "Merriweather", serif;
}

.page-404 article {
    max-width: 600px;
    padding: 20px;
    display: block;
}

.page-404 h1 {
    font-size: 7rem;
    font-weight: 900;
    color: #209551;
    line-height: 1;
    margin: 0 0 10px 0;
}

.page-404 h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #111;
}

.page-404 p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
}

.page-404 .retour-accueil {
    display: inline-block;
    padding: 12px 25px;
    background: #209551;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
}

.page-404 .retour-accueil:hover {
    background: #157540;
}

@media (max-width: 900px) {
    section.head {
        margin: 60px 0 0 0;
    }

    div.articles {
        grid-template-columns: repeat(2, 1fr);
    }

    article {
        display: block;
    }

    article div.relateds {
        margin: 10px 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
    }
}
@media (max-width: 600px) {
    main div.content {
        padding: 20px;
    }
    div.articles {
        display: block;
    }
    div.articles div.article {
        margin: 10px 0;
    }

    article div.relateds {
        display: block;
    }
}
