/* =========================================
   STYLE.CSS - MYKOT FINAL (ALL FIXES INCLUDED)
   ========================================= */

/* 1. RESET AGRESSIF */
body, html, .site, #page, .site-content, .entry-content, article, .inside-article {
    background-color: #f4f6f8 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
}

/* 2. CONTENEUR NAVIS */
#mykot-kiosk {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background-color: #f4f6f8;
    min-height: 100vh;
    box-sizing: border-box;
    padding-bottom: 60px;
    position: relative;
}
#mykot-kiosk * { box-sizing: border-box; }

/* 3. HEADER */
.mykot-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: white; 
    padding: 30px 20px;
    border-radius: 0 0 25px 25px;
    margin-bottom: 40px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-align: center;
}

.header-top { 
    display: flex; flex-direction: column; 
    justify-content: center; align-items: center; 
    gap: 20px; margin-bottom: 25px; width: 100%;
}

.header-top .logo img {
    display: block; max-height: 160px; width: auto; margin: 0 auto;
    transition: transform 0.3s ease;
}
.header-top .logo img:hover { transform: scale(1.05); }

.btn-profile {
    background: #FFCC00; border: none; padding: 12px 30px; 
    border-radius: 30px; font-weight: bold; cursor: pointer; color: #003366; 
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); font-size: 1rem;
    position: relative; margin-top: 5px;
}
.btn-profile:hover { background-color: #ffdb4d; transform: translateY(-2px); }

.mykot-location-bar {
    position: relative; background: rgba(255,255,255,0.2); padding: 12px 25px;
    border-radius: 50px; display: flex; align-items: center; gap: 10px; 
    z-index: 500; margin: 0 auto; width: 100%; max-width: 500px;
}
.mykot-location-bar label { font-weight: 600; color: #fff; white-space: nowrap; font-size: 1rem; }
.mykot-location-bar input { width: 100%; border: none; background: transparent; color: white; font-size: 1.1rem; outline: none; }
.mykot-location-bar input::placeholder { color: rgba(255,255,255,0.7); }

#city-suggestions {
    display: none; position: absolute; top: 100%; left: 25px; right: 25px;
    background: white; border: none; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-radius: 0 0 15px 15px; z-index: 9999; max-height: 250px; overflow-y: auto; margin-top: 5px; text-align: left;
}
.suggestion-item { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #eee; color: #333; }
.suggestion-item:hover { background-color: #f0f7ff; color: #003366; }

/* 4. ONGLETS */
.mykot-tabs { 
    display: flex; gap: 10px; padding: 0 15px; margin-bottom: 30px; 
    justify-content: center; flex-wrap: wrap; 
}
.tab-btn {
    background: white; border: 1px solid #ddd; padding: 10px 20px; border-radius: 30px;
    white-space: nowrap; cursor: pointer; color: #666; font-weight: 600; font-size: 0.95rem;
}
.tab-btn.active { background: #003366; color: white; border-color: #003366; box-shadow: 0 4px 10px rgba(0,51,102,0.3); }

/* 5. GRILLE */
.mykot-grid {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; padding: 0 20px; width: 100%;
}
.mykot-grid::before, .mykot-grid::after { display: none !important; content: none !important; }

.mykot-card-wrapper { 
    position: relative !important; width: 100%; max-width: 300px; min-width: 250px;
}

.mykot-card {
    background: white; border-radius: 16px; padding: 25px;
    text-decoration: none; color: #333; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s; border: 1px solid transparent;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 220px; position: relative;
}
.mykot-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: #003366; }

/* BOUTON AUDIO VECTORIEL */
.mykot-speak-btn {
    position: absolute; top: 15px; right: 15px; width: 40px; height: 40px;
    appearance: none; -webkit-appearance: none;
    background-color: #ffffff !important; border: 1px solid #e0e0e0 !important; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding: 0; margin: 0;
    z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.1); color: #003366 !important; cursor: pointer;
}
.mykot-speak-btn svg { fill: currentColor; width: 20px; height: 20px; }
.mykot-speak-btn:hover { background-color: #FFCC00 !important; border-color: #FFCC00 !important; color: #003366 !important; }

/* BADGES ET CONTENU */
.card-top { display: flex; justify-content: flex-start; margin-bottom: 15px; }
.badge-scope { font-size: 0.7rem; text-transform: uppercase; font-weight: 800; padding: 4px 10px; border-radius: 6px; display: inline-block; }

/* COULEURS DES BADGES */
.badge-scope.national { background: #eef2f5; color: #333; border: 1px solid #ccc; }
.badge-scope.regional { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }
.badge-scope.departemental { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.badge-scope.communal { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.badge-scope.quartier { background: #f3e5f5; color: #4a148c; border: 1px solid #ce93d8; }
.badge-scope.local { background: #e0f7fa; color: #006064; }

.card-body { flex-grow: 1; margin-bottom: 20px; text-align: left; }
.title { font-weight: 700; font-size: 1.2rem; line-height: 1.3; margin: 0; color: #1a1a1a; }

.card-footer { text-align: center; }
.btn-action { display: block; width: 100%; padding: 12px; border-radius: 10px; font-size: 0.9rem; font-weight: bold; }
.btn-action.link { background: #f0f4f8; color: #003366; }
.btn-action.pdf { background: #fff4e6; color: #d97706; }

/* 6. MODALE */
.mykot-modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); }
.modal-content { background: #fff; margin: 5vh auto; padding: 30px; width: 95%; max-width: 500px; border-radius: 20px; max-height: 90vh; overflow-y: auto; text-align: left; }
.close-modal { float: right; font-size: 30px; cursor: pointer; color: #ccc; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.full-width { grid-column: span 2; }
.form-group label { display: block; font-size: 0.85rem; color: #555; margin-bottom: 5px; font-weight: 600; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; }
.btn-generate { width: 100%; background: #003366; color: white; padding: 15px; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; }

/* MOBILE */
@media (max-width: 767px) {
    .mykot-location-bar { max-width: 100%; }
    .mykot-grid { gap: 15px; }
}