/* Container principal */
.villa228-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.villa228-form-wrapper {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.villa228-form-wrapper h2 {
    margin: 0 0 10px 0;
    color: #003366;
    font-size: 28px;
}

.villa228-subtitle {
    color: #666;
    margin-bottom: 30px;
}

/* Sections de formulaire */
.villa228-form-section {
    margin-bottom: 30px;
}

.villa228-form-section h3 {
    font-size: 18px;
    color: #0066cc;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Groupes de champs */
.villa228-form-group {
    margin-bottom: 20px;
}

.villa228-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.villa228-form-group input[type="text"],
.villa228-form-group input[type="email"],
.villa228-form-group input[type="tel"],
.villa228-form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.villa228-form-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.villa228-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Ligne avec plusieurs champs */
.villa228-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Checkbox */
.villa228-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.villa228-checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

/* Indicateur de force du mot de passe */
.villa228-password-strength {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
}

.villa228-password-strength.weak {
    color: #dc3545;
}

.villa228-password-strength.medium {
    color: #ffc107;
}

.villa228-password-strength.good {
    color: #17a2b8;
}

.villa228-password-strength.strong {
    color: #28a745;
}

/* Boutons */
.villa228-form-actions {
    margin-top: 30px;
}

.villa228-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.villa228-btn-primary {
    background: #0066cc;
    color: #ffffff;
}

.villa228-btn-primary:hover {
    background: #0052a3;
}

.villa228-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.villa228-btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.villa228-btn-secondary:hover {
    background: #5a6268;
}

/* Messages */
.villa228-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.villa228-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.villa228-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Alertes */
.villa228-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.villa228-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.villa228-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Footer du formulaire */
.villa228-form-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.villa228-form-footer p {
    margin: 5px 0;
    color: #666;
}

.villa228-form-footer a {
    color: #0066cc;
    text-decoration: none;
}

.villa228-form-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.villa228-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.villa228-dashboard-header {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.villa228-dashboard-header h1 {
    margin: 0 0 10px 0;
    color: #003366;
}

.villa228-dashboard-actions {
    margin-bottom: 30px;
}

.villa228-dashboard-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .villa228-form-wrapper {
        padding: 20px;
    }
    
    .villa228-form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   GESTION DES BIENS IMMOBILIERS
   ======================================== */

/* Header avec bouton */
.villa228-properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.villa228-properties-header h1 {
    margin: 0;
}

/* État vide */
.villa228-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.villa228-empty-state h2 {
    color: #666;
    margin: 20px 0;
}

/* Grille d'équipements */
.villa228-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.villa228-amenity-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.villa228-amenity-item:hover {
    border-color: #0066cc;
    background: #f0f8ff;
}

.villa228-amenity-item input[type="checkbox"] {
    margin-right: 10px;
}

.villa228-amenity-item input[type="checkbox"]:checked + span {
    font-weight: bold;
    color: #0066cc;
}

/* Upload de fichiers */
.villa228-file-upload-label {
    display: block;
    padding: 40px;
    border: 3px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.villa228-file-upload-label:hover {
    border-color: #0066cc;
    background: #f0f8ff;
}

.villa228-upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* Preview des images */
.villa228-images-preview {
    margin-top: 20px;
}

.villa228-images-summary {
    padding: 15px;
    background: #e8f4fd;
    border-left: 4px solid #0066cc;
    margin-bottom: 20px;
}

.villa228-image-preview-item {
    display: inline-block;
    position: relative;
    width: 150px;
    height: 150px;
    margin: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.villa228-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.villa228-image-order {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.villa228-primary-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background: #0066cc;
    color: white;
    padding: 5px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
}

/* Grille des biens */
.villa228-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Carte de bien */
.villa228-property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.villa228-property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.villa228-property-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.villa228-property-content {
    padding: 20px;
}

.villa228-property-status {
    margin-bottom: 10px;
}

.villa228-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.villa228-status-pending {
    background: #fff3cd;
    color: #856404;
}

.villa228-status-published {
    background: #d4edda;
    color: #155724;
}

.villa228-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.villa228-status-archived {
    background: #e2e3e5;
    color: #383d41;
}

.villa228-property-content h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    line-height: 1.4;
}

.villa228-property-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.villa228-property-price {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 10px;
}

.villa228-property-ref {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.villa228-rejection-reason {
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    margin: 15px 0;
    border-radius: 4px;
}

.villa228-rejection-reason strong {
    display: block;
    margin-bottom: 5px;
    color: #856404;
}

.villa228-rejection-reason p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

.villa228-property-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.villa228-btn-small {
    padding: 8px 15px;
    font-size: 13px;
}

.villa228-btn-danger {
    background: #dc3545;
    color: white;
}

.villa228-btn-danger:hover {
    background: #c82333;
}

.villa228-btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

/* Message info */
.villa228-message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ========================================
   AFFICHAGE PUBLIC DES BIENS
   ======================================== */

/* Liste publique des biens */
.villa228-public-properties {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.villa228-public-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.villa228-public-property-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.villa228-public-property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.villa228-property-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.villa228-property-thumbnail {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.villa228-property-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.villa228-public-property-card:hover .villa228-property-thumbnail img {
    transform: scale(1.05);
}

.villa228-property-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.villa228-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.villa228-badge-transaction {
    background: #0066cc;
    color: #fff;
}

.villa228-badge-type {
    background: #28a745;
    color: #fff;
}

.villa228-public-property-content {
    padding: 20px;
}

.villa228-property-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #003366;
    line-height: 1.3;
}

.villa228-property-location {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.villa228-property-features {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.villa228-property-price-public {
    font-size: 26px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 8px;
}

.villa228-property-price-public span {
    font-size: 16px;
    font-weight: normal;
    color: #666;
}

.villa228-property-agent-info {
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: 12px;
}

.villa228-property-agent-info small {
    color: #888;
    font-size: 13px;
}

.villa228-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

/* ========================================
   VUE DÉTAILLÉE D'UN BIEN
   ======================================== */

.villa228-single-property {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Galerie d'images */
.villa228-property-gallery {
    margin-bottom: 40px;
}

.villa228-main-image {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.villa228-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.villa228-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.villa228-thumbnail {
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
    border: 3px solid transparent;
}

.villa228-thumbnail:hover,
.villa228-thumbnail.active {
    opacity: 1;
    transform: scale(1.05);
}

.villa228-thumbnail.active {
    border-color: #0066cc;
}

.villa228-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* En-tête du bien */
.villa228-property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.villa228-property-title-section h1 {
    font-size: 36px;
    margin: 0 0 15px 0;
    color: #003366;
    line-height: 1.2;
}

.villa228-property-meta-top {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.villa228-ref {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.villa228-location-big {
    font-size: 18px;
    color: #555;
    font-weight: 500;
}

.villa228-price-section {
    text-align: right;
}

.villa228-price-big {
    font-size: 42px;
    font-weight: 800;
    color: #0066cc;
    line-height: 1;
}

.villa228-price-suffix {
    font-size: 18px;
    font-weight: 400;
    color: #666;
}

/* Caractéristiques principales */
.villa228-main-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.villa228-feature-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.villa228-feature-icon {
    font-size: 32px;
}

.villa228-feature-content {
    display: flex;
    flex-direction: column;
}

.villa228-feature-content strong {
    font-size: 24px;
    color: #003366;
    line-height: 1;
    margin-bottom: 4px;
}

.villa228-feature-content span {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.villa228-section {
    margin-bottom: 40px;
}

.villa228-section h2 {
    font-size: 26px;
    color: #003366;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.villa228-description {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

/* Équipements */
.villa228-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.villa228-amenity-item {
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #0066cc;
}

/* Détails */
.villa228-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.villa228-detail-item {
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

.villa228-detail-item strong {
    display: block;
    margin-bottom: 5px;
    color: #003366;
    font-size: 14px;
}

/* Contact agent */
.villa228-contact-section {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.villa228-agent-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.villa228-agent-info-box h3 {
    font-size: 22px;
    margin: 0 0 15px 0;
    color: #003366;
}

.villa228-agent-info-box p {
    margin: 8px 0;
    font-size: 15px;
    color: #555;
}

.villa228-agent-info-box a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
}

.villa228-agent-info-box a:hover {
    text-decoration: underline;
}

.villa228-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .villa228-properties-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .villa228-amenities-grid {
        grid-template-columns: 1fr;
    }

    .villa228-properties-grid {
        grid-template-columns: 1fr;
    }

    .villa228-property-actions {
        flex-direction: column;
    }

    /* Public properties responsive */
    .villa228-public-properties-grid {
        grid-template-columns: 1fr;
    }

    .villa228-property-header {
        flex-direction: column;
        gap: 20px;
    }

    .villa228-price-section {
        text-align: left;
    }

    .villa228-price-big {
        font-size: 32px;
    }

    .villa228-property-title-section h1 {
        font-size: 28px;
    }

    .villa228-main-image {
        height: 300px;
    }

    .villa228-main-features {
        grid-template-columns: 1fr 1fr;
    }

    .villa228-agent-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .villa228-contact-actions {
        width: 100%;
    }

    .villa228-contact-actions a {
        width: 100%;
        text-align: center;
    }

    /* Navigation agent mobile */
    .villa228-agent-nav div {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .villa228-agent-nav a {
        white-space: nowrap;
        font-size: 13px;
        padding: 12px 15px !important;
    }

    .villa228-agent-nav .dashicons {
        font-size: 16px;
    }

    /* Dashboard agent mobile */
    .villa228-dashboard-header {
        flex-direction: column !important;
        gap: 15px;
    }

    .villa228-dashboard-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .villa228-dashboard-actions .villa228-btn {
        width: 100%;
        justify-content: center;
    }

    /* Stats cards mobile */
    .villa228-stat-card {
        min-width: 100% !important;
    }

    /* Filtres statut mobile */
    .villa228-status-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }

    .villa228-filter-btn {
        flex-shrink: 0;
    }

    /* Header propriétés mobile */
    .villa228-properties-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }

    .villa228-properties-header h1 {
        font-size: 22px !important;
    }

    .villa228-properties-header a {
        width: 100%;
        text-align: center;
    }

    /* Formulaire mobile */
    .villa228-form-wrapper {
        padding: 20px !important;
    }

    .villa228-form-wrapper h2 {
        font-size: 22px !important;
    }

    .villa228-form-row {
        grid-template-columns: 1fr !important;
    }

    /* Modals mobile */
    .villa228-modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 20px auto !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Visites mobile */
    .villa228-visit-card {
        padding: 15px !important;
    }

    .villa228-visit-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .villa228-visit-actions {
        width: 100%;
        flex-direction: column !important;
    }

    .villa228-visit-actions button {
        width: 100%;
    }

    /* Tables mobile */
    table.villa228-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Profil mobile */
    .villa228-profile-wrapper {
        padding: 20px 15px !important;
    }

    .villa228-profile-wrapper h1 {
        font-size: 24px !important;
    }

    /* Raccourcis dashboard mobile */
    .villa228-quick-actions > div {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    .villa228-action-card {
        padding: 15px !important;
        font-size: 13px;
    }

    .villa228-action-card .dashicons {
        font-size: 20px !important;
    }

    .villa228-action-card strong {
        font-size: 14px;
    }

    /* Liste propriétés récentes mobile */
    .villa228-property-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .villa228-property-row > div:last-child {
        width: 100%;
    }

    .villa228-property-row h3 {
        font-size: 15px !important;
        white-space: normal !important;
    }
}

/* Breakpoint tablet (601px - 900px) */
@media (min-width: 601px) and (max-width: 900px) {
    .villa228-container {
        max-width: 90%;
    }

    .villa228-properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .villa228-main-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .villa228-quick-actions > div {
        grid-template-columns: repeat(2, 1fr);
    }

    .villa228-agent-nav a {
        font-size: 14px;
        padding: 13px 18px;
    }
}

/* Breakpoint landscape mobile (orientation paysage) */
@media (max-width: 900px) and (orientation: landscape) {
    .villa228-modal-content {
        max-height: 85vh;
    }

    .villa228-agent-nav {
        margin: -10px -10px 20px -10px !important;
    }

    .villa228-container {
        padding: 0 10px;
    }
}