/* Couleurs et police : valeurs provisoires, à remplacer par celles du site d'origine */
:root {
  --c-primary: #1f2d3d;
  --c-accent: #b08d57;
  --c-orange: #f58a1f;  /* placeholder : remplacer par l'orange exact du site */
  --c-bg: #ffffff;
  --c-soft: #f4f4f2;
  --radius: 6px;  /* angles légèrement arrondis */
  --c-text: #222222;
  --font: "Jost", "Futura", "Avant Garde", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
}

a { color: var(--c-primary); }
img { max-width: 100%; display: block; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem; z-index: 10; }

/* En-tête */
.site-header {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 1rem; padding: 1rem 5%;
  border-bottom: 1px solid #e5e5e5;
}
.logo img { height: 56px; width: auto; }
.site-header nav a {
  margin-left: 1.5rem; text-decoration: none; color: var(--c-primary);
  font-weight: 600; text-transform: uppercase; font-size: .9rem;
}

main { min-height: 70vh; }

.section { max-width: 1200px; margin: 0 auto; padding: 3rem 5%; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.lead { color: #666; }

/* Bandeau d'accueil : photo en parallaxe avec voile brun */
.hero {
  position: relative; overflow: hidden; min-height: 480px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: #3d2a0a; color: #fff; padding: 5rem 5%; text-align: center;
  --py: 0px;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(60, 38, 15, .45); z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
/* Photo de fond (élément réel, son chemin est résolu depuis la page) */
.hero-fond {
  position: absolute; left: 0; right: 0; top: -15%; height: 130%;
  background: url('img/hero.webp') center / cover no-repeat;
  transform: translateY(var(--py)); z-index: 0;
}
.hero h1 {
  max-width: 900px; margin: 0 auto 2rem;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem); font-weight: 700;
  text-transform: uppercase; line-height: 1.35;
}
.hero .btn { background: var(--c-orange); color: #fff; font-weight: 700; text-transform: none; padding: .9rem 2rem; }

/* Glisser-déposer des annonces (admin) */
.poignee { cursor: grab; color: #999; font-size: 1.1rem; user-select: none; margin-right: .3rem; }
.poignee:active { cursor: grabbing; }
.ligne-fantome { background: #fff3e0; }

/* Choix de la photo de fond (admin) */
.fonds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.fond-choix { border: 2px solid #ddd; padding: .5rem; cursor: pointer; display: flex; flex-direction: column; gap: .4rem; }
.fond-choix:has(input:checked) { border-color: var(--c-orange); }
.fond-choix input { align-self: flex-start; }
.fond-choix img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.fond-choix span { font-size: .9rem; }

.fonds-vignette { border: 0; padding: 0; margin: 1rem 0; }
.fonds-vignette legend { font-weight: 600; margin-bottom: .5rem; }
.fonds-vignette .fond-choix { margin-bottom: .5rem; }
.fond-aucun { font-size: .9rem; }

/* Boutons */
.btn {
  display: inline-block; background: var(--c-primary); color: #fff;
  padding: .7rem 1.4rem; text-decoration: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; border-radius: var(--radius);
}
.btn-outline { background: transparent; color: var(--c-primary); border: 1px solid var(--c-primary); }

/* Cartes */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.card { border: 2px solid var(--c-orange); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-orange); }
.card-media > img:not(.card-logo) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-tint {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(245, 138, 31, .35), rgba(245, 138, 31, .85));
}
.card-logo {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%);
  width: 34%; max-width: 130px; height: auto;
}
.labels {
  position: absolute; top: .75rem; left: .75rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: .4rem;
}
.pill {
  background: var(--c-orange); color: #fff; font-size: .8rem; font-weight: 600;
  padding: .3rem .9rem; border-radius: 999px;
}
.card-body { padding: 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.05rem; text-transform: uppercase; color: var(--c-orange); font-weight: 700; }
.card h3 a { text-decoration: none; color: inherit; }
.card-surface { margin: 0; color: var(--c-primary); font-weight: 600; }
.more {
  margin-top: auto; color: var(--c-accent); text-transform: uppercase;
  font-size: .85rem; text-decoration: none;
}
.meta { color: #666; margin: 0; }
.price { font-weight: 700; color: var(--c-orange); margin: 0; }
.tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-accent); font-weight: 700; }

/* Filtres */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filters a { padding: .4rem 1rem; border: 1px solid var(--c-primary); text-decoration: none; }
.filters a.active { background: var(--c-primary); color: #fff; }

/* Fiche détaillée */
.detail-photo { width: 100%; max-height: 480px; object-fit: cover; margin: 1.5rem 0; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.description { white-space: pre-line; }
.facts { background: var(--c-soft); padding: 1.5rem; }

/* Contact */
.contact { background: var(--c-soft); text-align: center; padding: 3rem 5%; }
.big { font-size: 1.4rem; font-weight: 700; }

/* Pied de page */
.site-footer {
  border-top: 1px solid #e5e5e5; padding: 2rem 5%;
  font-size: .9rem; color: #666; text-align: center;
}

/* Messages */
.flashes { max-width: 1200px; margin: 1rem auto; padding: 0 5%; }
.flashes p { background: var(--c-soft); padding: .75rem 1rem; border-left: 4px solid var(--c-accent); }

/* Administration */
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.admin-table th, .admin-table td {
  text-align: left; padding: .6rem; border-bottom: 1px solid #e5e5e5; vertical-align: top;
}
.link-danger { background: none; border: 0; color: #b00020; cursor: pointer; padding: 0; font: inherit; }

.admin-form label { display: block; margin-bottom: 1rem; font-weight: 600; }
.admin-form input, .admin-form select, .admin-form textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .6rem;
  font: inherit; font-weight: 400; border: 1px solid #ccc;
}
.admin-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-form .check { font-weight: 400; display: flex; gap: .5rem; align-items: center; }
.admin-form .check input { width: auto; margin: 0; }
.form-actions { display: flex; gap: 1.5rem; align-items: center; }

@media (max-width: 768px) {
  .detail-grid, .admin-form .row { grid-template-columns: 1fr; }
  .site-header nav a { margin: 0 .75rem 0 0; }
}

/* Vendu */
.vendu-ribbon {
  position: absolute; left: -15%; right: -15%; top: 42%; z-index: 2;
  transform: rotate(-14deg); background: #e30613; color: #fff;
  text-align: center; font-weight: 800; font-size: 1.6rem; letter-spacing: .15em;
  text-transform: uppercase; padding: .35rem 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.vendu-badge {
  display: inline-block; background: #e30613; color: #fff;
  font-weight: 700; text-transform: uppercase; padding: .25rem .8rem;
}
.link-toggle {
  background: none; border: 0; color: var(--c-primary); cursor: pointer;
  padding: 0; font: inherit; text-decoration: underline;
}

/* En-tête : menu en couleur d'accent */
.site-header nav a { color: #b8610a; }

/* Fiche annonce */
.fiche { max-width: 1200px; margin: 0 auto; padding: 2rem 5% 3rem; }
.fiche-titre {
  text-align: center; color: var(--c-orange); text-transform: uppercase;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem); margin: 1rem 0 2rem;
}
.fiche-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.fiche-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-orange); }
.fiche-media > img:not(.card-logo) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fiche-infos h2 { font-size: 1.2rem; margin: 0 0 .75rem; color: #222; }
.fiche-sous { font-weight: 700; margin: .25rem 0; color: #222; }
.fiche-texte { font-size: .95rem; color: #333; }
.fiche-texte p { margin: .6rem 0; }
.fiche-texte ul { padding-left: 1.2rem; margin: .6rem 0; }
.fiche-infos h4 { margin: 1.5rem 0 .3rem; font-size: .95rem; color: #222; }
.btn-demande {
  display: inline-block; margin-top: 1.5rem; background: var(--c-orange); color: #fff;
  font-weight: 700; text-transform: uppercase; padding: .8rem 1.4rem; text-decoration: none;
}

/* Pied de page beige */
.site-footer { background: #fff1e3; text-align: center; color: #222; }
.site-footer img { height: 56px; width: auto; margin: 0 auto .5rem; }
.site-footer .copy a { color: var(--c-orange); font-weight: 700; text-decoration: none; }

@media (max-width: 768px) {
  .fiche-grid { grid-template-columns: 1fr; }
}

/* Types de bien (cases à cocher) */
.types { border: 1px solid #ccc; padding: .75rem 1rem; margin: 0 0 1rem; }
.types legend { font-weight: 600; padding: 0 .3rem; }
.types p { margin: .5rem 0 0; font-size: .9rem; }

/* Bloc contact : carte, texte, adresse et formulaire */
.contact { background: #fff; padding: 0 0 3rem; text-align: left; }
.contact-map { display: block; width: 100%; height: 300px; border: 0; }
.contact-inner { max-width: 900px; margin: 0 auto; padding: 0 5%; }
.contact h2 {
  text-align: center; color: #b8610a; font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  margin: 2.5rem 0 1.5rem; font-weight: 700;
}
.contact-agence { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.contact-agence img { height: 64px; width: auto; }
.contact-agence p { margin: 0; }
.contact-agence .orange { color: var(--c-orange); }
.contact-form label { display: block; color: #b8610a; font-weight: 600; margin-bottom: 1rem; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .6rem .8rem;
  border: 1px solid #666; font: inherit; font-weight: 400; color: #222;
}
.btn-envoyer {
  display: block; width: 100%; background: var(--c-orange); color: #fff;
  border: 0; padding: .9rem; font: inherit; font-size: 1rem; cursor: pointer;
}

/* Menu : lien de la page en cours */
.site-header nav a { padding: .4rem .6rem; }
.site-header nav a.active { color: var(--c-orange); border-bottom: 3px solid var(--c-orange); }

/* Page A propos */
.apropos { background: linear-gradient(#ffffff 0%, #fff3e6 100%); padding: 2.5rem 5% 3rem; }
.apropos-texte { max-width: 980px; margin: 0 auto; text-align: justify; }
.apropos h1 { text-align: center; font-size: clamp(2rem, 4vw, 3rem); color: #3d2a0a; margin: 0 0 1rem; }
.apropos h2 { text-align: center; color: #b8610a; font-size: clamp(1.15rem, 2.4vw, 1.6rem); margin: 0 0 1.5rem; }
.apropos p { font-weight: 600; color: #111; margin: 0 0 1rem; }
.apropos .accroche { text-align: center; color: #b8610a; font-size: clamp(1.05rem, 2.2vw, 1.4rem); font-weight: 700; margin-top: 2rem; }

.clients { text-align: center; padding: 2.5rem 5% 3rem; }
.clients h2 { font-size: clamp(2rem, 4vw, 3rem); color: #3d2a0a; margin: 0; }
.clients-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2.5rem 2rem; align-items: center; max-width: 1000px; margin: 2rem auto 0;
}
.clients-grid img { max-height: 120px; max-width: 85%; width: auto; height: auto; margin: 0 auto; object-fit: contain; }

/* Page Mentions légales */
.legal { max-width: 900px; margin: 0 auto; padding: 2.5rem 5% 3rem; }
.legal h1 { text-align: center; color: var(--c-orange); text-transform: uppercase; font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0 0 2rem; }
.legal h2 { color: #3d2a0a; font-size: 1.1rem; margin: 2rem 0 .6rem; }
.legal p { font-size: .95rem; color: #222; margin: 0 0 .8rem; text-align: justify; }
.a-completer { background: #fff1e3; color: var(--c-orange); font-weight: 700; padding: 0 .25rem; }

/* Angles légèrement arrondis : boutons, vignettes, champs */
.btn-demande, .btn-envoyer, .fiche-media, .admin-form input, .admin-form select,
.admin-form textarea, .contact-form input, .contact-form textarea, .fond-choix,
.hero .btn { border-radius: var(--radius); }

/* Animations au survol : logos clients et vignettes de biens */
.clients-grid img { transition: transform .3s ease; }
.clients-grid img:hover { transform: translateY(-4px) scale(1.05); }

.card { transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(31, 45, 61, .18); }
.card-media > img:not(.card-logo) { transition: transform .6s ease; }
.card:hover .card-media > img:not(.card-logo) { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .clients-grid img, .card, .card-media > img:not(.card-logo) { transition: none; }
  .clients-grid img:hover, .card:hover { transform: none; }
  .card:hover .card-media > img:not(.card-logo) { transform: none; }
}

/* Filtres de la page Nos biens */
.filtres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; align-items: end; margin: 1.5rem 0 .5rem; }
.filtres label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
.filtres select, .filtres input { padding: .6rem; border: 1px solid #ccc; font: inherit; font-weight: 400; background: #fff; border-radius: var(--radius); }
.filtres-actions { display: flex; gap: 1rem; align-items: center; }
.filtres-compte { color: #666; font-size: .9rem; margin: 0 0 1.5rem; }

/* Bandeau de filtres (version finale) */
.filtres {
  background: var(--c-soft); border-radius: var(--radius); border-top: 3px solid var(--c-orange);
  padding: 1.25rem 1.5rem; gap: 1rem 1.25rem; margin: 1.5rem 0 .75rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.filtres label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-primary);
}
.filtres select, .filtres input {
  width: 100%; box-sizing: border-box; padding: .65rem .8rem; border: 1px solid #d6d6d2;
  border-radius: var(--radius); font-size: .95rem; color: var(--c-text);
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f58a1f' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .8rem center;
  padding-right: 2.2rem;
}
.filtres input { background-image: none; padding-right: .8rem; }
.filtres select:focus, .filtres input:focus { outline: 2px solid var(--c-orange); outline-offset: 1px; }
.filtres-actions { grid-column: 1 / -1; justify-content: flex-end; gap: 1.25rem; padding-top: .25rem; }
.filtres-actions .btn { padding: .65rem 1.8rem; background: var(--c-orange); }
.filtres-actions a { color: var(--c-primary); font-size: .9rem; }
.filtres-compte { font-size: .9rem; margin: .5rem 0 1.5rem; }
