@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:ital,wght@0,300;0,400;0,700;1,400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', Arial, sans-serif;
}

h1, h2, h3, h4, .logo {
    font-family: 'Cinzel', Georgia, serif;
}

.nav-banner {
    background: url('images/vague-fond.png') no-repeat left center / contain;
    background-color: #ffffff;
    padding: 1rem 0;
    width: 100%;
    border-bottom: 1px solid #c8321e;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo {
    height: 54px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.1rem;
    flex: 1;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background-color: #fff;
    flex: 1;
}

.content {
    color: #111;
    line-height: 1.6;
}

section {
    margin-bottom: 2rem;
}

section h2 {
    color: #c8321e;
    margin-bottom: 0.5rem;
}

ul {
    list-style-type: none;
    padding-left: 1.5rem;
}

ul li {
    list-style-type: none;
    margin-bottom: 0.3rem;
}

.center {
    text-align: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    color: #c8321e;
    padding: 0 10px;
}

nav {
    width: 100%;
}

nav a {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    margin: 3px 4px;
    transition: color 0.2s;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

nav a:hover {
    color: #c8321e;
}

nav a.active {
    color: #c8321e;
}

main.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    margin-top: 15px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(200, 50, 30, 0.08);
}

h1 {
    color: #c8321e;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 3px solid #c8321e;
    padding-bottom: 10px;
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #333;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

p {
    margin-bottom: 15px;
}

.aikido-info p,
.aikishintaiso-info p,
.contact-info p,
.practice-info p {
    text-align: left;
}

.aikido-info ul,
.aikishintaiso-info ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.aikido-info ul li,
.aikishintaiso-info ul li {
    list-style-type: disc;
}

.facebook-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.post {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #c8321e;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    background-color: #ddd;
}

.post-meta h3 {
    margin-bottom: 5px;
}

.post-date {
    color: #777;
    font-size: 0.9rem;
}

.post-content {
    margin-bottom: 15px;
}

.post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.aikido-info, .aikishintaiso-info, .practice-info, .contact-info {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(200, 50, 30, 0.1);
    margin-bottom: 30px;
    border-left: 4px solid #c8321e;
}

.practice-schedule {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.practice-schedule th, .practice-schedule td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.practice-schedule th {
    background-color: #c8321e;
    color: white;
    font-weight: 600;
}

.practice-schedule tr:nth-child(even) {
    background-color: #f9f9f9;
}

.contact-form {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #c8321e;
    outline: none;
}

.form-group textarea {
    min-height: 150px;
}

button {
    background-color: #c8321e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a01f14;
}

footer {
    background-color: #f0f0f0;
    text-align: center;
    padding: 20px 10px;
    margin-top: auto;
    width: 100%;
    font-size: 0.95rem;
}

/* Dojo filter buttons */
.dojo-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.filter-btn {
    background: #fff;
    border: 2px solid #c8321e;
    color: #c8321e;
    padding: 8px 22px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Lato', Arial, sans-serif;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.03em;
}

.filter-btn:hover,
.filter-btn.active {
    background: #c8321e;
    color: #fff;
}

/* Dojo Cards Styles */
.dojo-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.dojo-card {
    flex: 1 1 calc(33.333% - 20px);
    margin: 10px;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(200, 50, 30, 0.1);
    display: flex;
    flex-direction: column;
    border-left: 5px solid #c8321e;
}

.dojo-card h2 {
    color: #c8321e;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.dojo-card h3 {
    color: #333;
    margin: 20px 0 10px;
    font-size: 1.2rem;
    border-bottom: 2px solid #c8321e;
    padding-bottom: 5px;
}

.dojo-card h4 {
    color: #555;
    margin: 15px 0 10px;
    font-size: 1.1rem;
}

.dojo-card p {
    margin-bottom: 10px;
    line-height: 1.5;
    text-align: left;
}

.dojo-card ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.dojo-card ul li {
    margin-bottom: 8px;
}

/* Mobile nav menu button — hidden on desktop */
.nav-menu-btn {
    display: none;
    background: none;
    border: 1.5px solid #c8321e;
    color: #c8321e;
    padding: 7px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Lato', Arial, sans-serif;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.nav-menu-btn:hover {
    background-color: #c8321e;
    color: #fff;
}

/* Mobile nav: dropdown */
@media (max-width: 599px) {
    .nav-banner { background-image: none; padding: 0.4rem 0; }
    .nav-logo-link { display: none; }
    .nav-inner {
        flex-direction: column;
        align-items: center;
        padding: 0.4rem 1rem;
        gap: 0;
    }
    .nav-menu-btn { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
        padding: 0.5rem 0;
        border-top: 1px solid #eee;
        margin-top: 0.5rem;
    }
    .nav-links.open { display: flex; }
    nav a {
        padding: 10px 16px;
        font-size: 1rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    nav a:last-child { border-bottom: none; }
}

/* Media Queries */
@media (min-width: 480px) {
    .logo {
        font-size: 2rem;
    }
    
    nav a {
        padding: 12px 18px;
        font-size: 1rem;
    }
    
    main.container {
        padding: 20px;
    }
}

@media (min-width: 768px) {
    .container {
        width: 90%;
        padding: 20px;
    }
    
    .logo {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }
    
    nav {
        padding: 10px 0;
    }
    
    nav a {
        padding: 12px 20px;
        margin: 0 8px;
        flex: none;
    }
    
    .facebook-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 0;
    }
    
    .dojo-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
}

@media (min-width: 1024px) {
    .dojo-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 20px;
    }

    .dojo-card {
        flex: 0 0 calc(33.333% - 14px);
        max-width: calc(33.333% - 14px);
        margin: 0;
    }

    /* Center the last card when it sits alone in its row */
    .dojo-card--placeholder:last-child {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Loading message */
.loading-message {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 15px auto;
    max-width: 600px;
    border-left: 4px solid #c8321e;
}

.loading-message p {
    color: #666;
    font-style: italic;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Page visibility */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.page.active {
    display: block;
    opacity: 1;
}

/* Actualités section */
#actualites {
    max-width: 1200px;
    margin: 0 auto;
}

#actualites h1 {
    text-align: center;
    margin-bottom: 40px;
}

#actualites p {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #333;
}

.facebook-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .facebook-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .facebook-posts {
        grid-template-columns: repeat(3, 1fr);
    }
}

.facebook-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
    border-left: 4px solid #c8321e;
}

#facebook-plugin {
    max-width: 500px;
    margin: 0 auto;
}

.loading-message {
    display: none;
}

@media (max-width: 768px) {
    .facebook-container {
        padding: 15px;
    }

    #facebook-plugin {
        width: 100%;
    }

    .dojo-card {
        flex: 1 1 100%;
    }
}

.map-container {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    box-shadow: none;
}

iframe {
    width: 100%;
    height: 300px;
    max-width: 100%;
    border: 0;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    iframe {
        width: 100%;
        height: auto;
    }
} 

/* Facebook content wrapper for centering */
.facebook-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* Facebook posts styling */
.facebook-posts {
    width: 100%;
    margin-top: 20px;
    min-height: 200px;
}

.loading-message {
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    text-align: center;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading animation */
.loading-message:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 3px solid #ddd;
    border-top-color: #c8321e;
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

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

.post {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(200, 50, 30, 0.1);
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    border-left: 4px solid #c8321e;
}

@keyframes fadeIn {
    to {opacity: 1;}
}

/* Add some delay to each post for a nicer effect */
.post:nth-child(1) { animation-delay: 0.1s; }
.post:nth-child(2) { animation-delay: 0.2s; }
.post:nth-child(3) { animation-delay: 0.3s; }
.post:nth-child(4) { animation-delay: 0.4s; }
.post:nth-child(5) { animation-delay: 0.5s; }
.post:nth-child(6) { animation-delay: 0.6s; }

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    overflow: hidden;
    margin-right: 10px;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-meta {
    overflow: hidden;
}

.post-meta h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-date {
    font-size: 12px;
    color: #666;
}

.post-content {
    line-height: 1.4;
}

.post-content p {
    margin-top: 0;
    word-wrap: break-word;
    text-align: left;
}

.post-image {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 4px;
    display: block;
}

.post-link {
    display: inline-block;
    margin-top: 10px;
    color: #c8321e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.post-link:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #fff8f8;
    border-left: 3px solid #c8321e;
}

.error-message p {
    color: #555;
}

.error-message a {
    color: #c8321e;
    text-decoration: none;
    font-weight: 600;
}

.error-message a:hover {
    text-decoration: underline;
}

/* Facebook plugin styling */
.fb-page-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Make the embedded Facebook timeline responsive */
.fb-page {
    width: 100%;
}

.fb-page span,
.fb-page iframe {
    width: 100% !important;
    max-width: 100% !important;
}

/* Static fallback message styling */
.static-fallback-message {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid #c8321e;
    border-left: 4px solid #c8321e;
}

.static-fallback-message p {
    margin: 0;
    color: #555;
}

.static-fallback-message a {
    color: #c8321e;
    font-weight: bold;
    text-decoration: none;
}

.static-fallback-message a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .facebook-content-wrapper {
        padding: 0 10px;
    }
    
    .post {
        padding: 12px;
    }
    
    .post-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .post-meta h3 {
        font-size: 15px;
    }
    
    .post-date {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .post {
        padding: 10px;
    }
    
    .post-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .post-content {
        font-size: 14px;
    }
}

footer {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: #333;
}

.footer-card {
    background-color: #ffffff;
    border: 2px solid #c8321e;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0 auto 1.5rem;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(200, 50, 30, 0.15);
    color: #333;
}

.footer-card h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: normal;
    color: #333;
}

.footer-card a {
    color: #c8321e;
    text-decoration: none;
    font-weight: 700;
}

.footer-card a:hover {
    text-decoration: underline;
}

.footer-copy {
    font-size: 0.85rem;
    color: #666;
}

.footer-highlight {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}
