/*
Theme Name: mon_theme0
Author: Moi
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.6;
    /* padding-top: 120px; header fixe pour desktop */
}
/* Titres */
h1, h2, h3, h4 {
    color: #111827;
    font-weight: 700;
}

/* Section Titles */
section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #5c6ac4;
    padding-bottom: 0.5rem;
}

/* Articles Actualités */
article {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

article:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

article img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.5rem 0.5rem 0 0;
}

article .p-6 {
    padding: 1.5rem;
}

article h3 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

article p {
    font-size: 0.95rem;
    color: #4b5563;
}

/* Table Cryptos */
#crypto-table {
    width: 100%;
    border-collapse: collapse;
}

#crypto-table th, #crypto-table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

#crypto-table thead {
    background-color: #f3f4f6;
}

#crypto-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.positive { color: #10b981; }
.negative { color: #ef4444; }

.overflow-x-auto { overflow-x: auto; }

/* Buttons */
button, a {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover, a:hover {
    opacity: 0.85;
}

/* Responsive grid */
.grid { display: grid; gap: 1.5rem; }

@media (min-width: 768px) { .grid-cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* Section Cours responsive flex */
.flex-col-md-flex-row { display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 768px) {
    .flex-col-md-flex-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
/* ----- TABLEAU CRYPTO MOBILE ----- */
@media (max-width: 640px) {

    /* Réduire les padding */
    #crypto-table th,
    #crypto-table td {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Réduire hauteur */
    #crypto-table th {
        font-size: 0.65rem;
    }

    #crypto-table td {
        font-size: 0.75rem;
    }

    /* Cacher la colonne Capitalisation (5e colonne) */
    #crypto-table th:nth-child(5),
    #crypto-table td:nth-child(5) {
        display: none;
    }
}