/* ============================================================
   NIC Carrefour Directory — Annuaire

   Ported from the repertoire.html prototype. Every class carries
   an annuaire- prefix: the prototype used .card, .row, .btn,
   .grid and .title, all of which the theme's global Bootstrap 4
   (functions.php:320) already owns.
============================================================ */

.annuaire {
    --annuaire-blue: #617dba;
    --annuaire-blue-deep: #47598a;
    --annuaire-ink: #333333;
    --annuaire-mist: #f3f5fa;
    --annuaire-sun: #fdf351;
    --annuaire-white: #ffffff;
    --annuaire-line: #e2e7f0;
    --annuaire-muted: #6c7385;

    --annuaire-radius: 14px;
    --annuaire-shadow: 0 1px 2px rgba(51, 51, 51, .04), 0 8px 24px rgba(71, 89, 138, .06);
    --annuaire-shadow-hover: 0 2px 4px rgba(51, 51, 51, .05), 0 14px 34px rgba(71, 89, 138, .12);

    background: var(--annuaire-mist);
    color: var(--annuaire-ink);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;

    /* Clears the theme's fixed navigation, which otherwise sits over the
       back link at the top of a category page. */
    padding: 40px 0;
}

.annuaire *,
.annuaire *::before,
.annuaire *::after {
    box-sizing: border-box;
}

.annuaire-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.annuaire a {
    color: var(--annuaire-blue);
    text-decoration: none;
}

.annuaire a:hover,
.annuaire a:focus {
    color: var(--annuaire-blue-deep);
    text-decoration: none;
}

.annuaire .annuaire-icon {
    flex: none;
}


/* ---- Masthead ---------------------------------------------- */

.annuaire-masthead {
    text-align: center;
    padding: 56px 0 12px;
}

.annuaire-sun {
    width: 46px;
    height: 46px;
    margin: 0 auto 18px;
    display: block;
}

.annuaire-eyebrow {
    font-size: 12.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--annuaire-blue);
    font-weight: 600;
    margin: 0 0 10px;
}

.annuaire h1.annuaire-title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--annuaire-ink);
}

/* The sunlight swipe under the word. isolation keeps the negative
   z-index from escaping behind the page background. */
.annuaire-accent {
    position: relative;
    white-space: nowrap;
    isolation: isolate;
}

.annuaire-accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.06em;
    height: 0.34em;
    background: var(--annuaire-sun);
    border-radius: 2px;
    z-index: -1;
}

.annuaire-lede {
    max-width: 560px;
    margin: 18px auto 0;
    color: var(--annuaire-muted);
    font-size: 17px;
}


/* ---- Search ------------------------------------------------ */

.annuaire-search {
    max-width: 560px;
    margin: 28px auto 0;
    position: relative;
}

.annuaire-search .annuaire-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--annuaire-muted);
    pointer-events: none;
}

.annuaire-search input {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    color: var(--annuaire-ink);
    padding: 15px 18px 15px 48px;
    border: 1px solid var(--annuaire-line);
    border-radius: 999px;
    background: var(--annuaire-white);
    box-shadow: var(--annuaire-shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.annuaire-search input::placeholder {
    color: var(--annuaire-muted);
    opacity: 1;
}

.annuaire-search input:focus {
    outline: none;
    border-color: var(--annuaire-blue);
    box-shadow: 0 0 0 4px rgba(97, 125, 186, .15);
}


/* ---- Category grid ----------------------------------------- */

.annuaire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 40px 0 72px;
}

.annuaire-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--annuaire-white);
    border: 1px solid var(--annuaire-line);
    border-radius: var(--annuaire-radius);
    padding: 22px;
    box-shadow: var(--annuaire-shadow);
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

/* The sunlight edge that lights up on hover. */
.annuaire-cat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--annuaire-sun);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .18s ease;
}

.annuaire-cat:hover,
.annuaire-cat:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--annuaire-shadow-hover);
    border-color: #cdd6ea;
    outline: none;
}

.annuaire-cat:hover::before,
.annuaire-cat:focus-visible::before {
    transform: scaleY(1);
}

.annuaire-cat[hidden] {
    display: none;
}

.annuaire-cat-name {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 500;
    font-size: 19px;
    line-height: 1.25;
    color: var(--annuaire-ink);
}

.annuaire-cat-count {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--annuaire-blue);
    background: var(--annuaire-mist);
    border-radius: 999px;
    padding: 5px 11px;
    white-space: nowrap;
}

.annuaire-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--annuaire-muted);
    padding: 40px 0;
}


/* ---- Category page header ---------------------------------- */

.annuaire-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--annuaire-blue);
    margin: 40px 0 0;
    transition: gap .16s ease;
}

.annuaire-back:hover {
    gap: 10px;
}

.annuaire-page-head {
    padding: 22px 0 8px;
}

.annuaire h1.annuaire-cat-title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--annuaire-ink);
}

.annuaire-cat-title-suffix {
    color: var(--annuaire-muted);
    font-weight: 400;
}

.annuaire-cat-sub {
    color: var(--annuaire-muted);
    margin: 10px 0 0;
    font-size: 16px;
}


/* ---- Business card ----------------------------------------- */

.annuaire-cards {
    padding: 26px 0 80px;
    display: grid;
    gap: 16px;
}

.annuaire-card {
    background: var(--annuaire-white);
    border: 1px solid var(--annuaire-line);
    border-radius: var(--annuaire-radius);
    padding: 26px 28px;
    box-shadow: var(--annuaire-shadow);
    transition: box-shadow .16s ease;
}

.annuaire-card:hover {
    box-shadow: var(--annuaire-shadow-hover);
}

.annuaire-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* Rounded square rather than a circle, and contain rather than cover:
   the same field holds both wide company logos and portrait photos,
   and cropping a logo to a circle eats its wordmark. */
.annuaire-avatar {
    flex: none;
    width: 62px;
    height: 62px;
    border-radius: var(--annuaire-radius);
    border: 1px solid var(--annuaire-line);
    background: var(--annuaire-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.annuaire-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    display: block;
}

.annuaire-avatar-initials {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1;
    color: var(--annuaire-blue);
    background: var(--annuaire-mist);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.annuaire-card-identity {
    min-width: 0;
}

.annuaire-card-cat {
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--annuaire-blue);
    margin: 0 0 8px;
}

.annuaire h3.annuaire-card-name {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2;
    margin: 0;
    color: var(--annuaire-ink);
}

.annuaire-card-role {
    font-size: 16px;
    color: var(--annuaire-muted);
    margin: 3px 0 0;
}

.annuaire-card-meta {
    margin: 18px 0 0;
    display: grid;
    gap: 9px;
}

.annuaire-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 15.5px;
    color: var(--annuaire-ink);
}

.annuaire-meta-row .annuaire-icon {
    color: var(--annuaire-blue);
    margin-top: 3px;
}

.annuaire-meta-row a {
    font-weight: 500;
    word-break: break-word;
}


/* ---- Buttons ----------------------------------------------- */

.annuaire-card-actions {
    margin: 22px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.annuaire .annuaire-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--annuaire-line);
    background: var(--annuaire-white);
    color: var(--annuaire-ink);
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.annuaire .annuaire-btn:hover {
    transform: translateY(-1px);
    color: var(--annuaire-ink);
}

.annuaire .annuaire-btn .annuaire-icon {
    color: var(--annuaire-blue);
}

.annuaire .annuaire-btn-primary,
.annuaire .annuaire-btn-primary:hover {
    background: var(--annuaire-blue);
    border-color: var(--annuaire-blue);
    color: #ffffff;
}

.annuaire .annuaire-btn-primary .annuaire-icon {
    color: #ffffff;
}

.annuaire .annuaire-btn-primary:hover {
    background: var(--annuaire-blue-deep);
    border-color: var(--annuaire-blue-deep);
}

.annuaire .annuaire-btn-primary.a:link{
 color: #ffffff !important;
}


/* ---- Responsive -------------------------------------------- */

@media (max-width: 640px) {
    .annuaire-masthead {
        padding: 40px 0 8px;
    }

    .annuaire-card {
        padding: 22px 20px;
    }

    .annuaire-cards,
    .annuaire-grid {
        gap: 14px;
    }

    .annuaire-card-actions .annuaire-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .annuaire-avatar {
        width: 52px;
        height: 52px;
    }

    .annuaire h3.annuaire-card-name {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .annuaire *,
    .annuaire *::before,
    .annuaire *::after {
        transition: none !important;
        animation: none !important;
    }
}
