/* ============================================
   KARTING-SUD v2.3 - THÈME NOIR
   ============================================ */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
    background-color: #1a1a1a;
    padding-top: 130px;
}

a {
    color: #4da6ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Bandeau publicitaire - 130px FIXE EN HAUT */
.pub-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #000000;
    text-align: center;
    padding: 0;
    border-bottom: 1px solid #333;
}

.pub-banner a {
    display: block;
}

.pub-banner img {
    height: 130px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Décalage du body pour compenser le bandeau fixe */
body {
    padding-top: 130px;
}

/* Header avec logo - THÈME NOIR */
.main-header {
    background-color: #0d0d0d;
    padding: 10px 20px;
    border-bottom: 2px solid #4da6ff;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-container {
    flex-shrink: 0;
}

.logo {
    height: 60px;
    width: auto;
}

/* Bloc titre + accueil empilés verticalement */
.title-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.breadcrumb {
    margin: 0;
}

.breadcrumb a {
    color: #4da6ff;
    font-size: 12px;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: #80c1ff;
}

/* Titre de l'album dans le header */
.album-title-header {
    font-size: 20px;
    color: #ffffff;
    font-weight: bold;
    margin: 0;
}

/* Ancien titre séparé - SUPPRIMÉ */
.album-title {
    display: none;
}

/* Boutons d'action - À DROITE DU HEADER - NOUVEAU DESIGN */
.action-buttons {
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.action-buttons a {
    text-decoration: none;
}

.btn-hd,
.btn-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: #ffffff !important;
}

.btn-hd::before {
    content: "🖼";
    font-size: 16px;
}

.btn-hd {
    background-color: #d32f2f;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-hd:hover {
    background-color: #b71c1c;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-help::before {
    content: "❓";
    font-size: 16px;
}

.btn-help {
    background-color: #666666;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-help:hover {
    background-color: #555555;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive header */
@media (max-width: 968px) {
    body {
        padding-top: 100px;
    }
    
    /* Centrage pub tablet */
    .pub-banner {
        padding: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .header-container {
        gap: 10px;
    }
    
    .pub-banner img {
        height: 100px;
        max-width: 100%;
        object-fit: contain;
    }
    
    .logo {
        height: 50px;
    }
    
    .album-title-header {
        font-size: 18px;
    }
    
    .title-block {
        order: 4;
        width: 100%;
        align-items: center;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    /* Centrage pub mobile */
    .pub-banner {
        padding: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .pub-banner img {
        height: 80px;
        max-width: 100%;
        object-fit: contain;
    }
    
    .header-container {
        flex-direction: column;
    }
    
    .album-title-header {
        font-size: 16px;
        text-align: center;
    }
    
    .title-block {
        width: 100%;
        align-items: center;
    }
    
    .action-buttons {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons a {
        flex: 1;
        text-align: center;
    }
}

/* Navigation pagination */
.pagination-top,
.pagination-bottom {
    background-color: #1a1a1a;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.pagination-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Barre de recherche */
.search-box {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #262626;
    border-radius: 4px;
    padding: 5px;
}

.search-input {
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 8px 12px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4da6ff;
    background-color: #262626;
}

.search-input::placeholder {
    color: #777;
}

.btn-clear {
    background-color: #333;
    border: none;
    color: #e0e0e0;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background-color: #ff3333;
    color: #fff;
}

/* Message aucun résultat */
.no-result-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 16px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination-bottom {
    border-top: 1px solid #333;
    border-bottom: none;
    margin-top: 20px;
}

.nav-arrow {
    color: #4da6ff;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 15px;
    background-color: #262626;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background-color: #333;
    text-decoration: none;
}

.nav-arrow.disabled {
    color: #555;
    cursor: not-allowed;
    background-color: #1f1f1f;
}

/* Navigation rapide par numéros */
.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-num {
    display: inline-block;
    padding: 8px 12px;
    min-width: 40px;
    text-align: center;
    background-color: #262626;
    color: #4da6ff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-num:hover {
    background-color: #333;
    text-decoration: none;
}

.page-num.current {
    background-color: #4da6ff;
    color: #ffffff;
    font-weight: bold;
    cursor: default;
}

/* Indicateur page à droite */
.page-indicator {
    background-color: #262626;
    padding: 10px 20px;
    font-size: 14px;
    color: #aaa;
    border-radius: 4px;
    white-space: nowrap;
}

.page-indicator strong {
    color: #e0e0e0;
    font-weight: bold;
}

/* Responsive pagination */
@media (max-width: 968px) {
    .pagination-container {
        flex-direction: column;
    }
    
    .page-indicator {
        order: -1;
    }
}

@media (max-width: 768px) {
    .page-numbers {
        gap: 3px;
    }
    
    .page-num {
        padding: 6px 8px;
        min-width: 32px;
        font-size: 12px;
    }
    
    .nav-arrow {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Galerie de vignettes - HAUTE QUALITÉ 240px */
.gallery-grid {
    background-color: #1a1a1a;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.thumb-item {
    text-align: center;
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.thumb-item:hover {
    box-shadow: 0 4px 8px rgba(77, 166, 255, 0.3);
    transform: translateY(-2px);
}

.thumb-item a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
}

.thumb-item img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    display: block;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 10px;
}

.thumb-filename {
    display: block;
    padding: 8px 5px;
    font-size: 12px;
    color: #4da6ff;
    font-weight: normal;
    word-break: break-all;
}

.thumb-item:hover .thumb-filename {
    text-decoration: underline;
}

/* PAGE SLIDE */
.slide-page {
    background-color: #1a1a1a;
}

/* Navigation slide */
.slide-navigation {
    background-color: #1a1a1a;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.slide-navigation-bottom {
    border-top: 1px solid #333;
    border-bottom: none;
    margin-top: 20px;
}

.nav-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4da6ff;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: #0052a3;
    text-decoration: none;
}

.nav-btn.disabled {
    background-color: #ccc;
    color: #aaa;
    cursor: not-allowed;
}

.nav-btn.gallery {
    background-color: #2e7d32;
}

.nav-btn.gallery:hover {
    background-color: #1b5e20;
}

.nav-btn.download {
    background-color: #ff3333;
    color: #ffffff;
    font-weight: bold;
}

.nav-btn.download:hover {
    background-color: #ff6666;
}

/* Container de l'image */
.slide-container {
    background-color: #1a1a1a;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.slide-image-wrapper {
    text-align: center;
    margin-bottom: 15px;
}

.slide-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.slide-filename {
    text-align: center;
    font-size: 14px;
    color: #aaa;
    padding: 10px;
    font-style: italic;
}

/* Section info et téléchargement */
.slide-info-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.download-box,
.metadata-box {
    background-color: #1a1a1a;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.download-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn-download-hd {
    display: inline-block;
    padding: 15px 30px;
    background-color: #d32f2f;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-download-hd:hover {
    background-color: #b71c1c;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
}

.download-note {
    font-size: 12px;
    color: #aaa;
    margin: 0;
}

.download-note a {
    color: #4da6ff;
}

.download-info {
    font-size: 11px;
    color: #777;
    margin: 10px 0 0 0;
    font-style: italic;
}

/* Boutons de partage social */
.share-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.share-label {
    font-size: 13px;
    color: #e0e0e0;
    font-weight: 500;
    margin-right: 5px;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-share svg {
    width: 20px;
    height: 20px;
}

.btn-facebook {
    background-color: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background-color: #0c63d4;
}

.btn-twitter {
    background-color: #000000;
    color: white;
}

.btn-twitter:hover {
    background-color: #333333;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1da851;
}

.btn-pinterest {
    background-color: #e60023;
    color: white;
}

.btn-pinterest:hover {
    background-color: #c60018;
}

.btn-copy {
    background-color: #4da6ff;
    color: white;
}

.btn-copy:hover {
    background-color: #0052a3;
}

/* Responsive partage */
@media (max-width: 768px) {
    .share-buttons {
        margin: 10px 0;
    }
    
    .btn-share {
        width: 36px;
        height: 36px;
    }
}

/* Métadonnées */
.metadata-box h3 {
    font-size: 16px;
    color: #e0e0e0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4da6ff;
}

.meta-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: bold;
    color: #555;
    min-width: 150px;
    flex-shrink: 0;
}

.meta-value {
    color: #e0e0e0;
    flex: 1;
}

.keyword-tag {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin: 2px;
}

/* Footer */
.main-footer {
    background-color: #0d0d0d;
    color: #e0e0e0;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    font-size: 13px;
    border-top: 1px solid #333;
}

.main-footer p {
    margin: 5px 0;
}

.generator {
    color: #777;
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Bandeau pub mobile - centré */
    body {
        padding-top: 90px;
    }
    
    .pub-banner {
        padding: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .pub-banner img {
        height: 80px;
        max-width: 100%;
        object-fit: contain;
    }
    
    /* Header mobile */
    .main-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .header-left {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .breadcrumb {
        text-align: center;
        padding: 10px 0 0 0;
    }
    
    .album-title-header {
        text-align: center;
    }
    
    /* Boutons header - sur une ligne et plus petits */
    .action-buttons {
        width: 100%;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
    }
    
    .btn-hd,
    .btn-help {
        flex: 1;
        max-width: 180px;
        padding: 8px 10px;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Texte court pour mobile */
    .btn-hd {
        font-size: 0;
    }
    
    .btn-hd::before {
        content: "🖼";
        font-size: 14px;
        margin-right: 4px;
    }
    
    .btn-hd::after {
        content: "Photos HD";
        font-size: 11px;
    }
    
    .btn-help::before {
        font-size: 14px;
    }
    
    /* Navigation slides - 2 lignes (2x2) */
    .nav-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    .nav-btn {
        width: 100%;
        max-width: none;
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* Galerie */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .thumb-item img {
        height: 150px;
    }
    
    .slide-info-section {
        grid-template-columns: 1fr;
    }
    
    .meta-row {
        flex-direction: column;
    }
    
    .meta-label {
        min-width: auto;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .album-title h1 {
        font-size: 18px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .thumb-item img {
        height: 150px;
    }
    
    .logo {
        height: 50px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.thumb-item {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-image {
    animation: fadeIn 0.5s ease-in-out;
}
