/* =========================================================
   Diene Sport - feuille de style du site public
   Les couleurs --c1 / --c2 viennent des Réglages (admin)
   ========================================================= */
:root {
    --c1: #1d2fa8;
    --c1-dark: #18288f;
    --c2: #e3262b;
    --c2-dark: #c12025;
    --ink: #161a2e;
    --muted: #6b7088;
    --soft: #f4f6fb;
    --radius: 14px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--ink);
    background: #fff;
}

h1, h2, h3, h4, h5, h6, .navbar, .btn, .prix, .prix-big {
    font-family: 'Montserrat', 'Inter', sans-serif;
}

a { color: var(--c1); }
a:hover { color: var(--c1-dark); }

.bg-soft { background: var(--soft); }
.bg-brand { background: var(--c1) !important; }

/* ---------- Boutons ---------- */
.btn-brand { background: var(--c1); border-color: var(--c1); color: #fff; font-weight: 600; }
.btn-brand:hover, .btn-brand:focus { background: var(--c1-dark); border-color: var(--c1-dark); color: #fff; }
.btn-brand-2 { background: var(--c2); border-color: var(--c2); color: #fff; font-weight: 600; }
.btn-brand-2:hover, .btn-brand-2:focus { background: var(--c2-dark); border-color: var(--c2-dark); color: #fff; }
.btn-outline-brand { border: 2px solid var(--c1); color: var(--c1); font-weight: 600; }
.btn-outline-brand:hover { background: var(--c1); color: #fff; }

/* ---------- Barre du haut ---------- */
.topbar { background: var(--c1); color: #fff; font-size: .82rem; padding: 7px 0; line-height: 1.3; }
.topbar a, .topbar span { color: #fff; text-decoration: none; opacity: .94; display: inline-flex; align-items: center; gap: .4rem; }
.topbar a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.topbar-info { gap: 4px 1.25rem; }
.topbar .social { gap: 1rem; }
.topbar .social a { font-size: 1.05rem; transition: transform .15s; }
.topbar .social a:hover { transform: translateY(-2px); text-decoration: none; }
@media (min-width: 768px) {
    .topbar { font-size: .9rem; padding: 8px 0; }
    .topbar-info { gap: 4px 2rem; }
    /* Infos centrées ; les réseaux sociaux restent à droite sans décaler le centre */
    .topbar .social { position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); }
}

/* ---------- Navigation ---------- */
.main-nav { padding: 6px 0; }
.main-nav .navbar-brand { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.main-nav .navbar-brand img { height: 58px; width: auto; display: block; }
.main-nav .nav-link { font-weight: 600; color: var(--ink); padding: .5rem .8rem !important; border-radius: 8px; }
.main-nav .nav-link:hover { color: var(--c1); }

/* Largeur de page commune (en-tête, contenu, pied de page) : tout reste aligné,
   et le logo reste proche du bord gauche sur grand écran */
.container { max-width: 1500px; }
@media (min-width: 768px) {
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Bouton menu (mobile) : couleur de la marque, zone de toucher 44 px, croix à l'ouverture */
.main-nav .navbar-toggler {
    width: 48px; height: 44px; padding: 0;
    display: grid; place-items: center;
    border: 2px solid var(--c1); border-radius: 10px;
    color: var(--c1);
    transition: background-color .15s, box-shadow .15s;
}
/* Sur ordinateur, le menu est déjà affiché dans l'en-tête : pas de bouton */
@media (min-width: 768px) {
    .main-nav .navbar-toggler { display: none; }
    .main-nav .nav-link, .main-nav .btn-brand { white-space: nowrap; }
}
/* Écrans moyens : en-tête resserré pour que tout tienne sur une ligne */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .main-nav .navbar-brand { margin-right: .25rem; }
    .main-nav .navbar-brand img { height: 38px; }
    .main-nav .nav-link { padding-left: .4rem; padding-right: .4rem; font-size: .8rem; }
    .main-nav .btn-brand { padding: .35rem .6rem; font-size: .8rem; }
}
/* Tablette : encore plus serré, et le bouton "Toutes les annonces" (déjà dans le menu et l'accueil) est masqué */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-nav .navbar-brand img { height: 34px; }
    .main-nav .nav-link { padding-left: .3rem; padding-right: .3rem; font-size: .78rem; }
    .main-nav .navbar-nav { gap: 0 !important; }
    .main-nav .navbar-nav > li:last-child { display: none; }
}
.main-nav .navbar-toggler:hover,
.main-nav .navbar-toggler[aria-expanded="true"] { background-color: rgba(29, 47, 168, .08); }
.main-nav .navbar-toggler:focus { box-shadow: 0 0 0 .22rem rgba(29, 47, 168, .2); }
.main-nav .navbar-toggler:active { background-color: rgba(29, 47, 168, .16); }
.main-nav .navbar-toggler-icon {
    width: 24px; height: 24px;
    background-image: none; background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='black' stroke-linecap='round' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") center / 100% no-repeat;
            mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='black' stroke-linecap='round' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") center / 100% no-repeat;
}
.main-nav .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='black' stroke-linecap='round' stroke-width='3' d='M7 7l16 16M23 7L7 23'/%3e%3c/svg%3e");
            mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='black' stroke-linecap='round' stroke-width='3' d='M7 7l16 16M23 7L7 23'/%3e%3c/svg%3e");
}
.main-nav .nav-link.active { color: var(--c2); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 90px 0 70px;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(10, 18, 70, .92) 0%, rgba(29, 47, 168, .80) 55%, rgba(227, 38, 43, .55) 100%),
        var(--hero-img, linear-gradient(135deg, var(--c1), var(--c2)));
    background-size: cover;
    background-position: center;
}
.hero-title { font-size: clamp(1.9rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.12; margin-bottom: 14px; }
.hero-sub { font-size: 1.15rem; opacity: .9; margin-bottom: 34px; max-width: 620px; }

.search-box {
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.search-box .form-label { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.search-box .form-label i { color: var(--c1); font-size: .95rem; letter-spacing: 0; }

/* Barre de recherche : carte plus soignée, champs plus grands, bouton mis en avant */
.search-box {
    position: relative; overflow: visible;
    border-radius: 18px; padding: 24px 22px 22px;
    box-shadow: 0 24px 60px rgba(8, 14, 60, .35), 0 2px 0 rgba(255, 255, 255, .6) inset;
}
.search-box::before {
    content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 4px;
    background: linear-gradient(90deg, var(--c1), var(--c2)); border-radius: 0 0 6px 6px;
}
.search-box .form-select, .search-box .form-control, .search-box .cs-btn {
    min-height: 48px; border-radius: 12px; background-color: #f6f7fc; border: 1px solid #e3e6f2; font-size: .95rem;
}
.search-box .form-select:hover, .search-box .form-control:hover, .search-box .cs-btn:hover { background-color: #fff; border-color: #c5cae6; }
.search-box .form-select:focus, .search-box .form-control:focus, .search-box .cs.open .cs-btn { background-color: #fff; border-color: var(--c1); }
.search-box .btn-brand-2 {
    min-height: 48px; border-radius: 12px; font-weight: 700; letter-spacing: .01em;
    background: linear-gradient(135deg, var(--c2), var(--c2-dark)); border: 0;
    box-shadow: 0 8px 18px rgba(227, 38, 43, .35);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.search-box .btn-brand-2:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(227, 38, 43, .45); filter: brightness(1.05); }
.search-box .btn-brand-2:active { transform: none; box-shadow: 0 4px 10px rgba(227, 38, 43, .35); }
@media (max-width: 575.98px) {
    .search-box { padding: 22px 16px 16px; }
}

/* ---------- Titres de section ---------- */
.section-head { margin-bottom: 26px; }
.section-head h2 { font-weight: 800; font-size: 1.7rem; margin-bottom: 4px; }
.section-head h2::after { content: ''; display: block; width: 48px; height: 4px; background: var(--c2); border-radius: 4px; margin-top: 8px; }
.section-head p { color: var(--muted); margin: 0; }

.page-head { background: linear-gradient(115deg, var(--c1-dark), var(--c1)); color: #fff; padding: 42px 0; }
.page-head h1 { font-weight: 800; font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 4px; }
.page-head p { opacity: .85; }

/* ---------- Catégories ---------- */
.cat-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 4px; padding: 26px 12px; height: 100%;
    border-radius: var(--radius); background: #fff; border: 1px solid #e7e9f3;
    text-decoration: none; color: var(--ink); transition: .2s;
}
.cat-tile i { font-size: 2.2rem; color: var(--c1); margin-bottom: 6px; transition: .2s; }
.cat-tile .cat-name { font-weight: 700; font-family: 'Montserrat', sans-serif; }
.cat-tile .cat-count { font-size: .82rem; color: var(--muted); }
.cat-tile:hover { transform: translateY(-4px); border-color: var(--c1); box-shadow: 0 12px 30px rgba(29, 47, 168, .15); color: var(--ink); }
.cat-tile:hover i { color: var(--c2); }

/* ---------- Carte annonce ---------- */
.annonce-card { border: 1px solid #e7e9f3; border-radius: var(--radius); overflow: hidden; transition: .2s; }
.annonce-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(22, 26, 46, .12); }
.annonce-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); z-index: 2; }
.annonce-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.annonce-card:hover .annonce-img img { transform: scale(1.05); }
.badge-trans { position: absolute; top: 12px; left: 12px; background: var(--c1); color: #fff; font-size: .75rem; font-weight: 700; padding: 5px 10px; border-radius: 30px; }
.badge-trans.loc { background: #0f9d58; }
.badge-statut { position: absolute; top: 12px; right: 12px; background: var(--c2); color: #fff; font-size: .75rem; font-weight: 700; padding: 5px 10px; border-radius: 30px; }
.badge-statut.vedette { background: #f5b301; color: #2b2100; }
.annonce-card .card-title a { color: var(--ink); text-decoration: none; font-weight: 700; }
.annonce-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
.prix { color: var(--c2); font-weight: 800; font-size: 1.15rem; }

/* ---------- Pourquoi nous ---------- */
.why { background: #fff; border-radius: var(--radius); padding: 30px 22px; height: 100%; border: 1px solid #e7e9f3; }
.why i { font-size: 2.4rem; color: var(--c2); display: block; margin-bottom: 10px; }
.why p { color: var(--muted); margin: 0; }

.cta { background: linear-gradient(115deg, var(--c2-dark), var(--c2)); color: #fff; padding: 46px 0; }

/* ---------- Liste / filtres ---------- */
.filter-box { background: var(--soft); padding: 20px; border-radius: var(--radius); }
.filter-box .form-label { font-weight: 600; font-size: .9rem; }
.empty-state { text-align: center; padding: 60px 20px; background: var(--soft); border-radius: var(--radius); }
.empty-state > i { font-size: 3rem; color: var(--c1); }
.pagination .page-link { color: var(--c1); }
.pagination .active > .page-link { background: var(--c1); border-color: var(--c1); color: #fff; }

/* ---------- Détail annonce ---------- */
.gallery { position: relative; }
.gallery .carousel { border-radius: var(--radius); overflow: hidden; background: #0d1020; }
.gallery .carousel-item img { height: clamp(260px, 55vw, 520px); object-fit: contain; }
.gallery-statut { position: absolute; top: 16px; left: 16px; background: var(--c2); color: #fff; font-weight: 800; padding: 8px 16px; border-radius: 30px; z-index: 3; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; flex: 0 0 86px; height: 64px; background: none; opacity: .7; }
.thumbs button.active, .thumbs button:hover { border-color: var(--c2); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-box, .side-box { background: #fff; border: 1px solid #e7e9f3; border-radius: var(--radius); padding: 24px; }
.side-box { top: 90px; box-shadow: 0 10px 30px rgba(22, 26, 46, .07); }
.prix-big { font-size: 1.8rem; font-weight: 800; color: var(--c2); line-height: 1.2; }

.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.specs > div { background: var(--soft); border-radius: 10px; padding: 12px; display: grid; grid-template-columns: 28px 1fr; column-gap: 6px; align-items: center; }
.specs i { grid-row: span 2; font-size: 1.3rem; color: var(--c1); }
.specs span { font-size: .75rem; color: var(--muted); }
.specs b { font-size: .95rem; }
.description { line-height: 1.75; color: #33384f; }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Contact / à propos ---------- */
.contact-info li { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-info i { font-size: 1.3rem; width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; background: var(--soft); color: var(--c1); border-radius: 50%; }
.stat { background: var(--soft); border-radius: var(--radius); padding: 18px 8px; }
.stat b { display: block; font-size: 1.8rem; font-family: 'Montserrat', sans-serif; color: var(--c1); }
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- Pied de page ---------- */
.site-footer { background: #0d1238; color: #fff; padding: 56px 0 24px; margin-top: 0; }
.site-footer h6 { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; margin-bottom: 14px; color: #fff; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-bottom: 8px; }
.site-footer hr { border-color: rgba(255, 255, 255, .15); margin: 30px 0 18px; }
.footer-legal a { margin: 0 .5rem; text-decoration: underline; text-underline-offset: 3px; }
.footer-legal span { opacity: .5; }

/* ---------- Pages légales (mentions légales, CGU) ---------- */
.legal-text h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 .75rem; color: var(--ink); }
.legal-text h2:first-child { margin-top: 0; }
.legal-text p, .legal-text li { line-height: 1.7; }
.legal-text ul { padding-left: 1.2rem; }
.legal-text .legal-list { list-style: none; padding: 0; background: var(--soft); border-radius: var(--radius); padding: 14px 18px; }
.legal-text .legal-list li { padding: 3px 0; }
.footer-logo { display: inline-block; background: #fff; padding: 8px 12px; border-radius: 10px; }
.footer-logo img { height: 52px; }
.contact-list i { color: var(--c2); margin-right: 6px; }

/* ---------- Bouton WhatsApp flottant ---------- */
.wa-float {
    position: fixed; right: 18px; bottom: 18px; z-index: 1050;
    width: 58px; height: 58px; border-radius: 50%;
    background: #25d366; color: #fff; display: grid; place-items: center;
    font-size: 1.8rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); text-decoration: none;
    transition: transform .2s;
}
.wa-float:hover { color: #fff; transform: scale(1.08); }

@media (max-width: 991.98px) {
    .main-nav .navbar-brand img { height: 46px; }
    .hero { padding: 56px 0 40px; }
}

/* Vidéos d'une annonce */
.video-box { background: #fff; border-radius: var(--radius); padding: 1.1rem; box-shadow: 0 2px 14px rgba(16, 24, 80, .06); }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0d1020; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Boutons Appeler / WhatsApp sur chaque annonce */
.card-actions { display: flex; gap: 8px; margin-top: 12px; position: relative; z-index: 3; }  /* au-dessus du lien étendu de la carte */
.card-actions .btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; font-weight: 700; }
