/* =========================================================
   Définition des variables de couleurs et styles globaux
   ========================================================= */
   :root {
    --primary-bg: #1c1c1c;        /* Fond principal (noir) */
    --primary-text: #e6e6e6;      /* Texte clair */
    --secondary-bg: #2c3e50;      /* Bleu acier */
    --highlight-color: #1abc9c;   /* Tungstène ou vert-bleuté */
    --card-bg: #34495e;           /* Bleu acier foncé */
    --card-shadow: rgba(0, 0, 0, 0.3);
    
    /* Exemples de variables typographiques éventuelles */
    /* --font-body: 'Arial', sans-serif; */
    /* --font-heading: 'Helvetica Neue', sans-serif; */
}

/* =========================================================
   Réinitialisation / Normalisation (extrait minimal)
   ========================================================= */
/* 
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
*/

/* =========================================================
   Styles généraux
   ========================================================= */
body {
    font-family: 'Arial', sans-serif; /* Peut être remplacé par --font-body */
    margin: 0;
    padding: 0;
    background-color: var(--primary-bg);
    color: var(--primary-text);
}

header {
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    text-align: center;
    padding: 1.5rem 0;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

/* =========================================================
   Navigation
   ========================================================= */
nav {
    position: relative;
    background-color: var(--secondary-bg);
    padding: 10px;
    display: flex;
    
    align-items: center;
}

nav .logo {
    color: var(--primary-text);
    font-size: 1.5rem;
    font-weight: bold;
}

nav .hamburger {
    display: none; /* Caché par défaut (montré via media queries) */
    font-size: 2rem;
    color: var(--primary-text);
    background: none;
    border: none;
    cursor: pointer;
}

nav .tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav .tabs li {
    margin: 0;
}

nav .tabs a {
    text-decoration: none;
    padding: 10px;
    background: var(--secondary-bg);
    border-radius: 5px;
    color: var(--primary-text);
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}

nav .tabs a.active,
nav .tabs a:hover {
    background-color: var(--highlight-color);
    color: var(--primary-bg);
}

/* =========================================================
   Menu déroulant (petits écrans)
   ========================================================= */
@media (max-width: 768px) {
    nav .hamburger {
        display: block; /* Afficher le bouton hamburger */
    }

    nav .tabs {
        display: none; /* Cacher les onglets par défaut */
        flex-direction: column;
        background-color: var(--secondary-bg);
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        gap: 0;
        border-top: 1px solid var(--highlight-color);
        z-index: 1000; /* Menu au-dessus des autres éléments */
    }

    nav .tabs.show {
        display: flex; /* Montrer les onglets lorsqu'activés */
    }

    nav .tabs li {
        width: 100%; /* Chaque élément prend toute la largeur en mobile */
    }

    nav .tabs a {
        display: block;
        padding: 15px;
        text-align: center;
        border-bottom: 1px solid var(--highlight-color);
    }

    nav .tabs a:last-child {
        border-bottom: none; /* Supprime la bordure pour le dernier lien */
    }
}

/* =========================================================
   Grille pour les sites (cartes)
   ========================================================= */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px; /* Largeur max pour ne pas trop étirer sur grand écran */
}
@media (max-width: 400px) {
    .site-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 200px minimum pour petits écrans */
    }
}

/* =========================================================
   Cartes individuelles
   ========================================================= */
.site-card {
    background: var(--card-bg);
    border: 1px solid var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px var(--card-shadow);
}

.site-card h3 {
    margin: 0 0 15px;
    font-size: 1.2rem;
    color: var(--highlight-color);
    text-align: center;
    border-bottom: 2px solid var(--highlight-color);
    padding-bottom: 10px;
}

/* =========================================================
   Liste des articles
   ========================================================= */
.site-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-card ul li {
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

/* Liens d’articles */
.site-card ul li a {
    text-decoration: none;
    color: var(--primary-text);
    transition: color 0.3s;
    font-size: 0.95rem;
}

.site-card ul li a:hover {
    color: var(--highlight-color);
}

/* =========================================================
   Style des dates
   ========================================================= */
.date-default {
    color: #bdc3c7; /* Gris clair */
    font-weight: bold;
    margin-right: 10px;
}

.date-today {
    color: var(--highlight-color); /* Tungstène */
    font-weight: bold;
    margin-right: 10px;
}

/* =========================================================
   Animation de chargement
   ========================================================= */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--highlight-color);
    font-weight: bold;
    text-align: center;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}
