/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    padding-top: 60px; /* Espace pour le bandeau fixe */
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Bandeau fixe en haut */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background-color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Indicateur PROTOTYPE */
.prototype-indicator {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    color: #FF8C00;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 4px;
    z-index: 10;
    background-color: white;
    padding: 0 10px;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Contenu principal du header - non utilisé mais gardé pour compatibilité */
.header-main-content {
    display: contents;
}

.header-menu-btn {
    background: none;
    border: none;
    color: #384b58;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
    line-height: 1;
}

.header-menu-btn:hover {
    background-color: #f0f2f5;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-search {
    display: flex;
    margin-left: auto;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #384b58;
}

/* Bouton Menu (ancien style - maintenant dans le bandeau fixe) */
/* .menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: #384b58;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.menu-btn:hover {
    background-color: #2a3942;
} */

/* Menu latéral */
.side-menu {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100%;
    background-color: white;
    z-index: 1100;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.side-menu.active {
    left: 0;
}

.menu-header {
    background-color: #384b58;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h2 {
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.menu-content {
    padding: 20px;
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.menu-overlay.active {
    display: block;
}

/* Styles du menu hiérarchique */
.menu-category {
    margin-bottom: 10px;
}

.menu-category-title {
    font-weight: bold;
    color: #384b58;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-category-title:hover {
    background-color: #f0f2f5;
}

.menu-subcategory {
    margin-left: 15px;
    margin-top: 5px;
}

.menu-subcategory-title {
    font-weight: 600;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-subcategory-title:hover {
    background-color: #f0f2f5;
}

/* Style pour les titres de sous-catégories cliquables */
a.menu-subcategory-title.clickable {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.menu-subcategory-title.clickable:hover {
    color: #384b58;
}

.menu-subsubcategory {
    margin-left: 15px;
    margin-top: 5px;
}

.menu-subsubcategory-link {
    display: block;
    padding: 6px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-subsubcategory-link:hover {
    background-color: #e4e6eb;
    color: #384b58;
}

/* En-tête */
.header {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 500px;
    min-height: 400px;
}

.header-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.header-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 20px;
    z-index: 10;
}

.main-title {
    font-size: 48px;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7),
                 0 4px 16px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 20px;
    color: #ffffff;
    line-height: 1.8;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7),
                 0 4px 12px rgba(0, 0, 0, 0.5);
}

.subtitle p {
    margin: 5px 0;
}

.add-page-btn {
    margin-top: 20px;
    background-color: #DD5751;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-shadow: none;
}

.add-page-btn:hover {
    background-color: #c94843;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.add-page-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Sections */
.section {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 32px;
    color: #384b58;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #384b58;
}

/* Ferry Info */
.ferry-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ferry-item {
    background: #f0f2f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #384b58;
}

.ferry-item p {
    font-size: 18px;
    color: #333;
}

/* Ferry datetime */
.ferry-datetime {
    font-size: 18px;
    color: #666;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}

/* Ferry and sponsor container */
.ferry-and-sponsor-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Ferry tables */
.ferry-tables {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Sponsor sidebar */
.sponsor-sidebar {
    flex: 0 0 350px;
    max-width: 350px;
}

.sponsor-sidebar .sponsors-container {
    display: block;
}

.ferry-table-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.ferry-table-container h3 {
    font-size: 22px;
    color: #384b58;
    margin-bottom: 15px;
    text-align: center;
}

.ferry-schedule-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ferry-schedule-table thead {
    background-color: #384b58;
    color: white;
}

.ferry-schedule-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
}

.ferry-schedule-table td {
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ferry-schedule-table tbody tr:last-child td {
    border-bottom: none;
}

/* Événements */
.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.event-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.event-title {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.event-title a {
    color: #384b58;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.event-title a:hover {
    color: #2a3942;
    text-decoration: underline;
}

.event-date {
    font-size: 16px;
    color: #DD5751;
    font-weight: 600;
    margin-bottom: 8px;
}

.event-location {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4e6eb;
}

.event-description {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
}

.event-more-link {
    display: inline-block;
    color: #384b58;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.event-more-link:hover {
    color: #2a3942;
    text-decoration: underline;
}

/* À la Une - utilise la même structure que les sponsors */
.news-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Section vide */
.empty-section {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Infos pratiques */
.infos-pratiques-content {
    display: grid;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-icon {
    flex-shrink: 0;
}

.icon-placeholder {
    font-size: 32px;
    line-height: 1;
}

.info-item p {
    flex: 1;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.info-link {
    color: #384b58;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.info-link:hover {
    color: #2a3942;
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: #384b58;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #EBBD04;
    text-decoration: underline;
}

.footer-contact-btn {
    background-color: #DD5751;
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.footer-contact-btn:hover {
    background-color: #c94843;
}

.footer-copyright {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }
}

/* Pages de catégories */
.category-header {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-title {
    font-size: 36px;
    color: #384b58;
    margin-bottom: 10px;
}

.category-breadcrumb {
    color: #666;
    font-size: 16px;
}

.fb-cards-container,
.sponsors-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Container pour tous les sponsors */
.all-sponsors-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.sponsor-page-widget {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Styles pour les cartes Facebook dans les pages catégories */
.fb-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Overlay pour gérer le scroll des cartes Facebook */
.fb-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(56, 75, 88, 0.05);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
}

.fb-card:hover .fb-card-overlay {
    opacity: 1;
}

.fb-card-overlay.hidden {
    display: none;
}

.fb-card-overlay img {
    transition: transform 0.2s ease;
}

.fb-card:hover .fb-card-overlay img {
    transform: scale(1.1);
}

.fb-feed {
    min-height: 200px;
    position: relative;
}

/* Container pour les posts "À la une" sans wrapper */
.fb-feed-item {
    position: relative;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
    .events-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 1024px) {
    .news-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        height: 450px;
        min-height: 350px;
    }

    .header-text-overlay {
        padding: 15px;
    }

    .main-title {
        font-size: 36px;
    }

    .subtitle {
        font-size: 18px;
    }

    .add-page-btn {
        font-size: 16px;
        padding: 12px 24px;
    }

    .section-title {
        font-size: 28px;
    }

    .ferry-and-sponsor-container {
        flex-direction: column;
    }

    .sponsor-sidebar {
        flex: 1;
        max-width: 100%;
        width: 100%;
    }

    .events-container {
        grid-template-columns: 1fr;
    }

    .news-container {
        grid-template-columns: 1fr;
    }

    .all-sponsors-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .side-menu {
        width: 280px;
        left: -280px;
    }

    /* Ajustements du bandeau fixe pour tablette */
    .fixed-header {
        height: 60px;
        padding: 0 15px;
    }

    .prototype-indicator {
        font-size: 18px;
        letter-spacing: 3px;
    }

    .search-input {
        width: 150px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 55px; /* Espace pour le bandeau sur mobile */
    }

    .container {
        padding: 10px;
    }

    /* Ajustements du bandeau fixe pour mobile */
    .fixed-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 55px;
        padding: 0 10px;
        gap: 10px;
    }

    .prototype-indicator {
        font-size: 14px;
        letter-spacing: 3px;
        top: 1px;
    }

    .header-menu-btn {
        font-size: 20px;
        padding: 6px 10px;
    }

    .header-logo {
        height: 35px;
    }

    .search-input {
        width: 120px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .header {
        height: 400px;
        min-height: 350px;
    }

    .header-text-overlay {
        padding: 10px;
    }

    .section {
        padding: 20px;
    }

    .main-title {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    .ferry-table-container {
        padding: 10px;
    }

    .ferry-table-container h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .ferry-schedule-table th {
        padding: 6px;
        font-size: 13px;
    }

    .ferry-schedule-table td {
        padding: 4px 6px;
        font-size: 13px;
    }

    .ferry-datetime {
        font-size: 14px;
        margin-bottom: 15px;
    }

    /* Force les tableaux à rester côte à côte sur mobile */
    .ferry-tables {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .add-page-btn {
        font-size: 15px;
        padding: 10px 20px;
        margin-top: 15px;
    }

    .all-sponsors-container {
        grid-template-columns: 1fr;
    }
}

/* Loader */
.loader {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

.loader::after {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    margin: 20px auto;
    border: 5px solid #f0f2f5;
    border-top-color: #384b58;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animation pour le menu */
@keyframes slideIn {
    from {
        left: -350px;
    }
    to {
        left: 0;
    }
}

@keyframes slideOut {
    from {
        left: 0;
    }
    to {
        left: -350px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   BANNIÈRE DE CONSENTEMENT AUX COOKIES
   ========================================== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4177 100%);
    color: white;
    padding: 25px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-consent-text h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 600;
}

.cookie-consent-text p {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.95em;
}

.cookie-consent-text a {
    color: #ffd700;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: #ffed4e;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cookie-btn-accept {
    background: #28a745;
    color: white;
}

.cookie-btn-accept:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.cookie-btn-reject {
    background: #dc3545;
    color: white;
}

.cookie-btn-reject:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.cookie-btn-settings {
    background: #6c757d;
    color: white;
}

.cookie-btn-settings:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* Message de contenu Facebook bloqué */
.fb-blocked-message {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.fb-blocked-message p {
    margin-bottom: 10px;
    color: #856404;
}

.fb-blocked-message strong {
    font-size: 1.2em;
    color: #856404;
}

.fb-blocked-message a {
    color: #2c5aa0;
    text-decoration: underline;
    font-weight: 600;
}

.fb-blocked-message a:hover {
    color: #1e4177;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-text h3 {
        font-size: 1.1em;
    }

    .cookie-consent-text p {
        font-size: 0.9em;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-consent-banner {
        padding: 20px 15px;
    }
}
