:root {
    --primary-color: #aa0c28;
    --primary-light: #c13a45;
    --primary-dark: rgba(0, 1, 17, 0.68);
    --secondary-color: #2596be;
    --accent-color: #f8f9fa;
    --text-dark: #333333;
    --text-light: #F8F9FA;
    --bg-light: #ffffff;
    --bg-dark: #f8f9fa;
    --border-color: #e9ecef;
}

/* Base styles */
body {
    padding-top: 130px;
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
}

p, li, a {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Header styles */
header.fixed-top {
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* Search form */
.top-navbar-search .form-control {
    border-radius: 20px 0 0 20px;
    border-color: #dee2e6;
    background-color: #fff;
}

.top-navbar-search .btn {
    border-radius: 0 20px 20px 0;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.top-navbar-search .btn:hover {
    background-color: var(--primary-dark);
}

/* Card styles */
.card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    background-color: #FFF;
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Link styles */
a {
    color: var(--primary-color);
    transition: color 0.2s;
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* Button styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Badge styles */
.badge-light {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-weight: normal;
    transition: all 0.2s;
}

.badge-light:hover {
    background-color: var(--secondary-color);
    cursor: pointer;
}

/* Footer styles */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Alert styles */
.alert-success {
    background-color: #D4EDDA;
    border-color: #C3E6CB;
    color: #155724;
}

.alert-info {
    background-color: #D1ECF1;
    border-color: #BEE5EB;
    color: #0C5460;
}

.alert-warning {
    background-color: #FFF3CD;
    border-color: #FFEEBA;
    color: #856404;
}

.alert-danger {
    background-color: #F8D7DA;
    border-color: #F5C6CB;
    color: #721C24;
}

.limite-texte {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* number of lines to show */
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* PUF-inspired styles */
.section-title {
    position: relative;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.section-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.featured-book {
    position: relative;
    overflow: hidden;
}

.featured-book img {
    transition: transform 0.5s ease;
}

.featured-book:hover img {
    transform: scale(1.05);
}

.book-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-card .card-img-top {
    height: 250px;
    object-fit: cover;
}

.book-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card .card-text {
    flex: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.carousel-control-prev {
    left: -20px;
}

.carousel-control-next {
    right: -20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-indicators {
    bottom: -40px;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}
.book-cover-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.book-cover {
    max-height: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);

}

.book-reflection {
    position: absolute;
    bottom: -20px;
    left: 5%;
    width: 90%;
    height: 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent);
    filter: blur(5px);
    border-radius: 50%;
}

/* Related articles styling */
.related-article-img-container {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.related-article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

/* Ensure consistent card heights */
.row-cols-1.row-cols-md-2 .card {
    height: 140px;
}

/* Truncate long titles */
.card-title.text-truncate {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.text-justify {
    text-align: justify;
}


/* style pour les card articles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.article-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 400px;
    position: relative;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.article-cover-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.article-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-cover {
    transform: scale(1.05);
}

.article-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: var(--primary-color) !important;
    color: white !important;
    z-index: 3;
}

.article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%);
    color: white;
    transform: translateY(70px);
    transition: transform 0.3s ease;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.article-card:hover .article-content {
    transform: translateY(0);
}

.article-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.article-discipline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.article-card:hover .article-discipline {
    opacity: 1;
    transform: translateY(0);
}

.article-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.2s;
}

.article-card:hover .article-date {
    opacity: 1;
    transform: translateY(0);
}

.btn-consult {
    background-color: var(--primary-color);
    color: white;
    border: none;
    /*transition: all 0.3s ease;*/
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.3s;
}

.article-card:hover .btn-consult {
    opacity: 1;
    transform: translateY(0);
}

.btn-consult:hover {
    background-color: white;
    color: var(--primary-color);
}

.section-header {
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.pagination .page-link {
    color: var(--secondary-color);
    border-radius: 4px;
    margin: 0 3px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}


.bg-cv {
    background-color: rgba(37, 150, 190,0.8);
    color: #fff; /* Texte en blanc pour un bon contraste */

}

.text-custom{
    color: #a62933;
}
.btn-cv {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    background-color: #2596be;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-cv-outline {
    background-color: transparent;
    color: #2596be;
    border: 2px solid #2596be;
    padding: 10px 20px; /* Ajuster les dimensions */
    font-size: 16px; /* Taille de la police */
    border-radius: 5px; /* Coins arrondis */
    text-transform: uppercase; /* Texte en majuscules */
    font-weight: bold; /* Texte en gras */
    transition: all 0.3s ease-in-out; /* Animation pour les interactions */
    cursor: pointer;
}

.btn-custom {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    background-color: #2596be;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.bg-custom {
    background-color: #2596be;
    color: #fff; /* Texte en blanc pour un bon contraste */

}

/* Style personnalisé pour les onglets de séries */
.series-tab {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.series-tab .nav-tabs {
    border-bottom: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.series-tab .nav-item {
    margin-bottom: 0.5rem;
}

.series-tab .nav-link,
.series-tab .nav-item {
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    color: #495057;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.series-tab .nav-link:hover,
.series-tab .nav-item:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #212529;
}

.series-tab .nav-link.active,
.series-tab .nav-item.active {
    color: #fff;
    background-color: #a62933; /* Couleur principale - à adapter selon votre charte graphique */
    border-color: #a62933;
    box-shadow: 0 2px 5px rgba(13, 110, 253, 0.2);
}

/* Style pour les écrans mobiles */
@media (max-width: 768px) {
    .series-tab .nav-tabs {
        justify-content: center;
    }

    .series-tab .nav-link,
    .series-tab .nav-item {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animation subtile au survol */
.series-tab .nav-link,
.series-tab .nav-item {
    position: relative;
    overflow: hidden;
}

.series-tab .nav-link:after,
.series-tab .nav-item:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #a62933;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.series-tab .nav-link:hover:after,
.series-tab .nav-item:hover:after {
    width: 80%;
}

.series-tab .nav-link.active:after,
.series-tab .nav-item.active:after {
    width: 0; /* Pas besoin de soulignement pour l'onglet actif */
}

/* Breadcrumbs styling */
.page-header {
    margin-bottom: 2rem;
}

.page-header h3 {
    color: var(--primary-color);
}

ul.breadcrumbs {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

ul.breadcrumbs li {
    display: flex;
    align-items: center;
}

ul.breadcrumbs li.nav-home a {
    font-size: 1.2rem;
    color: var(--primary-color);
}

ul.breadcrumbs li.separator {
    margin: 0 10px;
    color: #ccc;
}

ul.breadcrumbs li.separator i {
    font-size: 0.8rem;
}

ul.breadcrumbs li.nav-item a {
    color: #6c757d;
    text-decoration: none;
}

ul.breadcrumbs li.nav-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
