/* Réglages de base pour un look moderne (police d'écriture Apple/Airbnb) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #222222;
}

/* =========================================
   --- L'EN-TÊTE (Le menu sur ordinateur) ---
   ========================================= */
header {
    display: flex;
    justify-content: space-between; /* Met le logo à gauche et le menu à droite */
    align-items: center;
    padding: 20px 40px;
    background-color: white;
    width: 100%;
    /* Permet à l'en-tête de rester accroché en haut quand on défile */
    position: fixed; 
    top: 0;
    z-index: 1000;
}

/* =========================================
   --- NOUVEAU LOGO : LES DEUX EMPREINTES ---
   ========================================= */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo:hover { 
    transform: scale(1.03); 
}

/* Le fond du logo (Carré sombre) */
.logo-badge {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2b2828 0%, #252323 100%);
    border-radius: 14px;
    position: relative;
    box-shadow: 0 4px 10px rgba(24, 22, 22, 0.25);
    flex-shrink: 0;
}

/* Les conteneurs des deux pattes */
.paw-print {
    position: absolute;
    width: 24px;
    height: 24px;
}

/* Position de la 1ère patte (en bas à gauche) */
.paw-one {
    bottom: 2px;
    left: 4px;
    transform: rotate(-15deg) scale(0.65);
    opacity: 1; 
}

/* Position de la 2ème patte (en haut à droite) */
.paw-two {
    top: 4px;
    right: 3px;
    transform: rotate(15deg) scale(0.85);
}

/* La couleur des pattes (Le rose exact de BnPets) */
.logo-badge [class*="pad"], .logo-badge [class*="toe"] {
    background: #FF385C; 
    border-radius: 50%;
    position: absolute;
}

/* Le dessin des coussinets et des doigts */
.pad  { width: 14px; height: 12px; bottom: 0px; left: 5px; }
.toe1 { width: 5px; height: 7px; bottom: 12px; left: 1px; transform: rotate(-25deg); }
.toe2 { width: 6px; height: 8px; bottom: 15px; left: 6px; transform: rotate(-5deg); }
.toe3 { width: 6px; height: 8px; bottom: 15px; right: 6px; transform: rotate(5deg); }
.toe4 { width: 5px; height: 7px; bottom: 12px; right: 1px; transform: rotate(25deg); }

/* Le texte BnPets */
.logo h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    color: #1d1d1f;
    letter-spacing: -1px;
    display: flex;
    align-items: baseline;
}

.logo h1 span {
    background: linear-gradient(90deg, #FF385C, #D70466);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 10px; 
}

nav a {
    text-decoration: none; 
    color: #222222;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 30px; 
    transition: background-color 0.2s;
}

nav a:hover {
    background-color: #f7f7f7; 
}

/* --- LA ZONE PRINCIPALE --- */
main {
    text-align: center;
    padding: 120px 20px 100px 20px; /* Le padding haut compense l'en-tête fixé */
}

main h2 {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.02em; 
}

/* --- LA BARRE DE RECHERCHE --- */
.search-bar {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #dddddd;
    border-radius: 40px; 
    box-shadow: 0 3px 12px rgba(0,0,0,0.08); 
    max-width: 800px;
    margin: 40px auto 0; 
    height: 66px;
    transition: box-shadow 0.2s;
}

.search-bar:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
}

.search-block {
    flex: 1; 
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    text-align: left;
}

.search-block:hover {
    background-color: #ebebeb; 
}

.search-title {
    font-size: 12px;
    font-weight: 800;
    color: #222222;
}

.search-subtitle {
    font-size: 14px;
    color: #717171;
    margin-top: 2px;
}

.search-divider {
    height: 32px;
    width: 1px;
    background-color: #dddddd;
}

.search-btn {
    background-color: #FF385C; 
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin-right: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #D70466; 
}

/* --- LA GRILLE D'ANNONCES --- */
.listings-grid {
    display: flex;
    flex-wrap: wrap; 
    gap: 24px; 
    max-width: 1200px;
    margin: 60px auto; 
    padding: 0 40px;
}

.listing-card {
    flex: 1 1 calc(25% - 18px); 
    min-width: 280px; 
    cursor: pointer;
}

.listing-image {
    width: 100%;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    border-radius: 12px; 
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.3s;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05); 
}

.listing-info {
    padding: 12px 0;
    text-align: left;
    font-size: 15px;
}

.listing-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.listing-title h3 {
    font-size: 15px;
    font-weight: 600;
}

.rating {
    font-weight: 300;
}

.listing-subtitle, .listing-date {
    color: #717171;
}

.listing-price {
    margin-top: 6px;
}

/* --- BARRE DES CATÉGORIES --- */
.categories-bar {
    display: flex;
    justify-content: center; 
    gap: 40px;
    margin: 40px auto;
    width: 100%; 
    max-width: 1200px; 
    overflow-x: auto; 
    padding-bottom: 10px;
}

/* --- SYSTÈME DE NOTIFICATIONS (TOASTS) --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #222;
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    font-weight: bold;
    font-size: 15px;
    transform: translateX(120%);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, 
               fadeOut 0.4s 3s forwards; 
}

.toast.success { background-color: #28a745; border-left: 6px solid #1e7e34; }
.toast.error { background-color: #dc3545; border-left: 6px solid #a71d2a; }

@keyframes slideIn { to { transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(120%); } }

/* --- STYLE DU FOOTER --- */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    transition: text-decoration 0.2s;
}

.footer-col a:hover {
    text-decoration: underline;
    color: #1d1d1f;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.footer-copy a {
    color: #555;
    text-decoration: none;
    margin-left: 10px;
}

/* Modales */
.modal-content {
    max-height: 85vh; 
    overflow-y: auto; 
}
#modal-conditions {
    z-index: 10001 !important;
}

/* =========================================================================
   --- RESPONSIVE DESIGN (Téléphones et petits écrans) ---
   Toutes tes règles mobiles sont rangées ICI pour éviter les conflits !
   ========================================================================= */
@media (max-width: 768px) {
    
    /* 1. L'en-tête (Détaché du haut et organisé en colonne) */
    header {
        position: static !important; 
        flex-direction: column !important;
        padding: 20px 10px !important;
        height: auto !important;
        gap: 10px;
    }

    /* 2. Le Menu */
    nav ul {
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 10px; 
    }
    nav a {
        font-size: 14px; 
    }
    .btn-nav {
        padding: 6px 14px; 
    }

    /* 3. La zone principale (On réduit l'espace vu que l'en-tête n'est plus fixe) */
    main {
        padding-top: 40px; 
    }
    h2 {
        font-size: 28px; /* Un poil plus petit pour que ça tienne bien */
    }

    /* 4. La barre de recherche */
    .search-bar {
        flex-direction: column; 
        height: auto; 
        border-radius: 20px;
        padding: 15px;
        margin: 20px 10px;
    }
    .search-divider {
        width: 100%;
        height: 1px;
        margin: 10px 0;
    }
    .search-btn {
        width: 100%; 
        border-radius: 12px;
        margin-top: 10px;
    }

    /* 5. La grille d'annonces (1 par ligne) */
    .listing-card {
        flex: 1 1 100%; 
    }
    .listings-grid {
        padding: 0 20px;
    }

    /* 6. Le Footer */
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }
    .footer-bottom { 
        flex-direction: column; 
        gap: 20px; 
        text-align: center; 
    }
    /* ========================================================
       7. RÉPARATIONS DE L'ESPACE "MON COMPTE" SUR MOBILE
       ======================================================== */
    
    /* On réduit les marges de la fenêtre pour gagner de la place */
    .modal-content {
        padding: 20px !important; 
    }

    /* Les annonces prennent toute la largeur au lieu d'être écrasées à 50% */
    #mes-annonces-liste .glass-panel {
        width: 100% !important;
    }

    /* On force les boutons Modifier/Supprimer à bien s'aligner */
    #mes-annonces-liste .glass-panel > div {
        flex-wrap: wrap !important;
    }

    /* Les Demandes Reçues s'empilent au lieu de se chevaucher */
    #mes-reservations-liste .glass-panel {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px;
    }

    /* Les boutons Accepter/Refuser s'étalent parfaitement en bas */
    #mes-reservations-liste .glass-panel > div:last-child {
        flex-direction: row !important;
        width: 100% !important;
    }
    #mes-reservations-liste .glass-panel > div:last-child button {
        flex: 1 !important; /* Les deux boutons ont la même taille */
    }

    /* --- STYLE DU BADGE DE NOTIFICATION --- */
#badge-notif {
        background-color: #34C759; /* Le vert pomme iOS */
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: none; /* Reste caché par défaut */
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -8px;
        right: -20px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.25);
        z-index: 100;
    }
}