/* ==================================================
   LES CORRESPONDANCES
   ================================================== */

.correspondances-page {
    margin: 0;
    background: #eee7d9;
    color: #28251f;
}

html {
    scroll-behavior: smooth;
}


/* ==================================================
   EN-TÊTE
   ================================================== */

.correspondances-header {
    width: 100%;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;

    padding: 1.4rem clamp(1.5rem, 5vw, 5rem);

    border-bottom: 1px solid rgba(40, 37, 31, 0.2);
    background: rgba(238, 231, 217, 0.94);
}

.correspondances-header__brand {
    color: inherit;
    font-family: Georgia, "Times New Roman", serif;
    text-decoration: none;
}

.correspondances-header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.correspondances-header__nav a {
    position: relative;
    color: #5f5a50;
    text-decoration: none;
}

.correspondances-header__nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -0.4rem;
    left: 0;
    height: 1px;
    background: #28251f;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.correspondances-header__nav a:hover::after,
.correspondances-header__nav a[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* ==================================================
   INTRODUCTION
   ================================================== */

.correspondances-intro {
    position: relative;
    min-height: calc(100vh - 68px);

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding:
        clamp(5rem, 9vh, 8rem)
        clamp(1.5rem, 6vw, 6rem);

    overflow: hidden;

    background: #eee7d9;
    color: #28251f;
    text-align: center;

    isolation: isolate;
}

.correspondances-intro::before {
    content: "";

    position: absolute;
    inset: -12%;
    z-index: -1;

    background:
        url("../img/hall/rose-des-vents.svg")
        center / 100% 100%
        no-repeat;

    opacity: 0.42;

    pointer-events: none;
}

.correspondances-intro__ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.correspondances-intro__ornament span {
    width: clamp(70px, 10vw, 160px);
    height: 1px;
    background: rgba(40, 37, 31, 0.35);
}

.correspondances-intro__ornament p,
.correspondances-kicker {
    margin: 0;
    color: #736b5f;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.correspondances-intro h1 {
    max-width: 900px;
    margin: 0 auto;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(4rem, 10vw, 8.5rem);

    font-weight: 400;

    letter-spacing: -0.06em;

    line-height: .90;
}

.correspondances-intro__text {
    max-width: 760px;
    margin: 1.8rem auto 0;
    color: #4f4a42;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.75;
}

.correspondances-intro__invitation {
    max-width: 620px;
    margin: 1.4rem auto 0;
    color: #766e62;
    font-style: italic;
    line-height: 1.7;
}


/* ==================================================
   CATALOGUE
   ================================================== */

.correspondances-catalogue {
    padding:
        clamp(4rem, 7vw, 7rem)
        clamp(1.5rem, 6vw, 7rem)
        clamp(7rem, 10vw, 11rem);
    border-top: 1px solid rgba(40, 37, 31, 0.18);
    background: #f7f2e8;
}

.correspondances-catalogue__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
    max-width: 1250px;
    margin: 0 auto 5rem;
}

.correspondances-catalogue__header h2 {
    margin: 0.55rem 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 400;
}

.correspondances-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.correspondances-filters button {
    padding: 0.6rem 0.95rem;
    border: 1px solid rgba(40, 37, 31, 0.22);
    border-radius: 999px;
    background: transparent;
    color: #514c44;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.correspondances-filters button:hover,
.correspondances-filters button.is-active {
    background: #28251f;
    color: #f7f2e8;
}

.correspondances-letter {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.5rem;
    max-width: 1250px;
    margin: 5rem auto 1.5rem;
}

.correspondances-letter p {
    margin: 0;
    color: #71695c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
}

.correspondances-letter__line {
    height: 1px;
    background: rgba(40, 37, 31, 0.2);
}

.correspondances-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1250px;
    margin-inline: auto;
    border-top: 1px solid rgba(40, 37, 31, 0.18);
    border-left: 1px solid rgba(40, 37, 31, 0.18);
}

.correspondance-card {
    display: flex;
    min-height: 350px;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    border-right: 1px solid rgba(40, 37, 31, 0.18);
    border-bottom: 1px solid rgba(40, 37, 31, 0.18);
    background: rgba(255, 255, 255, 0.16);
    transition:
        background-color 0.3s ease,
        transform 0.3s ease;
}

.correspondance-card:hover {
    background: #eee5d4;
    transform: translateY(-4px);
}

.correspondance-card__number {
    margin: 0;
    color: #968c7d;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
}

.correspondance-card__body {
    margin-block: 3rem;
}

.correspondance-card__category {
    margin: 0 0 0.8rem;
    color: #6f7869;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.correspondance-card h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 400;
    line-height: 1.05;
}

.correspondance-card__details {
    margin: 1rem 0 0;
    color: #6f685e;
    font-size: 0.86rem;
}

.correspondance-card__description {
    margin: 1.5rem 0 0;
    color: #575148;
    line-height: 1.7;
}

.correspondance-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(40, 37, 31, 0.16);
    color: #28251f;
    font-size: 0.84rem;
    text-decoration: none;
}

.correspondance-card__link span {
    transition: transform 0.25s ease;
}

.correspondance-card__link:hover span {
    transform: translateX(5px);
}


/* ==================================================
   PIED DE PAGE
   ================================================== */

.correspondances-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem clamp(1.5rem, 5vw, 5rem);
    background: #28251f;
    color: #eee7d9;
}

.correspondances-footer p {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
}

.correspondances-footer a {
    color: inherit;
    text-decoration: none;
}


/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 960px) {

    .correspondances-header,
    .correspondances-catalogue__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .correspondances-filters {
        justify-content: flex-start;
    }

    .correspondances-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 640px) {

    .correspondances-header__nav {
        gap: 0.8rem 1.1rem;
    }

    .correspondances-intro {
        padding-top: 5rem;
    }

    .correspondances-intro__ornament p {
        letter-spacing: 0.12em;
    }

    .correspondances-grid {
        grid-template-columns: 1fr;
    }

    .correspondance-card {
        min-height: 320px;
    }

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

}

/* ==================================================
   CORRESPONDANCES — INTRODUCTION PLEIN ÉCRAN
   ================================================== */

.correspondances-intro {
    min-height: calc(100vh - 68px);

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding:
        clamp(5rem, 9vh, 8rem)
        clamp(1.5rem, 6vw, 6rem);

    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(184, 145, 82, 0.08),
            transparent 34%
        ),
        #eee7d9;

    color: #28251f;
    text-align: center;
}

.correspondances-intro__ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 2vw, 1.6rem);

    width: min(560px, 100%);
    margin-bottom: clamp(2rem, 4vh, 3rem);
}

.correspondances-intro__ornament span {
    width: clamp(55px, 9vw, 145px);
    height: 1px;

    background: rgba(40, 37, 31, 0.42);
}

.correspondances-intro__ornament p {
    flex-shrink: 0;
    margin: 0;

    color: rgba(40, 37, 31, 0.58);

    font-size: clamp(0.62rem, 0.75vw, 0.72rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.correspondances-intro h1 {
    max-width: 1050px;

    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4.6rem, 10vw, 9.8rem);
    font-weight: 400;
    letter-spacing: -0.06em;
    line-height: 1;
}

.correspondances-intro h1 span{
    font-size:.72em;
    vertical-align:0.18em;
}

.correspondances-intro__text {
    max-width: 760px;

    margin:
        clamp(2rem, 4vh, 3rem)
        auto 0;

    color: rgba(40, 37, 31, 0.78);

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 1.5vw, 1.32rem);
    line-height: 1.75;
}

.correspondances-intro__invitation {
    max-width: 680px;

    margin:
        clamp(1.3rem, 2.5vh, 2rem)
        auto 0;

    color: rgba(40, 37, 31, 0.56);

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.88rem, 1.05vw, 1rem);
    font-style: italic;
    line-height: 1.65;
}

/* ==================================================
   APPEL DE NAVIGATION DES HEROES
   ================================================== */

.hero-entry-link {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    gap: 0.9rem;

    margin-top: clamp(2.5rem, 5vh, 4rem);

    color: inherit;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;

    transition:
        color 300ms ease,
        transform 300ms ease;
}

.correspondances-intro .hero-entry-link {
    font-size: 1.3rem;
}

.hero-entry-link__arrow {
    color: #b88945;

    font-size: 1.25rem;
    line-height: 1;

    transition: transform 300ms ease;
}

.hero-entry-link:hover,
.hero-entry-link:focus-visible {
    color: #9a6f34;

    transform: translateY(-2px);
}

.hero-entry-link:hover .hero-entry-link__arrow,
.hero-entry-link:focus-visible .hero-entry-link__arrow {
    transform: translateY(6px);
}

.hero-entry-link:focus-visible {
    outline: 1px solid #b88945;
    outline-offset: 8px;
}

/* Cartographie — navigation et introduction mobiles */

@media (max-width: 700px) {
  .correspondances-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #eee7d9;
  }

  .correspondances-header__brand {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.3;
  }

  .correspondances-header .nav-toggle {
    color: #28251f;
    border-color: #86704a;
    justify-self: end;
  }

  .correspondances-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    padding: 12px 20px 24px;
    background: #eee7d9;
    border-bottom: 1px solid #bca580;
  }

  .correspondances-header__nav.is-open {
    display: flex;
  }

  .correspondances-header__nav a {
    padding: 18px 0;
    border-bottom: 1px solid rgba(40, 37, 31, 0.18);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-transform: uppercase;
  }

  .correspondances-header__nav a::after {
    content: none;
  }

  .correspondances-header__nav a[aria-current="page"] {
    padding-left: 16px;
    color: #80602b;
    font-weight: 600;
  }

  .correspondances-header__nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 16px;
    background: #80602b;
    transform: translateY(-50%);
  }

  .correspondances-intro {
    box-sizing: border-box;
    min-width: 0;
    min-height: calc(100svh - 76px);
    padding: 4rem 24px;
  }

  .correspondances-intro__ornament {
    max-width: 100%;
    gap: 12px;
  }

  .correspondances-intro__ornament span {
    width: 32px;
    flex-shrink: 0;
  }

  .correspondances-intro__ornament p {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
  }

  .correspondances-intro h1 {
    max-width: 100%;
    font-size: clamp(2.5rem, 11vw, 4.5rem);
    line-height: 1;
  }

  .correspondances-intro__text {
    max-width: 310px;
    font-size: 1.05rem;
    line-height: 1.7;
  }

  .correspondances-intro__invitation {
    max-width: 300px;
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .correspondances-intro__invitation br {
    display: none;
  }

  .correspondances-intro .hero-entry-link {
    max-width: 100%;
    font-size: 0.85rem;
    letter-spacing: 0.13em;
    line-height: 1.5;
    white-space: normal;
  }
}
/* Les filtres masquent aussi les lettres et les grilles devenues vides. */
.correspondances-catalogue [hidden] {
    display: none;
}

.correspondances-filter-status {
    flex-basis: 100%;
    color: #5f5a50;
    font-size: 0.9rem;
}

.correspondances-filters button:hover:not(.is-active) {
    background: #dbe6d2;
    color: #18382d;
    border-color: #326344;
}

.correspondances-filters button:focus-visible {
    outline: 2px solid #326344;
    outline-offset: 3px;
}

/* Le message de résultat reste hors de la rangée titre / filtres. */
.correspondances-catalogue__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
}

.correspondances-catalogue__header > div {
    min-width: 0;
}

.correspondances-filter-status {
    max-width: 1250px;
    margin: -3rem auto 2rem;
    line-height: 1.6;
}

.correspondances-rencontres {
    padding: clamp(4rem, 7vw, 7rem) clamp(1.5rem, 6vw, 7rem);
    border-top: 1px solid #c8bda9;
    background: #e8e1d3;
    color: #18382d;
}

.correspondances-rencontres__inner {
    max-width: 1250px;
    margin-inline: auto;
}

.correspondances-rencontres h2 {
    max-width: 850px;
    margin: 1rem 0 1.5rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    font-weight: 400;
    line-height: 1.15;
}

.correspondances-rencontres__inner > p:last-child {
    max-width: 650px;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.8;
}

@media (max-width: 1100px) {
    .correspondances-catalogue__header {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .correspondances-catalogue__header .correspondances-filters {
        justify-content: flex-start;
    }
}

/* Les métiers restent visibles ; leur sélection active la catégorie Personnes. */
.correspondances-person-filters {
    max-width: 1250px;
    margin: -3rem auto 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(40, 37, 31, 0.18);
    border-bottom: 1px solid rgba(40, 37, 31, 0.18);
}

.correspondances-person-filters .correspondances-filters {
    justify-content: flex-start;
    margin-top: 1rem;
}

.correspondances-person-filters:not([hidden]) + .correspondances-filter-status {
    margin-top: 0;
}

/* Préparer les rencontres sans les mélanger aux fiches de la cartographie. */
.correspondances-rencontres__intro {
    max-width: 650px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.rencontres-filters {
    justify-content: flex-start;
    margin-top: 2rem;
}

.correspondances-rencontres [hidden] {
    display: none;
}

.correspondances-rencontres__inner > .rencontres-status {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}
