/* Reset & global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    overflow-x: hidden;
    background: #121212;
    color: #fff;
}

/* Wrapper principal */
.search-wrapper-apps {
    background: rgba(0,100,255,0.6);
    border-radius: 30px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px auto 30px;
    border: 3px solid rgba(0,140,255,0.9);
    box-shadow: 0 0 15px rgba(0,100,255,0.9), 0 0 25px rgba(0,140,255,0.7), 0 0 35px rgba(0,180,255,0.5);
    transition: all 0.4s;
    width: 95%;
    max-width: 900px;
}

.search-wrapper-apps:hover {
    background: rgba(130,0,255,0.7);
    border-color: rgba(180,0,255,0.9);
    box-shadow: 0 0 15px rgba(130,0,255,0.9), 0 0 25px rgba(180,0,255,0.7), 0 0 35px rgba(210,0,255,0.5);
}

/* Formulaire de recherche */
#search-form-apps {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.search-input-apps {
    flex: 1 1 60%;
    max-width: 600px;
    min-width: 150px;
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #1b8bc0;
    background: #202020;
    color: white;
    border-radius: 20px;
    font-size: 16px;
}

.search-input-apps:focus {
    border-color: #03a9f4;
    background: #333;
}

.extractButton-apps {
    padding: 12px 25px;
    font-size: 1.1em;
    color: #00ff88;
    background: rgba(0,0,0,0.7);
    border: 3px solid #00ff88;
    border-radius: 20px;
    cursor: pointer;
    text-shadow: 0 0 12px #00ff88, 0 0 25px #00ff88;
    transition: 0.3s;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
}

.extractButton-apps:hover {
    background: #00ff88;
    color: #000;
    box-shadow: 0 0 20px #00ff88, 0 0 30px #00ff88;
}

/* Grid applications */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 15px 25px;
    width: 100%;
    max-width: 100%;
}

/* Application card */
.application {
    background: rgba(0,100,255,0.6);
    padding: 15px;
    text-align: center;
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(0,100,255,0.9), 0 0 25px rgba(0,140,255,0.7), 0 0 35px rgba(0,180,255,0.5);
    transition: all 0.3s;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    word-wrap: break-word;
}

.application img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
    transition: 0.3s;
    max-width: 100%;
}

.application img:hover {
    transform: scale(1.2);
}

.application h2 {
    font-size: 18px;
    font-weight: bold;
    color: #00d0ff;
    margin-bottom: 8px;
    font-family: 'Orbitron', sans-serif;
    overflow-wrap: anywhere;
}

.application .categorie,
.application .description {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

/* Zone boutons dans la carte */
.application .buttons-wrap,
.application .btn-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

/* Bouton dans les cartes */
.application .btn-application {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
    color: #00ff88;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #00ff88;
    border-radius: 20px;
    cursor: pointer;
    text-shadow: 0 0 12px #00ff88, 0 0 25px #00ff88;
    transition: all 0.3s;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.application .btn-application:hover {
    background: #00ff88;
    color: #000;
    box-shadow: 0 0 20px #00ff88, 0 0 30px #00ff88;
}

/* Messages */
.no-result {
    text-align: center;
    font-size: 16px;
    color: #999;
    padding: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .applications-grid { 
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
        padding: 0 10px; 
    }

    .application img { 
        width: 80px; 
        height: 80px; 
    }
}

@media (max-width: 768px) {
    .search-input-apps { 
        flex: 1 1 100%; 
        max-width: 100%; 
    }

    .extractButton-apps { 
        width: 100%; 
    }

    .applications-grid { 
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
        padding: 0 10px; 
    }

    .application img { 
        width: 70px; 
        height: 70px; 
    }

    .application .btn-application {
        font-size: 0.95rem;
        padding: 10px 12px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .applications-grid { 
        grid-template-columns: 1fr; 
        padding: 0 5px; 
    }

    .application img { 
        width: 60px; 
        height: 60px; 
    }

    .application h2 { 
        font-size: 16px; 
    }

    .application .categorie,
    .application .description { 
        font-size: 13px; 
    }

    .application .btn-application { 
        font-size: 0.9rem; 
        padding: 9px 10px; 
        border-radius: 12px;
    }
}