/*
Theme Name: MCR Meyrin
Theme URI: https://mcr-meyrin.ch
Author: Projet MCR
Description: Thème sur mesure pour le Mouvement Chrétien des Retraités de Meyrin — design senior-friendly, identité bordeaux.
Version: 1.6.3
Text Domain: mcr-meyrin
*/

:root {
    --bordeaux: #AA2049;
    --bordeaux-dark: #7A1737;
    --bordeaux-light: #C94870;
    --bg-warm: #faf3e9;
    --bg-card: #fffdf8;
    --text: #2c2c2c;
    --text-muted: #6b6b6b;
    --border: #ecdfcd;
    --gold: #c9a227;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(170, 32, 73, 0.08);
    --shadow-lg: 0 6px 24px rgba(170, 32, 73, 0.12);
    --radius: 10px;
    --max-width: 1200px;
    --max-width-header: 1500px;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg-warm);
}

a {
    color: var(--bordeaux);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--bordeaux-dark);
    text-decoration: underline;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--bordeaux-dark);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
.site-header {
    background: var(--bordeaux);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Décaler le header sticky sous la barre d'administration WordPress (visible quand connecté) */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.header-inner {
    max-width: var(--max-width-header);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    min-height: 88px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    z-index: 200;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.site-logo {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.custom-logo-link {
    display: inline-block;
    background: var(--white);
    border-radius: 10px;
    padding: 10px 16px;
    flex-shrink: 0;
}

.custom-logo {
    max-height: 48px;
    width: auto;
    display: block;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0;
    color: var(--white);
    line-height: 1.2;
    white-space: nowrap;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
}

.site-tagline {
    font-size: 0.85rem;
    opacity: 0.85;
    margin: 0;
}

/* ===== NAV ===== */
.main-nav {
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.1rem;
}

.main-nav a {
    color: var(--white);
    padding: 0.55rem 0.5rem;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.2s;
    display: block;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: rgba(255,255,255,0.18);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    min-width: 48px;
    min-height: 44px;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--bordeaux) 0%, var(--bordeaux-dark) 100%);
    color: var(--white);
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-warm);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 60%);
}

.hero h1 {
    color: var(--white);
    font-size: 2.8rem;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.92;
}

.hero-cta {
    display: inline-block;
    background: var(--white);
    color: var(--bordeaux);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    text-decoration: none;
    color: var(--bordeaux);
}

.hero-cta + .hero-cta {
    margin-left: 0.8rem;
}

.hero-cta-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.7);
}

.hero-cta-outline:hover {
    color: var(--white);
    background: rgba(255,255,255,0.12);
}

/* ===== LAYOUT ===== */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 900px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-warm);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

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

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.card-link {
    font-weight: 700;
    font-size: 0.95rem;
}

/* ===== DATES SECTION ===== */
.section-light {
    background: var(--white);
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.date-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.date-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-warm);
    border-radius: var(--radius);
    padding: 1.2rem;
    border-left: 4px solid var(--bordeaux);
}

.date-badge {
    background: var(--bordeaux);
    color: var(--white);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    text-align: center;
    min-width: 64px;
    flex-shrink: 0;
}

.date-badge .day {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.date-badge .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.date-info h4 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.date-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== CTA BANNER ===== */
.cta-banner {
    background: var(--bordeaux);
    color: var(--white);
    text-align: center;
    padding: 3rem 1.5rem;
    margin-top: 3rem;
}

.cta-banner h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.cta-banner p {
    font-size: 1.15rem;
    opacity: 0.92;
    margin-bottom: 1.5rem;
}

.cta-banner .hero-cta {
    background: var(--white);
    color: var(--bordeaux);
}

/* ===== CONTENT PAGE ===== */
.entry-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: justify;
}

.entry-content h2 {
    margin-top: 2rem;
    color: var(--bordeaux);
}

.entry-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

/* ===== CONTACT INFO ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
}

.contact-card .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.contact-card p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bordeaux-dark);
    color: var(--white);
    padding: 2.5rem 1.5rem 1.5rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.footer-col p,
.footer-col a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* ===== ACCESSIBILITÉ ===== */
a:focus-visible, button:focus-visible, .hero-cta:focus-visible, .main-nav a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.main-nav a { min-height: 44px; }

.skip-link {
    position: absolute;
    left: 0;
    top: -40px;
    background: var(--bordeaux);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
}

.skip-link:focus { top: 0; }

.entry-content img.logo-inline {
    width: 80px;
    height: auto;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.entry-content img.logo-60 {
    float: right;
    width: 120px;
    height: auto;
    max-width: 30%;
    margin: 0.3rem 0 1rem 1.2rem;
}

.entry-content h2 { clear: both; }
.entry-content h2:first-of-type { clear: none; }
.entry-content p { text-align: justify; }

/* ===== CONTACT RAPIDE ===== */
.quick-contact {
    max-width: var(--max-width);
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    min-height: 56px;
}

.quick-btn:hover {
    background: rgba(255,255,255,0.25);
    text-decoration: none;
    color: #fff;
}

/* ===== RESPONSIVE ===== */
/* ===== ANIMATIONS ===== */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroRise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

#main-content {
    animation: pageFadeIn 0.4s ease-out;
}

.hero h1,
.hero p,
.hero-cta,
.hero-cta + .hero-cta {
    animation: heroRise 0.5s ease-out both;
}
.hero p           { animation-delay: 0.08s; }
.hero-cta         { animation-delay: 0.16s; }
.hero-cta + .hero-cta { animation-delay: 0.24s; }

/* Scroll-reveal (exclut les cartes qui ont leur propre hover) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Nav link underline animation */
.main-nav a {
    position: relative;
}
.main-nav a::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: width 0.25s ease, left 0.25s ease;
}
.main-nav a:hover::after,
.main-nav .current-menu-item > a::after {
    width: 70%;
    left: 15%;
}

/* Respect user preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1220px) {
    .menu-toggle { display: block; }
    .header-inner { flex-wrap: nowrap; }
    .site-branding { flex: 1 1 auto; min-width: 0; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bordeaux-dark);
        padding: 1rem;
        z-index: 150;
    }
    .main-nav.open { display: block; }
    .main-nav ul {
        flex-direction: column;
        gap: 0.2rem;
    }
    .main-nav a {
        padding: 0.8rem 1rem;
        font-size: 1.05rem;
        min-height: 48px;
    }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.1rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .header-inner { padding: 0 1rem; }
    .entry-content img.logo-60 { float: none; display: block; margin: 0 auto 1rem; }
    .site-title { font-size: 1.2rem; }
    .page-content { padding: 2rem 1rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .quick-contact { grid-template-columns: 1fr; }
    .hero::before { font-size: 8rem; }
    .hero-cta + .hero-cta { margin-left: 0; margin-top: 0.8rem; }
}
