/* Rules Page Specific Styles */
.rules-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.rules-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    border-radius: 15px;
    margin-bottom: 3rem;
    color: #8B7355;
}

.rules-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #8B7355;
}

.rules-hero h1 .game-title {
    font-size: 3.5rem;
    display: inline-block;
}

.rules-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rules-section h2 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.rules-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Card Grid Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: #fdf1dc;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Composition du jeu */
.card-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.card-category {
    background: #fdf1dc;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-category h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.card-category ul {
    list-style-type: none;
    padding-left: 0;
}

.card-category li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.card-category li::before {
    content: "•";
    color: var(--color-primary);
    position: absolute;
    left: 0;
}

/* Déroulement du jeu */
.setup-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    background: #fdf1dc;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.step p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Règles importantes */
.important-rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.rule-item {
    background: #fdf1dc;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rule-item h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.rule-item p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.rule-item ul {
    list-style-type: none;
    padding-left: 0;
}

.rule-item li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.rule-item li::before {
    content: "→";
    color: var(--color-primary);
    position: absolute;
    left: 0;
}

/* Modal Styles */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal {
    display: none;
    position: relative;
}

.modal.active {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.modal-content img {
    width: 200px;
    height: auto;
    margin: 1rem auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #000;
}

.mythology {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    border-radius: 10px;
}

.mythology h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.mythology p {
    font-style: italic;
    line-height: 1.6;
}

/* Learn More Button */
.learn-more {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.learn-more:hover {
    background-color: #6d5842;
    transform: translateY(-2px);
}

/* Modal Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Animations de défilement */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Bouton retour en haut */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: none;
    font-size: 24px;
    font-weight: bold;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #6b593f;
    transform: translateY(-3px);
}

/* Animation de l'icône */
.back-to-top i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-2px);
}


/* Thème sombre */
[data-theme="dark"] .rules-hero {
    background: linear-gradient(135deg, #2C2C2C, #353535);
    color: #E8E8E8;
}

[data-theme="dark"] .rules-section {
    background: #252525;
    color: #E8E8E8;
}

[data-theme="dark"] .rules-section h2 {
    color: var(--color-primary);
}

[data-theme="dark"] .card {
    background: #2C2C2C;
    color: #E8E8E8;
}

[data-theme="dark"] .card-category {
    background: #2C2C2C;
    color: #E8E8E8;
}

[data-theme="dark"] .rule-item {
    background: #2C2C2C;
    color: #E8E8E8;
}

[data-theme="dark"] .step {
    background: #2C2C2C;
    color: #E8E8E8;
}

[data-theme="dark"] .modal-content {
    background: #252525;
    color: #E8E8E8;
}

[data-theme="dark"] .close-button {
    color: #E8E8E8;
}

[data-theme="dark"] .back-to-top {
    background: #2C2C2C;
    color: #E8E8E8;
}

[data-theme="dark"] .back-to-top:hover {
    background: #353535;
}

/* Game Presentation */
.game-presentation {
    text-align: center;
}

.game-presentation p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.game-image {
    margin: 2rem auto;
    max-width: 800px;
}

.feature-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Features */
.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: var(--color-background);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* How to Play */
.how-to-play {
    text-align: center;
}

.step {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-background);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
}

/* Testimonials */
.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial {
    padding: 2rem;
    background: var(--color-background);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial cite {
    color: var(--color-primary);
    font-weight: 500;
}

/* CTA Section */
.cta-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cta-card {
    text-align: center;
    padding: 2rem;
    background: var(--color-background);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cta-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.cta-card p {
    margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .features-container,
    .testimonials,
    .cta-container {
        grid-template-columns: 1fr;
    }

    .feature,
    .testimonial,
    .cta-card {
        padding: 1.5rem;
    }

    .game-presentation p {
        font-size: 1rem;
    }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .feature,
[data-theme="dark"] .step,
[data-theme="dark"] .testimonial,
[data-theme="dark"] .cta-card {
    background: var(--color-background-alt);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card {
    background: var(--color-background);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: var(--color-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-content h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.news-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Newsletter */
.newsletter-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-container p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.member-image {
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 15px;
}

.member-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.member-image:hover img {
    transform: scale(1.05);
}

/* Contact Section */
.contact-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-section h2 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    padding: 1rem;
}

.contact-item h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-form {
    background: #8B7355;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-section {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .contact-form {
    background: #8B7355;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--color-background);
    color: var(--color-text);
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact-form {
    background: var(--color-background);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--color-background);
    color: var(--color-text);
    transition: border-color 0.3s ease;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Dark Theme Adjustments */
[data-theme="dark"] .contact-form {
    background: var(--color-background-alt);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--color-background-alt);
    border-color: var(--color-border-dark);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-text {
        order: -1;
    }

    .member-image img {
        height: 200px;
    }
}

/* Contact Section in About Page */
.contact-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.contact-section h2 {
    margin-bottom: 1rem;
    text-align: center;
}

.contact-grid {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    max-width: 300px;
}

.contact-item {
    padding: 0.5rem 1rem;
    background: var(--color-background);
    border-radius: 8px;
    text-align: center;
}

.contact-item h3 {
    color: var(--color-primary);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.contact-item p {
    font-size: 0.9rem;
    line-height: 1.4;
}

.contact-form {
    background: #8B7355;
    padding: 1.2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 0;
    flex: 1;
    max-width: 500px;
}

.form-group {
    margin: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
}

.contact-form input {
    height: 38px;
}

.contact-form textarea {
    height: 80px;
    resize: none;
}

.contact-form .learn-more {
    background: white;
    color: #8B7355;
    border: none;
    padding: 0.7rem 1.5rem;
    width: 100%;
    height: 38px;
}

.contact-form .learn-more:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

/* Dark Theme Adjustments */
[data-theme="dark"] .contact-form {
    background: #8B7355;
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    background: var(--color-background);
    color: var(--color-text);
}

[data-theme="dark"] .contact-form .learn-more {
    background: var(--color-background);
    color: var(--color-text);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .contact-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-info {
        max-width: none;
    }

    .contact-form {
        max-width: none;
    }
}
