/**
 * style.css — Feuille de style principale Oriz Immobilier
 * Charte graphique : Bleu marine #0B2265, Or #C9A84C, Crème #F5F0E0
 */

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: Arial, Helvetica, sans-serif;
    color: #555555;
    line-height: 1.6;
    background: #fff;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: Georgia, serif; color: #0B2265; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sep { width: 50px; height: 2px; background: #C9A84C; margin: 12px auto; }
.sep-left { margin: 12px 0; }

/* ============ FLASH MESSAGES ============ */
.flash { padding: 12px 20px; border-radius: 4px; margin-bottom: 20px; font-size: 14px; }
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ============ SITE HEADER ============ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.header-logo-area {
    background: #0B2265;
    text-align: center;
    padding: 20px 20px 12px;
}
.header-logo-img {
    height: 160px; width: auto; margin: 0 auto; display: block;
}

/* ============ NAVBAR ============ */
.navbar {
    background: #0B2265;
    border-top: 1px solid rgba(201,168,76,.3);
    padding: 0;
}
.navbar-inner {
    display: flex; align-items: center; justify-content: center;
    height: 48px;
}
.navbar-links {
    display: flex; gap: 40px; align-items: center;
}
.navbar-links a {
    color: #fff; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
    transition: color .2s;
}
.navbar-links a:hover { color: #C9A84C; }
.navbar-toggle {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px; padding: 5px;
}
.navbar-toggle span {
    display: block; width: 25px; height: 2px; background: #fff; transition: .2s;
}

/* ============ HERO ============ */
.hero {
    background: #0B2265;
    padding: 280px 20px 80px;
    text-align: center; color: #fff;
}
.hero h1 {
    font-size: 42px; color: #fff; margin-bottom: 10px;
    font-family: Georgia, serif;
}
.hero .slogan { font-style: italic; color: #C9A84C; font-size: 18px; margin-bottom: 30px; }
.hero .sep { background: #C9A84C; margin-bottom: 20px; }

/* Search bar */
.search-bar {
    display: flex; gap: 0; max-width: 700px; margin: 0 auto;
    background: #fff; border-radius: 6px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.search-bar select, .search-bar input {
    padding: 14px 16px; border: none; font-size: 15px;
    font-family: Arial, sans-serif; outline: none;
    color: #333;
}
.search-bar select { background: #f8f8f8; border-right: 1px solid #ddd; min-width: 140px; }
.search-bar input { flex: 1; min-width: 0; }
.search-bar button {
    background: #C9A84C; color: #0B2265; border: none;
    padding: 14px 28px; font-weight: bold; font-size: 15px;
    letter-spacing: 1px; cursor: pointer; transition: background .2s;
    white-space: nowrap;
}
.search-bar button:hover { background: #b8943f; }

/* ============ SECTION VALÉRIE ============ */
.section-valerie {
    background: #F5F0E0; padding: 80px 20px;
}
.valerie-grid {
    display: grid; grid-template-columns: 1fr 350px; gap: 50px;
    align-items: center; max-width: 1000px; margin: 0 auto;
}
.valerie-photo {
    overflow: hidden; border-radius: 8px; order: 2;
}
.valerie-photo img {
    width: 100%; height: auto; object-fit: cover; display: block;
    mix-blend-mode: multiply; background: #F5F0E0;
}
.valerie-info { order: 1; }
.valerie-tag {
    display: inline-block; color: #C9A84C; font-size: 13px;
    letter-spacing: 2px; text-transform: uppercase; font-weight: bold;
    margin-bottom: 8px;
}
.valerie-info h2 {
    font-size: 36px; margin-bottom: 4px;
}
.valerie-info .role { font-style: italic; color: #C9A84C; font-size: 16px; margin-bottom: 12px; }
.valerie-info p.bio { margin-bottom: 20px; line-height: 1.7; }
.valerie-badges {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px;
}
.valerie-badges span {
    background: #fff; border: 1px solid #C9A84C; color: #0B2265;
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: bold;
    letter-spacing: .5px;
}

/* Buttons */
.btn-marine {
    display: inline-block; background: #0B2265; color: #fff;
    padding: 12px 28px; border: none; border-radius: 4px;
    font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase;
    cursor: pointer; transition: background .2s; font-family: Arial, sans-serif;
}
.btn-marine:hover { background: #091c52; }
.btn-gold {
    display: inline-block; background: #C9A84C; color: #0B2265;
    padding: 12px 28px; border: none; border-radius: 4px;
    font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase;
    cursor: pointer; transition: background .2s; font-weight: bold;
    font-family: Arial, sans-serif;
}
.btn-gold:hover { background: #b8943f; }

/* ============ SECTION ANNONCES ============ */
.section-annonces {
    padding: 80px 20px;
}
.section-title { text-align: center; font-size: 32px; margin-bottom: 8px; }

/* Cards grid */
.annonces-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
    margin-top: 40px;
}
.card {
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,.12); }
.card-img {
    position: relative; height: 220px; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 12px; border-radius: 3px;
    font-size: 11px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;
}
.badge-vente { background: #0B2265; color: #fff; }
.badge-location { background: #C9A84C; color: #0B2265; }
.card-body { padding: 20px; }
.card-prix { font-size: 22px; font-weight: bold; color: #0B2265; margin-bottom: 6px; font-family: Georgia, serif; }
.card-titre { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 8px; }
.card-details { font-size: 13px; color: #888; margin-bottom: 6px; }
.card-ville { font-size: 13px; color: #888; margin-bottom: 12px; }
.card-link {
    color: #C9A84C; font-weight: bold; font-size: 14px;
    letter-spacing: .5px; transition: color .2s;
}
.card-link:hover { color: #0B2265; }

/* ============ SECTION SERVICES ============ */
.section-services {
    background: #0B2265; padding: 80px 20px; color: #fff;
}
.section-services .section-title { color: #fff; }
.services-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
    margin-top: 40px;
}
.service-card {
    border: 1px solid #C9A84C; border-radius: 8px; padding: 30px 20px;
    text-align: center; transition: background .2s;
}
.service-card:hover { background: rgba(201,168,76,.1); }
.service-icon { font-size: 36px; margin-bottom: 14px; }
.service-card h3 { font-size: 18px; color: #fff; margin-bottom: 8px; }
.service-card p { font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.5; }

/* ============ CTA ESTIMATION ============ */
.section-cta {
    background: #F5F0E0; border-top: 2px solid #C9A84C;
    padding: 60px 20px; text-align: center;
}
.section-cta h2 { font-size: 28px; margin-bottom: 10px; }
.section-cta p { margin-bottom: 24px; font-size: 16px; }

/* ============ FOOTER ============ */
.footer {
    background: #0B1A4A; color: #fff; padding: 60px 20px 20px;
}
.footer-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px;
    margin-bottom: 30px;
}
.footer-logo { height: 100px; width: auto; margin-bottom: 12px; }
.footer-slogan { color: #C9A84C; font-size: 14px; }
.footer h4 { color: #C9A84C; font-size: 14px; margin-bottom: 12px; letter-spacing: 1px; text-transform: uppercase; }
.footer p, .footer a { font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.8; }
.footer a:hover { color: #C9A84C; }
.social-links { display: flex; gap: 12px; }
.social-links a { color: rgba(255,255,255,.7); transition: color .2s; }
.social-links a:hover { color: #C9A84C; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; text-align: center;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,.5); }

/* ============ ANNONCES LIST PAGE ============ */
.page-header {
    background: #0B2265; padding: 280px 20px 40px; text-align: center; color: #fff;
}
.page-header h1 { color: #fff; font-size: 36px; }

.filters-bar {
    background: #F5F0E0; padding: 20px; border-radius: 8px;
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    margin: 30px auto; max-width: 1200px;
}
.filters-bar select, .filters-bar input {
    padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; font-family: Arial, sans-serif; background: #fff;
}
.filters-bar .btn-marine { padding: 10px 20px; font-size: 13px; }

.pagination {
    display: flex; justify-content: center; gap: 8px; margin-top: 40px;
}
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; transition: .2s;
}
.pagination a:hover { background: #F5F0E0; }
.pagination .active { background: #0B2265; color: #fff; border-color: #0B2265; }

/* ============ ANNONCE DETAIL ============ */
.annonce-detail { padding: 280px 20px 60px; }
.annonce-layout {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px;
    max-width: 1200px; margin: 0 auto;
}

/* Gallery */
.gallery-main {
    border-radius: 8px; overflow: hidden; height: 400px; margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.gallery-thumbs img {
    width: 80px; height: 60px; object-fit: cover; border-radius: 4px;
    cursor: pointer; border: 2px solid transparent; transition: border-color .2s;
}
.gallery-thumbs img:hover, .gallery-thumbs img.active { border-color: #C9A84C; }

.video-embed {
    margin-top: 24px; border-radius: 8px; overflow: hidden;
}
.video-embed iframe { width: 100%; height: 340px; border: none; }

.description-section { margin-top: 30px; }
.description-section h2 { font-size: 22px; margin-bottom: 12px; }
.description-section p { line-height: 1.8; }

.map-section { margin-top: 30px; }
.map-section h2 { font-size: 22px; margin-bottom: 12px; }
#map { height: 300px; border-radius: 8px; }

/* Sidebar */
.annonce-sidebar {
    position: sticky; top: 90px; align-self: start;
    background: #fff; border-radius: 8px; padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,.08);
}
.annonce-sidebar .card-badge { position: static; display: inline-block; margin-bottom: 12px; }
.sidebar-prix { font-size: 32px; font-weight: bold; color: #0B2265; font-family: Georgia, serif; margin-bottom: 6px; }
.sidebar-titre { font-size: 18px; color: #333; margin-bottom: 4px; }
.sidebar-ville { color: #888; font-size: 14px; margin-bottom: 16px; }
.details-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-bottom: 20px; padding-top: 16px;
}
.detail-item { text-align: center; padding: 12px; background: #F5F0E0; border-radius: 6px; }
.detail-item .label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.detail-item .value { font-size: 18px; font-weight: bold; color: #0B2265; margin-top: 4px; }

/* Contact form */
.contact-form { margin-top: 24px; }
.contact-form h3 { font-size: 18px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; font-weight: bold; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; font-family: Arial, sans-serif; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #C9A84C; outline: none;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-error { color: #c0392b; font-size: 13px; margin-top: 4px; }

/* ============ ADMIN ============ */
.admin-login {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: #F5F0E0;
}
.login-box {
    background: #fff; padding: 40px 50px; border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,.1); width: 100%; max-width: 420px;
    text-align: center;
}
.login-box img { height: 50px; margin: 0 auto 20px; }
.login-box h1 { font-size: 24px; margin-bottom: 6px; }
.login-error {
    background: #f8d7da; color: #721c24; padding: 10px; border-radius: 4px;
    font-size: 14px; margin-bottom: 16px;
}

/* Admin layout */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px; background: #0B2265; color: #fff;
    padding: 20px 0; position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto;
}
.admin-sidebar .sidebar-logo { padding: 10px 20px 30px; }
.admin-sidebar .sidebar-logo img { height: 40px; }
.admin-sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 24px; color: rgba(255,255,255,.7);
    font-size: 14px; transition: .2s; border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-sidebar nav a.active {
    color: #C9A84C; border-left-color: #C9A84C; background: rgba(201,168,76,.08);
}
.admin-main { margin-left: 250px; flex: 1; padding: 30px; background: #f5f5f5; }
.admin-header { margin-bottom: 30px; }
.admin-header h1 { font-size: 28px; }

/* Stat cards */
.stat-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: #F5F0E0; padding: 24px; border-radius: 8px;
    text-align: center;
}
.stat-card .stat-number { font-size: 36px; font-weight: bold; color: #0B2265; font-family: Georgia, serif; }
.stat-card .stat-label { font-size: 14px; color: #888; margin-top: 6px; }

/* Admin table */
.admin-table {
    width: 100%; background: #fff; border-radius: 8px;
    overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.admin-table th {
    background: #0B2265; color: #fff; padding: 12px 16px;
    text-align: left; font-size: 13px; letter-spacing: .5px;
}
.admin-table td {
    padding: 12px 16px; border-bottom: 1px solid #eee; font-size: 14px;
    vertical-align: middle;
}
.admin-table tr:hover td { background: #fafafa; }
.admin-table .actions { display: flex; gap: 8px; }
.admin-table .actions a {
    padding: 5px 12px; border-radius: 3px; font-size: 12px; font-weight: bold;
}
.btn-edit { background: #0B2265; color: #fff; }
.btn-edit:hover { background: #091c52; }
.btn-delete { background: #c0392b; color: #fff; }
.btn-delete:hover { background: #a93226; }

/* Badges */
.badge { padding: 4px 10px; border-radius: 3px; font-size: 11px; font-weight: bold; letter-spacing: .5px; }
.badge-disponible { background: #d4edda; color: #155724; }
.badge-vendu { background: #f8d7da; color: #721c24; }
.badge-loue { background: #d1ecf1; color: #0c5460; }

/* Admin form */
.admin-form {
    background: #fff; padding: 30px; border-radius: 8px;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-full { grid-column: 1 / -1; }

/* Photos management */
.photos-existing {
    display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.photo-item {
    position: relative; width: 120px;
}
.photo-item img { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }
.photo-item .photo-delete {
    position: absolute; top: -6px; right: -6px;
    width: 22px; height: 22px; background: #c0392b; color: #fff;
    border: none; border-radius: 50%; cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
}
.photo-item .photo-order {
    position: absolute; bottom: 4px; left: 4px;
    background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
    padding: 2px 6px; border-radius: 3px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .annonces-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .annonce-layout { grid-template-columns: 1fr; }
    .annonce-sidebar { position: static; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar-toggle { display: flex; }
    .navbar-inner { justify-content: center; }
    .navbar-links {
        display: none; position: absolute; top: 48px; left: 0; right: 0;
        background: #0B2265; flex-direction: column; padding: 20px;
        gap: 15px; box-shadow: 0 4px 10px rgba(0,0,0,.2);
    }
    .navbar-links.open { display: flex; }

    .header-logo-img { height: 80px; }
    .hero { padding: 200px 20px 60px; }
    .hero h1 { font-size: 28px; }
    .search-bar { flex-direction: column; border-radius: 8px; }
    .search-bar select { border-right: none; border-bottom: 1px solid #ddd; }

    .valerie-grid { grid-template-columns: 1fr; text-align: center; }
    .valerie-photo { max-width: 300px; margin: 0 auto; order: 2; }
    .valerie-info { order: 1; }
    .sep-left { margin: 12px auto; }
    .page-header { padding: 200px 20px 40px; }
    .annonce-detail { padding: 200px 20px 60px; }

    .annonces-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; }
    .filters-bar select, .filters-bar input { width: 100%; }

    .section-title { font-size: 26px; }

    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
    .stat-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }

    .gallery-main { height: 260px; }
    .details-grid { grid-template-columns: 1fr 1fr; }
}
