/* Réalisé par Dylan Borcard */
/* Version du 12.03.2026 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url("../Images/hand.png") 16 16, auto;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    min-width: 320px;
}

/* --- BANNIÈRE --- */
.bannière {
    height: auto;
    min-height: 40px;
    background: #000000;
    color: rgba(170, 160, 160, 0.57);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(11px, 2vw, 20px);
    padding: 8px 10px;
    text-align: center;
    line-height: 1.3;
}

/* --- BARRE DE NAVIGATION --- */
.barre-nav {
    height: 55px;
    background: #c5c5c5;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: clamp(6px, 3vw, 100px);
}

.boutons-nav {
    display: flex;
    flex-shrink: 0;
    gap: 3px;
}

.bouton-nav,
.btn-home-reload {
    width: 36px;
    height: 36px;
    background: #a0a0a0;
    border: 1px solid #787878;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #555;
    text-decoration: none;
}

.btn-home-reload {
    background: #efeeee;
}

.address-bar {
    flex: 1;
    min-width: 0;
    height: 40px;
    background: #ffffff;
    border: 3px solid #999;
    border-radius: 4px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    font-size: clamp(12px, 2vw, 20px);
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: #e8e8e8;
    border: 1px solid #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #555;
}

/* --- HEADER --- */
header {
    height: auto;
    min-height: 100px;
    background: #4189b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 3vw, 30px) clamp(15px, 5vw, 100px);
    flex-wrap: wrap;
    gap: 12px;
}

.logo-eyefind {
    flex-shrink: 0;
}

.logo-eyefind img {
    width: clamp(110px, 25vw, 300px);
    height: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: clamp(10px, 3vw, 20px);
    color: #ffffff;
    font-size: clamp(13px, 2vw, 22px);
    flex-wrap: wrap;
}

/* --- SECTION RECHERCHE --- */
.section-recherche {
    background: #4189b8;
    padding: clamp(10px, 2vw, 20px) clamp(12px, 3vw, 30px);
    border-bottom: 6px solid #ffc600;
    display: flex;
    gap: 10px;
}

.search-box {
    flex: 1;
    min-width: 0;
    height: 48px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-icon {
    flex-shrink: 0;
}

.search-icon img {
    width: 20px;
    height: 20px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: clamp(14px, 2vw, 16px);
}

.random-btn {
    height: 48px;
    padding: 0 clamp(12px, 3vw, 30px);
    background: #167a9e;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: clamp(11px, 1.5vw, 14px);
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- CATÉGORIES --- */
.categories {
    background: #f5f5f5;
    display: flex;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar {
    display: none;
}

.categorie {
    flex: 1;
    min-width: 90px;
    min-height: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 20px);
    font-size: clamp(8px, 1.1vw, 11px);
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    cursor: pointer;
    border-right: 1px solid #ddd;
    padding: 10px 6px;
    text-align: left;
    white-space: normal;
}

.categorie:last-child {
    border-right: none;
}

.categorie-icon {
    flex-shrink: 0;
}

.categorie-icon img {
    width: clamp(18px, 3vw, 28px);
    height: clamp(18px, 3vw, 28px);
    object-fit: contain;
    display: block;
}

/* --- ADS SECTION --- */
.ads-section {
    padding: clamp(15px, 3vw, 50px) clamp(12px, 3vw, 30px);
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ad {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- SECTION MINIATURES --- */
.section-miniature {
    padding: clamp(10px, 2vw, 20px) clamp(12px, 3vw, 30px);
    display: grid;
    background: #ffffff;
    gap: 8px;
    grid-template-columns: repeat(5, 1fr);
}

.miniature {
    aspect-ratio: 5.5 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.miniature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- RESPONSIVE --- */

@media screen and (max-width: 1024px) {
    .section-miniature {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 768px) {

    .header-right>div:nth-child(3),
    .header-right>div:nth-child(4) {
        display: none;
    }

    .ads-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-miniature {
        grid-template-columns: repeat(3, 1fr);
    }

    .categorie {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        min-width: 60px;
    }

    /* Texte des catégories caché sur mobile — icônes uniquement */
    .categorie div:last-child {
        display: none;
    }
}

@media screen and (max-width: 520px) {
    .bannière {
        font-size: 10px;
        min-height: 32px;
    }

    .boutons-nav .bouton-nav:nth-child(2) {
        display: none;
    }

    .ads-section {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .section-miniature {
        grid-template-columns: repeat(2, 1fr);
        padding: 12px;
    }

    .categorie {
        min-width: 50px;
        padding: 8px 3px;
    }
}

@media screen and (max-width: 360px) {
    .header-right {
        display: none;
    }

    header {
        justify-content: center;
        padding: 15px;
    }

    .random-btn {
        padding: 0 10px;
        font-size: 11px;
    }
}