* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    background: #f6f7f9;
    color: #2b2f36;
    line-height: 1.75;
    font-size: 16px;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 18px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e3e6eb;
}

nav {
    display: flex;
    gap: 30px;
    justify-content: center;
}

nav a {
    color: #4a5568;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.2s;
}

nav a:hover {
    color: #1a202c;
}

.container {
    max-width: 820px;
    margin: 60px auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: #1a202c;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 22px;
}

h2 {
    font-size: 1.6rem;
    margin-top: 55px;
    margin-bottom: 18px;
}

h3 {
    font-size: 1.25rem;
    margin-top: 35px;
    margin-bottom: 12px;
}

p {
    margin-bottom: 20px;
    color: #2f3640;
}

/* 🔧 NEWS CARDS OPTIMISÉES */
.news-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid #475569;
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.news-card h3 {
    color: #f8fafc !important;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.news-card .summary {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-card .date {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-bottom: 12px;
}

.news-card .read-more {
    display: inline-block !important;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    transition: all 0.3s ease;
}

.news-card .read-more:hover {
    background: linear-gradient(135deg, #5a4fcf, #8e7cc7) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

.card {
    background: #ffffff;
    padding: 30px;
    margin-top: 35px;
    border-radius: 14px;
    border: 1px solid #e6e9ef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card p:last-child {
    margin-bottom: 0;
}

.card a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.card a:hover {
    color: #1e40af;
}

.btn, .btn-archive, .btn-retour {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover, .btn-archive:hover, .btn-retour:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

.btn:visited,
.btn:active,
.btn-archive:visited,
.btn-archive:active {
    color: #ffffff !important;
}

input, textarea, select {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #1a202c;
    font-size: 15px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
    display: block;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #1a202c;
}

footer {
    margin-top: 80px;
    padding: 30px 20px;
    text-align: center;
    background: #f0f2f5;
    border-top: 1px solid #e0e4ea;
    color: #667085;
    font-size: 14px;
}

footer a {
    color: #2563eb;
}

footer a:hover {
    color: #1e40af;
}

/* Pagination archives */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.pagination button {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: #4f8cff;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: #2d6dff;
    transform: translateY(-1px);
}

.pagination button.active {
    background: #1a4ed2;
    box-shadow: 0 4px 12px rgba(26, 78, 210, 0.4);
}

/* Listes */
ul {
    margin: 20px 0;
    padding-left: 25px;
}

li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 🌟 WEB APP RESPONSIVE COMPLÈTE (NOUVEAU) */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 0 18px;
        margin: 50px auto;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    nav {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    nav a {
        padding: 12px 20px;
        min-height: 48px;
        display: block;
        font-size: 16px;
    }

    .container {
        max-width: 100%;
        margin: 30px auto;
        padding: 0 15px;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 18px;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.4rem;
        margin-top: 40px;
        margin-bottom: 15px;
    }

    h3 {
        font-size: 1.15rem;
    }

    .card {
        padding: 20px;
        margin-top: 25px;
    }

    .btn, .btn-archive, .btn-retour,
    .news-card .read-more {
        padding: 14px 24px !important;
        min-height: 52px !important;
        font-size: 16px !important;
        display: block !important;
        text-align: center !important;
        width: 100% !important;
        margin: 10px 0;
    }

    .news-card {
        padding: 20px;
        margin: 15px 0;
    }

    input, textarea, select {
        padding: 16px;
        font-size: 16px;
        min-height: 52px;
    }

    footer {
        margin-top: 60px;
        padding: 25px 15px;
    }

    .pagination {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .pagination button {
        width: 100%;
        max-width: 280px;
        padding: 14px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 12px 15px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .card {
        padding: 18px;
    }
}

/* PWA STANDALONE MODE */
@media (display-mode: standalone) and (max-width: 768px) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    header {
        padding-top: calc(18px + env(safe-area-inset-top));
    }
}

/* ORIENTATION LANDSCAPE MOBILE */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}
