/* ===== RESET GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #5e0018;
    --secondary-color: #bbbbbb;
    --text-color: #34495e;
    --light-color: #cccccc;
    --dark-color: #7e0018;
    --font-primary: 'Oswald', sans-serif;
    --font-secondary: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    --transition-default: all 0.3s ease;
}

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--primary-color);
}


/* ===== BANNIÈRE ===== */
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    color: white;
    height: 100px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-color);
    background-image:
        linear-gradient(rgba(94, 0, 24, 0.7), rgba(94, 0, 24, 0.7)),
        url('/images/team.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 2px solid var(--light-color);
    position: relative;
}

.banner-left, .banner-right {
    flex: 0 0 100px;
    display: flex;
    justify-content: center;
}

.banner-who {
    flex: 0 0 130px;
    display: flex;
    justify-content: center;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 12px;
    font-style: italic;
    width: 100px;
}

.banner-center {
    flex: 1;
    text-align: center;
    margin-left: 160px;
    width: calc(100% - 160px);
}

.banner-logo {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    transition: var(--transition-default);
}

.banner-logo:hover {
    transform: scale(1.1);
}

.gothic-title {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Bouton Hamburger (masqué par défaut) */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: absolute;
    left: 10px;
    top: 10px;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: var(--transition-default);
}

/* ===== CONTENEUR PRINCIPAL ===== */
.container {
    display: flex;
    flex: 1;
    margin: 0;
    padding: 0;
    height: calc(100vh - 100px);
}

/* ===== MENU LATÉRAL GAUCHE ===== */
.sidebar {
    width: 220px;
    background-color: var(--primary-color);
    border-right: 1px solid #ddd;
    padding: 15px 0;
    position: sticky;
    top: 0;
    height: 100%;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    z-index: 100;
    margin: 0;
    transition: var(--transition-default);
}

.sidebar.hidden {
    display: none;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: var(--transition-default);
    padding: 5px 10px;
    border-radius: 4px;
}

.sidebar-menu a:hover {
    color: var(--primary-color);
    background-color: var(--light-color);
    transform: scaleX(1);
}

.sidebar-menu a.active {
    color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
}

.sidebar-menu i {
    margin-right: 10px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--primary-color);
    transform: scaleY(0);
    transition: var(--transition-default);
    border-radius: 0 3px 3px 0;
}

.sidebar-menu li:hover a::before {
    transform: scaleY(1);
}

/* ===== CONTENU PRINCIPAL ===== */
.main-content {
    flex: 1;
    padding: 20px;
    min-height: 100%;
    position: relative;
    background-color: var(--primary-color);
    overflow-y: auto;
    overflow-x: hidden;
    font-family: var(--font-secondary);
    font-size: 22px;
    color: var(--secondary-color);
}

.content-left {
    color: var(--secondary-color);
}

.content-left ul {
    list-style: none;
    padding-left: 0;
}

.content-left li {
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.content-left li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 8px;
    background-color: #4a2208;
    border: 1px solid #34495e;
    border-radius: 60%;
    box-shadow:
        0 0 0 2px white,
        -4px 0 0 1px #34495e,
        4px 0 0 1px #34495e;
}

.content-left h3 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: bold;
}

.content-left h1 {
    font-size: 25px;
    margin-bottom: 20px;
}

.content-left h2 {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-style: italic;
    font-weight: bold;
    font-size: 20px;
    margin-top: 20px;
    padding-bottom: 20px;
}

.content-left a {
    font-size: 25px;
    margin-bottom: 20px;
    text-decoration: none;
    color: #ffffff;
}

.content-left a:hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
}

.content-left p {
    margin-top: 20px;
    margin-bottom: 20px;
}

.content-logo {
    position: fixed;
    top: 120px;
    right: 50px;
    z-index: 1000;
    width: 120px;
}

.logo-img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    transition: var(--transition-default);
    width: 130px;
    height: auto;
}

.logo-img:hover {
    transform: scale(1.1);
}

/* ===== LOGIN FORM ===== */
.login-container {
    max-width: 450px;
    margin: 2rem auto;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-container h3 {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    font-size: 23px;
    color: var(--primary-color);
    font-weight: bold;
    padding-bottom: 10px;
}

.login-container h4 {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: lighter;
    font-style: italic;
    padding-bottom: 10px;
}

.login-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #cfcfcf;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.btn-login {
    background: var(--primary-color);
    color: #ffffff;
    padding: 0.875rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: #c62828;
}

.login-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ===== STORY FORM ===== */
.story-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 70%;
}

.story-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.story-form label {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 0.95rem;
}




.btn-share {
    background: var(--dark-color);
    color: #ffffff;
    padding: 0.875rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.btn-share:hover {
    background: #c62828;
}

/* ===== CAROUSEL ===== */
.media-carousel-container {
    width: 90%;
    max-width: 1000px;
    margin: 0 5px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    height: 100%;
}

.media-carousel {
    width: 100%;
    height: 100%;
}

.media-carousel .swiper-wrapper {
    width: 100% !important;
    height: 100%;
    display: flex;
    align-items: flex-start;
}

.media-carousel .swiper-slide {
    width: 100% !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.media-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    margin: 0;
    text-align: left;
}

.media-info {
    width: 100%;
    padding: 1px 8px 2px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    margin: 0;
    text-align: left;
    line-height: 1;
}

.media-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-wrap: wrap;
    margin-left: 30px;
}

.media-legend {
    font-weight: 600;
    margin: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    text-align: left;
    padding-left:5px;
    line-height: 1;
}

.media-meta {
    display: flex;
    gap: 4px;
    font-size: 0.65rem;
    opacity: 0.8;
    align-items: center;
    margin: 0;
    text-align: left;
    line-height: 1;
}

.media-meta i {
    margin-right: 1px;
    font-size: 0.65rem;
}

.media-content {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    background-color: transparent;
    margin: 0;
    padding: 0;
    display: block;
    align-self: flex-start;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.media-content.loaded {
    opacity: 1;
}

.media-carousel video {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    margin: 0;
    padding: 0;
    align-self: flex-start;
}

.audio-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: auto;
    max-height: 100%;
    padding: 0;
    margin: 0;
}

.audio-container audio {
    width: 80%;
    height: auto;
    max-height: calc(100% - 20px);
    margin: 0;
    padding: 0;
    align-self: flex-start;
}

.audio-placeholder {
    color: #4a90e2;
    opacity: 0.7;
    margin: 2px 0 0 0;
    font-size: 1.2rem;
    text-align: left;
}

.media-carousel .swiper-button-next,
.media-carousel .swiper-button-prev {
    color: #000;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 37px;
}

.media-carousel .swiper-button-next {
    right: 60px;
}

.media-carousel .swiper-button-prev {
    left: 10px;
}

.media-carousel .swiper-button-next::after,
.media-carousel .swiper-button-prev::after {
    font-size: 0.8rem;
    font-weight: bold;
}

.media-carousel .swiper-pagination-bullet {
    background-color: #4a90e2 !important;
    opacity: 0.4;
    width: 6px;
    height: 6px;
    margin: 0 3px !important;
}

.fullscreen-btn {
    margin-left: auto;
    background: transparent;
    color: #ffffff;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    transition: var(--transition-default);
    z-index: 10;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    position: absolute;
    right: 15px;
}

/* ===== ARTICLES ===== */
.articles-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 10px;
    width: 85%;
}

.articles-container.detail {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 10px;
    width: 100%;
}

.article-card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 10px;
    transition: var(--transition-default);
    border: 1px solid #e0e0e0;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

.article-header {
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
    flex-grow: 1;
}

.article-header h2 {
    margin: 0;
    font-size: 0.95rem;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-header a {
    color: inherit;
    text-decoration: none;
}

.article-header a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.75rem;
    margin: 2px 0 0 0;
    padding: 0;
}

.article-content {
    color: #34495e;
    font-size: 0.85rem;
    margin-top: 2px;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

.article-content p {
    margin: 0;
    padding: 0;
}

.article-header-detail {
    background-color: var(--primary-color);
    width: 80%;
    display: flex;          /* Active Flexbox */
    align-items: center;    /* Centre verticalement */
    justify-content: center; /* Centre horizontalement (optionnel) */
    padding: 2px;
}

.article-header-detail h2 {
    margin: 0;
    font-size: 1.95rem;
    color: var(--secondary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
    padding-left: 10px;
}

.article-meta-detail {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.75rem;
    margin: 2px 0 0 0;
    padding: 0;
    gap: 10px;
}

.article-content-detail {
    display: block;
    padding: 10px;
    width: 80%;
}

.back-link {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 30px;
    padding-right: 5px;
}


/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 2px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition-default);
    line-height: 1;
}

.page-link i {
    font-size: 0.7rem;
    margin: 0 1px;
}

.page-link:hover {
    background-color: #f0f0f0;
    border-color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--dark-color);
}

.story-edit {
    background: var(--dark-color);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    color: white;
    width: 35px;
    height: 35px;
}


/* ===== ERROR MESSAGE ===== */
.error-message {
    text-align: center;
    color: #e74c3c;
    font-style: italic;
    margin: 20px 0;
    padding: 10px;
    background-color: #fdecea;
    border-radius: 4px;
    border: 1px solid #e74c3c;
}

/* Style du lien (bouton) */
.sign-btn {
    position: relative; /* Obligatoire pour positionner l'infobulle par rapport au lien */
    width: 40px;
    height: 40px;
    background: var(--dark-color);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    color: white;
}

.sign-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Style de l'icône */
.sign-btn i {
    font-size: 1.2rem;
}

/* Style de l'infobulle (masquée par défaut) */
.user-tooltip {
    visibility: hidden;
    width: 180px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    top: 100%; /* Positionne l'infobulle EN DESSOUS du lien */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-top: 10px; /* Espace entre le bouton et l'infobulle */
}

.user-tooltip small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Afficher l'infobulle au survol */
.sign-btn:hover .user-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Style du lien (bouton) */
.story-edit {
    position: relative; /* Obligatoire pour positionner l'infobulle par rapport au lien */
    width: 30px;
    height: 30px;
    background: var(--dark-color);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    color: #ccc;
}

.story-edit:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* Style de l'icône */
.story-edit i {
    font-size: 1rem;
}

.published {
    display: inline;
}

.hommage {
  width: 50%;
  margin: auto;
  font-size: 12px;
  display: block;
}

.hommage h1 {
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.hommage img {
   width: 80%;
}


