/* ============================================================
   Châteaux Select - socle graphique
   ------------------------------------------------------------
   Palette échantillonnée directement dans la carte de visite de la cliente :
   le bleu nuit du fond, l'or moyen et l'or clair du lettrage. L'or foncé est
   le seul ajout : c'est le même or assombri pour tenir le contraste AA sur
   fond clair, où l'or de la carte tombe à 2,2 pour 1.
   Aucune police n'est chargée depuis un CDN : pile système à empattements.
   ============================================================ */

:root {
    --nuit: #21233A;
    --nuit-profond: #191B2C;
    --or: #C3A968;
    --or-clair: #DDC37D;
    --or-fonce: #7A5F22;
    --parchemin: #F4F1E9;
    --papier: #FBFAF6;
    --encre: #21233A;
    --gris: #55576A;
    --clair: #CFD0D9;
    --alerte: #8A3B12;
    --alerte-fond: #FBF2EC;
    --filet: rgba(33, 35, 58, 0.16);
    --filet-or: rgba(195, 169, 104, 0.34);
    --focus: var(--or-fonce);

    --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
    --sans: 'Avenir Next', Avenir, 'Century Gothic', 'Trebuchet MS', sans-serif;
    --marge: clamp(1.25rem, 5vw, 4rem);
    --contenu: min(1240px, 100%);
}

html {
    scroll-padding-top: clamp(100px, 10vw, 140px);
}

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

body {
    margin: 0;
    color: var(--encre);
    background: var(--papier);
    font-family: var(--serif);
    font-size: 1.02rem;
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 500;
    line-height: 1.06;
    overflow-wrap: break-word;
}

p {
    margin: 0 0 1.1rem;
}

a {
    color: inherit;
    text-decoration-color: var(--filet-or);
    text-underline-offset: 0.22em;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

/* ------------------------------------------------------------
   Utilitaires
   ------------------------------------------------------------ */

.hors-ecran {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.lien-evitement {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    color: var(--nuit);
    background: var(--or-clair);
    font-family: var(--sans);
    font-size: 0.8rem;
    transform: translate(-50%, -200%);
}

.lien-evitement:focus {
    transform: translate(-50%, 0);
}

/* Le filet or court qui précède chaque surtitre reprend celui de la carte. */
.surtitre {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 1.15rem;
    color: var(--or-clair);
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.surtitre::before {
    flex: 0 0 2.4rem;
    height: 1px;
    background: currentColor;
    content: '';
}

.surtitre-sombre {
    color: var(--or-fonce);
}

.separateur {
    display: inline-block;
    width: 1.4rem;
    height: 1px;
    margin: 0 0.2rem;
    background: currentColor;
    vertical-align: middle;
}

.note {
    color: var(--gris);
    font-family: var(--sans);
    font-size: 0.85rem;
}

.avertissement {
    padding-left: 1rem;
    border-left: 2px solid var(--or-fonce);
    color: var(--gris);
    font-family: var(--sans);
    font-size: 0.88rem;
}

.mention-forte {
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.numero {
    display: block;
    margin-bottom: 0.9rem;
    color: var(--or-fonce);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

/* ------------------------------------------------------------
   Boutons et liens d'action
   ------------------------------------------------------------ */

.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.8rem 1.6rem;
    border: 1px solid transparent;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.bouton-or {
    color: var(--nuit);
    background: var(--or-clair);
}

.bouton-or:hover {
    background: var(--or);
}

.bouton-sombre {
    color: #fff;
    background: var(--nuit);
}

.bouton-sombre:hover {
    background: var(--nuit-profond);
}

.bouton-contour {
    color: var(--encre);
    background: transparent;
    border-color: var(--filet);
}

.bouton-contour:hover {
    border-color: var(--or-fonce);
}

.lien-souligne {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--or-fonce);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
}

.lien-souligne::after {
    width: 2.2rem;
    height: 1px;
    background: currentColor;
    content: '';
    transition: width 180ms ease;
}

.lien-souligne:hover::after,
.lien-souligne:focus-visible::after {
    width: 3.2rem;
}

.lien-souligne-clair {
    color: var(--or-clair);
}

.lien-retour {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--gris);
    font-family: var(--sans);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.lien-retour::before {
    margin-right: 0.6rem;
    content: '\2190';
}

.lien-retour:hover {
    color: var(--or-fonce);
}

/* ------------------------------------------------------------
   En-tête
   ------------------------------------------------------------ */

.entete {
    position: sticky;
    z-index: 80;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: clamp(84px, 8vw, 112px);
    padding: 0.75rem var(--marge);
    color: #fff;
    /* Exactement le bleu du logo : le bloc de marque se fond dans la barre. */
    background: var(--nuit);
    border-bottom: 1px solid var(--filet-or);
    box-shadow: 0 0.45rem 1.6rem rgba(10, 12, 24, 0.2);
    --focus: var(--or-clair);
}

.marque {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
}

.marque img {
    width: auto;
    height: clamp(54px, 6vw, 76px);
}

.navigation {
    display: flex;
    align-items: center;
    gap: clamp(0.65rem, 1vw, 1.25rem);
    font-family: var(--sans);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.navigation a {
    padding: 0.55rem 0;
    border-bottom: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.navigation a:hover,
.navigation a:focus-visible {
    color: var(--or-clair);
    border-bottom-color: var(--or-clair);
}

.navigation a[aria-current='page'] {
    color: var(--or-clair);
    border-bottom-color: var(--or);
}

.navigation .lien-langue {
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.navigation .lien-langue:hover {
    color: var(--nuit);
    background: var(--or-clair);
    border-color: var(--or-clair);
}

.bouton-menu {
    display: none;
    width: 46px;
    height: 46px;
    padding: 13px 11px;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.bouton-menu span[aria-hidden] {
    display: block;
    height: 1px;
    margin-bottom: 6px;
    background: currentColor;
}

.bouton-menu span[aria-hidden]:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */

.bande {
    padding: clamp(3.5rem, 8vw, 7rem) var(--marge);
}

.bande > * {
    width: var(--contenu);
    margin-inline: auto;
}

.bande-sombre {
    color: #fff;
    background: var(--nuit);
    --focus: var(--or-clair);
}

.bande-entete {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1.6rem;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--filet);
}

.bande-sombre .bande-entete {
    border-bottom-color: var(--filet-or);
}

.bande-entete h2,
.entete-page h1,
.entete-editoriale h1 {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.entete-page {
    padding: clamp(3.5rem, 8vw, 6rem) var(--marge) clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    background: var(--nuit);
    --focus: var(--or-clair);
}

/* Un seul conteneur centre : les enfants s'alignent tous sur le meme bord
   gauche, y compris ceux qui portent une largeur de lecture reduite. */
.entete-page-interieur {
    width: var(--contenu);
    margin-inline: auto;
}

.entete-page-accroche,
.entete-editoriale-accroche {
    max-width: 46rem;
    margin-top: 1.5rem;
    color: var(--clair);
    font-size: 1.1rem;
}

.entete-editoriale-accroche {
    color: var(--gris);
}

/* Seconde phrase d'ouverture, quand la cliente en a dicte deux (Accompagnement
   international). Elle suit l'accroche, un cran plus discrete. */
.entete-editoriale-suite {
    max-width: 46rem;
    margin-top: 0.9rem;
    color: var(--gris);
    font-family: var(--sans);
    font-size: 0.95rem;
}

/* ------------------------------------------------------------
   Grille et cartes de biens
   ------------------------------------------------------------ */

.grille-biens {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.2rem, 2.4vw, 2.2rem);
}

.carte {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--filet);
    box-shadow: 0 1rem 2.5rem rgba(33, 35, 58, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.carte:hover {
    border-color: var(--or);
    box-shadow: 0 1.35rem 3rem rgba(33, 35, 58, 0.1);
    transform: translateY(-3px);
}

.carte-visuel {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: var(--nuit);
    /* Le soulignement d'un lien se propage aux descendants et ne peut pas etre
       annule plus bas : il doit etre coupe ici, sur le lien lui-meme. */
    text-decoration: none;
}

.carte-visuel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carte-etiquette {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.5rem 0.9rem;
    color: var(--or-clair);
    background: var(--nuit-profond);
    font-family: var(--sans);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.carte-corps {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: clamp(1.2rem, 2vw, 1.8rem);
}

.carte-lieu {
    margin: 0 0 0.7rem;
    color: var(--or-fonce);
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.carte-titre {
    margin: 0 0 1.1rem;
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2vw, 1.62rem);
    overflow-wrap: anywhere;
}

.carte-titre a {
    text-decoration: none;
}

.carte-titre a:hover {
    color: var(--or-fonce);
}

.carte-chiffres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    margin: 0 0 1.4rem;
    font-family: var(--sans);
    font-size: 0.85rem;
}

.carte-chiffres div {
    display: flex;
    gap: 0.45rem;
}

.carte-chiffres dt {
    color: var(--gris);
}

.carte-chiffres dd {
    margin: 0;
    font-weight: 600;
}

.carte-prix {
    padding-top: 1rem;
    margin: auto 0 0;
    border-top: 1px solid var(--filet);
    font-family: var(--serif);
    font-size: 1.45rem;
    white-space: nowrap;
}

/* Emplacement réservé aux photographies non encore fournies. */
.emplacement-photo {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    background: var(--nuit);
}

.emplacement-photo::after {
    position: absolute;
    right: 1rem;
    bottom: -0.3em;
    color: rgba(221, 195, 125, 0.07);
    font-family: var(--serif);
    font-size: clamp(4.5rem, 10vw, 8rem);
    line-height: 1;
    content: 'CS';
}

.emplacement-photo-filet {
    position: absolute;
    inset: 0.85rem;
    border: 1px solid var(--filet-or);
}

.emplacement-photo-texte {
    position: relative;
    z-index: 1;
    color: var(--or);
    font-family: var(--sans);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
}

/* Sur la fiche, l'emplacement reste une bande : sans photographie, un grand
   aplat sombre ecraserait tout le reste de la page. */
.emplacement-photo-fiche {
    aspect-ratio: 21 / 9;
    max-height: 360px;
    height: auto;
}

/* ------------------------------------------------------------
   Filtres et pagination du catalogue
   ------------------------------------------------------------ */

.filtres {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) auto;
    gap: 1.2rem;
    width: var(--contenu);
    padding: clamp(1.2rem, 2.5vw, 2rem) var(--marge);
    margin-inline: auto;
    background: var(--parchemin);
    border-bottom: 1px solid var(--filet);
}

.champ {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    margin: 0;
}

.champ label {
    color: var(--gris);
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.champ input,
.champ select,
.champ textarea {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0.7rem 0.85rem;
    background: #fff;
    border: 1px solid var(--filet);
    border-radius: 0;
    font-family: var(--sans);
    font-size: 0.95rem;
}

.champ textarea {
    resize: vertical;
}

.filtres-actions {
    display: flex;
    align-items: flex-end;
    gap: 1.2rem;
    margin: 0;
}

.filtres-actions a {
    padding-bottom: 0.85rem;
    color: var(--gris);
    font-family: var(--sans);
    font-size: 0.82rem;
}

.resultats {
    padding: clamp(2.5rem, 5vw, 4rem) var(--marge) clamp(4rem, 8vw, 7rem);
}

.resultats > * {
    width: var(--contenu);
    margin-inline: auto;
}

.resultats-compte {
    margin-bottom: 2rem;
    color: var(--gris);
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.resultats-compte strong {
    color: var(--encre);
}

.etat-vide {
    padding: clamp(2.5rem, 6vw, 5rem);
    background: var(--parchemin);
    border: 1px solid var(--filet);
    text-align: center;
}

.etat-vide-page {
    width: var(--contenu);
    margin: clamp(3rem, 8vw, 6rem) auto;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3.5rem;
    font-family: var(--sans);
    font-size: 0.8rem;
}

.pagination a {
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--filet);
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--or-fonce);
}

/* ------------------------------------------------------------
   Bloc en attente d'information de la cliente
   ------------------------------------------------------------ */

.cs-a-completer {
    padding: 1.3rem 1.6rem;
    margin: 2rem 0;
    color: var(--encre);
    background: var(--alerte-fond);
    border-left: 3px solid var(--alerte);
    font-family: var(--sans);
    font-size: 0.92rem;
}

.cs-a-completer p:last-child {
    margin-bottom: 0;
}

.cs-a-completer-etiquette {
    color: var(--alerte);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cs-a-completer-titre {
    font-weight: 600;
}

/* ------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------ */

.pied {
    padding: clamp(3rem, 6vw, 5rem) var(--marge) 2rem;
    color: var(--clair);
    background: var(--nuit-profond);
    font-family: var(--sans);
    font-size: 0.86rem;
    --focus: var(--or-clair);
}

/* Les cinq colonnes se partagent l'espace sans donner une place autonome aux
   départements : le pied de page rappelle les trois expertises nationales. La
   quatrième colonne porte l'adresse de courriel, qui est
   le mot insécable le plus large de tout le site : elle demande 204,7 px sur une
   ligne. Résultat mesuré avant correction : « contact@chateauxselect.com » se
   coupait après « .co » et renvoyait le « m » à la ligne suivante, sur toutes les
   pages, en français comme en anglais, de 1 081 à 1 354 px de fenêtre ; au-delà il
   ne restait que 1,8 px de marge, à 1 440 px comme à 1 920 px.
   La quatrième colonne n'est donc jamais plus étroite que son contenu. La place
   ainsi rendue suit la police réellement choisie par le navigateur du visiteur, et
   c'est ce qui compte ici : la pile `--sans` n'embarque aucune police web, et la
   même adresse mesure 159,8 px en Avenir Next, 181 px en Trebuchet MS et 204,7 px
   en Century Gothic, soit 28 % d'écart d'une machine à l'autre. Aucune largeur
   écrite en dur n'aurait couvert cet écart. */
.pied-grille {
    display: grid;
    grid-template-columns:
        minmax(0, 1.2fr)           /* marque */
        minmax(0, 1fr)             /* navigation */
        minmax(0, 1fr)             /* expertises */
        minmax(min-content, 1fr)   /* coordonnées : l'adresse de courriel */
        minmax(0, 1fr);            /* mentions légales */
    gap: clamp(1.8rem, 3vw, 2.6rem);
    width: var(--contenu);
    margin-inline: auto;
}

.pied-nom {
    margin: 0 0 0.6rem;
    color: #fff;
    font-family: var(--serif);
    font-size: 1.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pied-signature {
    position: relative;
    padding-top: 1rem;
    margin: 0;
    color: var(--or);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.pied-signature::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 3.5rem;
    height: 1px;
    background: var(--or);
    content: '';
}

.pied-bloc {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pied-titre {
    margin: 0 0 0.4rem;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pied-bloc a {
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* Contrepartie indispensable de la colonne des coordonnées ci-dessus : `anywhere`
   autorise la coupure après n'importe quelle lettre, et surtout il ramène la
   largeur minimale de l'adresse à UNE lettre. La grille n'avait donc aucune raison
   d'élargir la colonne, et l'adresse se coupait. `break-word` protège du même
   débordement horizontal, mais il rend à la grille la vraie largeur du mot.
   Rendre de la place, plutôt qu'embellir la coupure : `hyphens: auto` a été essayé
   et écarté à la passe précédente, Chromium n'ayant pas ici le dictionnaire de
   césure français, il coupe au même endroit et sans trait d'union. */
.pied-contact a[href^="mailto:"] {
    overflow-wrap: break-word;
}

.pied-bloc a:hover {
    color: var(--or-clair);
}

.pied-bloc address,
.pied-bloc p {
    margin: 0;
    font-style: normal;
}

/* Entrée de l'espace de gestion : présente pour la cliente, discrète pour un
   visiteur. C'est la connexion qui protège l'espace, pas le secret du lien. */
.pied-prive {
    margin-top: 0.6rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.74rem;
}

.pied-bas {
    width: var(--contenu);
    padding-top: 2rem;
    margin: 3rem auto 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.78rem;
}

/* ------------------------------------------------------------
   Adaptations
   ------------------------------------------------------------ */

@media (max-width: 1080px) {
    .grille-biens {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

/* Les huit entrées bilingues occupent davantage qu'un menu immobilier court.
   On bascule avant qu'elles ne poussent le logo hors de l'écran. */
@media (max-width: 1480px) {
    .bouton-menu {
        display: block;
    }

    .navigation {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem var(--marge) 1.5rem;
        background: var(--nuit);
        border-bottom: 1px solid var(--filet-or);
    }

    .navigation.est-ouvert {
        display: flex;
    }

    .navigation a {
        padding: 0.95rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navigation .lien-langue {
        align-self: flex-start;
        margin-top: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.4);
    }

    .bande-entete {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.4rem;
    }
}

@media (max-width: 720px) {
    .grille-biens,
    .filtres {
        grid-template-columns: minmax(0, 1fr);
    }

    .filtres-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 0.8rem;
    }

    .filtres-actions a {
        padding: 0.3rem 0;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .pied-grille {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
