@font-face {
    font-family: 'CarroisGothicSC';
    src: url('../fonts/carroisgothicsc-regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'muli';
    src: url('../fonts/muli.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'muli';
    src: url('../fonts/muli-bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'muli';
    src: url('../fonts/muli-italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-image: linear-gradient(to bottom, #b3995b, #bba36b, #c3ad7c, #cab88c, #d2c29d);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

h2 {
    font-family: 'CarroisGothicSC', sans-serif;
    margin-top: 2rem;
}

p,
li,
.cal-text {
    font-family: 'muli', serif;
}

a {
    color: #B3995B;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.home-button {
    font-family: 'CarroisGothicSC', sans-serif;
    background: #FAF9F6;
    border: solid rgb(30, 41, 59);
    box-shadow: 4px 4px 0 rgb(30, 41, 59);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.home-button:hover {
    background: #F6EED4;
    text-decoration: none;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.2rem;
}

.logo {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(0);
    opacity: 0.8;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0 4rem 0;
}

.synaxar-img {
    float: left;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    margin: 1rem 15px 10px 0;
    border-radius: 3px;
}

iframe {
    width: 100%;
    height: 360px;
    border: none;
    border-radius: 8px;
}

.accordion {
    background: #FAF9F6;
    border: solid;
    border-radius: 8px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.accordion-header {
    font-family: 'CarroisGothicSC', sans-serif;
    cursor: pointer;
    padding: 1rem;
    font-size: medium;
    background: #FAF9F6;
    border: none;
    width: 100%;
    text-align: left;
}

.accordion-header-parishes {
    display: flex;
    align-items: center;
}

.accordion-content {
    font-family: 'CarroisGothicSC', sans-serif;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1rem;
    background: #FAF9F6;
}

.accordion-content p {
    margin: 1rem 0 0.5rem 0;
}

.accordion.active .accordion-content {
    padding-bottom: 1rem;
}

.tile-menu {
    font-family: 'CarroisGothicSC', sans-serif;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    max-width: 1000px;
    padding: 0 0.5rem;
}

.tile-menu a {
    display: flex;
    flex-direction: column;
    background: #FAF9F6;
    border-radius: 12px;
    border: 2px solid #1E293B;
    box-shadow: 4px 4px 0 #1E293B;
    overflow: hidden;
    /* respect des border-radius */
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s, box-shadow 0.2s;
    padding: 0;
    /* pour que l'image aille jusqu'aux bords */
}

.tile-menu a:hover {
    background-color: #F6EED4;
}

.tile-menu .thumb {
    width: 100%;
    flex: 1;
    /* prend tout l'espace restant */
    overflow: hidden;
}

.tile-menu img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* couvre tout l'espace du conteneur */
    border-radius: 12px 12px 0 0;
    /* coins supérieurs arrondis */
    display: block;
}

.tile-menu span {
    display: block;
    padding: 1rem;
    background: #FAF9F6;
    /* fond sous l'image */
    font-size: 1.2rem;
    font-weight: bold;
    color: #B3995B;
    text-align: center;
}


.map-container {
    width: 100%;
    height: 70vh;
    max-width: 1000px;
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 1rem auto;
    border: solid;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    max-height: 800px;
    border: none;
    border-radius: 8px
}

.event-card {
    display: flex;
    align-items: flex-start;
    margin: 0.75rem 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
}

.event-card:last-child {
    border-bottom: none;
}

.event-date {
    text-align: center;
    margin-right: 0.75rem;
    background: #C9B27C;
    color: white;
    border-radius: 4px;
    padding: 0.25rem;
    min-width: 60px;
    font-family: monospace;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.event-day,
.event-month {
    font-size: 0.65rem;
    letter-spacing: 0;
}

.event-num {
    font-size: 1rem;
    font-weight: bold;
    margin: 0.15rem 0;
}

.event-info {
    flex: 1;
}

.event-info>*+* {
    margin-top: 0.6rem;
}

.event-info strong {
    color: #B3995B;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.event-data {
    font-size: 0.85rem;
}

.parish-img-left {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 20%;
    margin-right: 1rem;
}

/* ===== DATEPICKER ===== */
.datepicker {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem 0;
}

.datepicker-card {
    font-family: 'CarroisGothicSC', sans-serif;
    border: 2px solid #1E293B;
    /* bordure noire comme les tuiles */
    background: #FAF9F6;
    /* fond clair harmonisé */
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 3px 3px 0 #1E293B;
    /* légère ombre type carte */
    max-width: 300px;
    width: 100%;
}

.datepicker-card label {
    font-weight: bold;
    color: #B3995B;
    /* accent couleur tuiles */
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.datepicker-card input[type="date"] {
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border: 2px solid #1E293B;
    /* cohérent avec la carte */
    border-radius: 8px;
    font-family: 'muli', sans-serif;
    color: #333;
    background: #FAF9F6;
    transition: border 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.disclaimer {
    font-family: 'muli', sans-serif;
    font-size: 1rem;
    margin: 0.3rem 0 1rem 0;
}

.disclaimer-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.event-data {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.event-data svg {
    flex-shrink: 0;
    width: 1.05em;
    height: 1.05em;
    margin-top: 0.2rem;
    color: #B3995B;
}

.cal-text {
    flex: 1;
    line-height: 1.35;
    font-size: 0.88rem;
    color: #444;
    margin-top: 0.05rem;
    white-space: normal;
    word-break: break-word;
}

.cal-text p {
    margin: 0.15rem 0 0 0;
}

.alphabet-menu {
    display: flex;
    justify-content: center;
    margin: 2rem 0.75rem 1rem 0.75rem;
}

.letter-buttons {
    font-family: 'CarroisGothicSC', sans-serif;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.letter-btn {
    font-family: 'CarroisGothicSC', sans-serif;
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    border: 2px solid #1E293B;
    box-shadow: 3px 3px 0 #1E293B;
    border-radius: 8px;
    background: #FAF9F6;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
}

.letter-btn:hover {
    background: #F6EED4;
}

.letter-btn.active {
    background: #F6EED4;
}

.loading,
.no-saints {
    text-align: center;
    padding: 2rem;
    font-family: 'muli', sans-serif;
    color: #666;
}

.loading.error {
    color: #A67C52;
}

#saints-display {
    margin-top: 1rem;
}

/* --- Responsive --- */

/* Mobile */
@media (max-width: 600px) {
    .app-header {
        padding: 0.5rem 1rem;
    }

    .logo {
        max-width: 80px;
    }

    .home-button {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }

    .container {
        padding: 1rem 0 4rem 0;
        max-width: 100%;
    }

    .accordion {
        border-left: none;
        border-right: none;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }

    .accordion+.accordion {
        border-top: none;
    }

    .accordion-header {
        padding: 1rem 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    h2 {
        padding-left: 0.75rem;
    }

    .disclaimer {
        padding: 0 0.5rem 0 0.75rem;
    }

    .map-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .map-container iframe {
        border-radius: 0;
    }
}

/* Intermédiaire : tablette/petit écran */
@media (min-width: 601px) and (max-width: 900px) {
    .container {
        padding: 1rem 0.75rem 4rem 0.75rem;
        max-width: 100%;
    }

    .accordion {
        border-radius: 6px;
        margin: 0.5rem 0;
        box-shadow: none;
    }
}

/* Desktop : design card classique */
@media (min-width: 901px) {
    .container {
        max-width: 800px;
        margin: 0 auto;
        padding: 1rem 0 4rem 0;
    }

    .accordion {
        border-radius: 8px;
        margin: 0.5rem 0;
    }
}