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;
}

/* ===========================
   Démarches – Layout général
   =========================== */

   :root {
    --demarches-accent: #209551;
    --demarches-border: rgba(0, 0, 0, 0.08);
    --demarches-bg-soft: rgba(0, 0, 0, 0.02);
}

/* On garde le même container principal que l’annuaire */
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;
    overflow: visible !important;
}

/* Wrapper spécifique à la page démarches (si tu as ajouté la classe) */
.demarches-page {
    font-family: "Merriweather", serif;
}

/* ===========================
   Titre & intro
   =========================== */

.demarches-page h1 {
    font-size: 2.4em;
    text-align: center;
    color: #209551;
    margin: 0 0 10px;
}

.demarches-page h1 strong {
    font-weight: 700;
}

.demarches-page .searchbar {
    margin: 20px auto 10px;
    max-width: 600px;
}

.demarches-page .searchbar input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 1em;
    font-family: inherit;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.demarches-page .searchbar input:focus {
    border-color: var(--demarches-accent);
    box-shadow: 0 0 0 2px rgba(32, 149, 81, 0.25);
    background: #fff;
}

.demarches-page .notice {
    margin: 0 auto 20px;
    max-width: 800px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #ecfeff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
    font-size: 0.95em;
}

/* ===========================
   Layout : sidebar + contenu
   =========================== */

.demarches-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start; /* Important pour que le sticky ne s'étire pas */
    position: relative;
}

/* La Sidebar collante */
.sidebar.card {
    position: -webkit-sticky; /* Pour Safari */
    position: sticky;
    top: 20px; /* Espace depuis le haut de l'écran lors du scroll */
    width: 300px; /* Largeur fixe ou adaptable */
    flex-shrink: 0;
    max-height: calc(100vh - 40px); /* Évite que la sidebar dépasse de l'écran */
    overflow-y: auto; /* Permet de scroller DANS la sidebar si elle est trop longue */
    z-index: 10;
}

/* Desktop : 2 colonnes, comme annuaire + cartes */
@media (min-width: 960px) {
    .demarches-layout {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        align-items: flex-start;
        gap: 2rem;
    }

    /* Sidebar sticky uniquement sur PC */
    .demarches-layout .sidebar.card {
        position: sticky;
        top: 130px; /* à ajuster selon la hauteur réelle de ton header */
        align-self: flex-start;
        z-index: 10; /* pour passer au-dessus du fond si besoin */
    }
}

/* ===========================
   Sidebar – Accès rapides
   =========================== */

.sidebar.card {
    background: #fafafa;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid var(--demarches-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.sidebar.card h2 {
    font-size: 1.3em;
    color: #209551;
    margin: 0 0 8px;
    text-align: left;
}

.sidebar .quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Style des puces = proche des .type-pill de l’annuaire */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9em;
    background: #fff;
    color: #000;
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.08s ease;
}

.chip:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.02);
}

.chip.chip--active {
    background: var(--demarches-accent);
    color: #fff;
    border-color: transparent;
}

/* ===========================
   Sections (details/summary)
   =========================== */

.demarches-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Chaque section = carte (comme annuaire) */
details.section {
    border-radius: 1rem;
    border: 1px solid var(--demarches-border);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

/* Summary = en-tête de carte */
details.section > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #000;
}

details.section > summary::-webkit-details-marker {
    display: none;
}

.summary-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(32, 149, 81, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.summary-subtitle {
    font-weight: 400;
    font-size: 0.85em;
    margin-left: 0.5rem;
    color: rgba(0, 0, 0, 0.6);
}

/* ===========================
   Liste des démarches
   =========================== */

.items {
    padding: 0 1.1rem 1.1rem;
}

.items ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Chaque élément ressemble aux cartes de l’annuaire */
.items li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition:
        background-color 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.08s ease,
        border-color 0.12s ease;
}

.items li:hover {
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.items li span {
    flex: 1;
    min-width: 0;
}

.items li strong {
    display: block;
    font-size: 1em;
    color: #209551;
}

.items li small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.9em;
    color: rgba(0, 0, 0, 0.65);
}

/* Bouton vers le site externe */
.items li .ext {
    align-self: center;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(32, 149, 81, 0.4);
    font-size: 0.85em;
    text-decoration: none;
    white-space: nowrap;
    color: #209551;
    background: #fff;
    transition:
        background-color 0.12s ease,
        color 0.12s ease,
        border-color 0.12s ease;
}

.items li .ext:hover {
    background: #209551;
    color: #fff;
    border-color: #209551;
}

/* ===========================
   Footer d’info
   =========================== */

.demarches-sections > .footer,
.demarches-page .footer {
    margin-top: 0.75rem;
    font-size: 0.9em;
    color: rgba(0, 0, 0, 0.6);
}

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

@media (max-width: 900px) {
    section.head {
        margin: 60px 0 0 0;
    }
}
@media (max-width: 640px) {
    main > div.content {
        padding: 25px 20px;
    }

    .demarches-page h1 {
        font-size: 2em;
    }

    .items li {
        flex-direction: column;
        align-items: flex-start;
    }

    .items li .ext {
        margin-top: 0.35rem;
        align-self: flex-start;
    }
}
