/* ===========================
   Structure & Base
=========================== */
body {
    background: #fdf6e3 url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    font-family: "Georgia", serif;
    color: #333;
    line-height: 1.6;
    padding-top: 40px;
}

.container {
    max-width: 1000px;
}

/* ===========================
   Header & Navbar
=========================== */
header {
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    background-color: #fdf6e3;
    background-image: url('https://justarigolo.fr/justarigolo/public/caroussel_CRUD/uploads/logoCeleste.jpeg');
    background-repeat: no-repeat;
    background-position: start;
    background-size: contain;
    border-bottom: 2px solid silver;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(0,0,0,0.05) 100%);
}

.navbar-brand img {
    height: 80px;
    width: auto;
}

.navbar a,
a:link {
    text-decoration: none;
    margin-right: 0;
}

a, a:link {
    color: darkred !important;
    text-decoration: none;
    margin-right: 1em;
    text-transform: uppercase;
}

/* ===========================
   Titre principal
=========================== */
.titre {
    font-family: "Georgia", serif;
    font-size: 3rem;
    font-weight: bold;
    color: #003366;
    position: relative;
    margin-top: 2em;
    padding: 0 1rem;
    line-height: 3rem;
    text-align: center;
    text-shadow: 2px 2px 0px #ccc, 4px 4px 0px rgba(0,0,0,0.1), 6px 6px 0px rgba(0,0,0,0.05);
    background-color: rgba(255,255,255,0.6);
    display: inline-block;
}

.titre i {
    font-style: italic;
    color: #222;
    text-transform: uppercase;
}

.titre small {
    font-size: 0.5em;
    margin-left: 2em;
}

/* ===========================
   Articles
=========================== */
.article-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.article-chapeau {
    border-left: 3px solid #007bff;
    padding-left: 0.5rem;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.article-comment {
    margin-left: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.article-category img {
    width: 100%;
    height: 200px;
}

/* ===========================
   Listes d’articles
=========================== */
#articlesList {
    display: block;
    
}

#articlesList > div {
    flex: 0 0 600px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    padding: 1rem 1.2rem;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-height: 90%;
    overflow: scroll;
}

#articlesList > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

/* Checklist */
#articlesCheckList {
    height: 300px;
    overflow: auto;
}

/* ===========================
   Typographie article
=========================== */
.article-rubrique {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    color: #d32f2f;
    margin-bottom: 0.25rem;
}

.article-surtitre {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.article-titre {
    font-weight: 800;
    font-size: 1.3rem;
    color: #222;
    margin: 0.5rem 0;
}

.article-sous-titre {
    font-size: 1rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.article-article p {
    font-size: 0.9rem;
    color: #222;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.article-date {
    font-size: 0.8rem;
    color: #888;
}

.article-signature {
    font-weight: 600;
    color: #007bff;
    text-align: right;
}

/* ===========================
   Navigation
=========================== */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 50px 0;
}

.nav-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #f5f5f0;
    border: 3px solid #000;
    box-shadow: 5px 5px 0 #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.arrow {
    width: 28px;
    height: 28px;
    pointer-events: none;
}

.nav-btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 #000;
    background: #fff;
}

.nav-btn:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 #000;
}

.nav-btn.prev {
    transform: rotate(-2deg);
}

.nav-btn.next {
    transform: rotate(2deg);
}

/* ===========================
   Vignettes & Médias
=========================== */
.vignette {
    width: 100px;
    height: auto;
}

.photoProfil {
    height: 200px;
    width: auto;
}

#preview-container {
    width: 400px;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    border: 8px solid silver;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    border-radius: 6px;
}

#id-photo-container {
    width: 35mm;
    height: 45mm;
    overflow: hidden;
    position: relative;
    border: 2px solid silver;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    background: #fff;
}

#preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
}

video, canvas {
    display: none;
}

#id-photo-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.card-img-articlesOwl{
    max-height: 80px;
    width: auto;
}

/* ===========================
Mode nuit
=========================== */
body.night-mode {
    background: #1e1e1e;
    color: #f0f0f0;
}

body.night-mode .article-card {
    background: #2a2a2a;
    color: #f5f5f5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

body.night-mode .article-chapeau {
    border-left-color: #9c6dfc;
}

body.night-mode a,
body.night-mode a:link {
    color: #c5a3ff !important;
}

body.night-mode header {
    filter: brightness(0.9) contrast(1.1);
}

.theme-toggle-btn {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #212529;
    margin-left: 10px;
    font-size: 0.9rem;
}

body.night-mode .theme-toggle-btn {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

/* ===========================
Scrollbars
=========================== */
#articlesList::-webkit-scrollbar {
    height: 8px;
}

#articlesList::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

#articlesList::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

#articlesList::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* ===========================
Responsive
=========================== */
@media (max-width: 768px) {
    #articlesList {
        flex-direction: column;
        overflow-x: hidden;
    }
    #articlesList > div {
        width: 100%;
    }
}
