/*
Theme Name: Référence Monaco
Theme URI: https://referencemonaco.com
Author: Référence Monaco
Description: Thème vitrine style Pavillon Suisse / Monaco – rouge, blanc, noir. Pages : Accueil, Galerie, Références, Partenaires, Blog, Contact. Personnalisable via l'apparence et les types de contenu.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: referencemonaco
*/

:root {
  --monaco-red: #DC2626;
  --monaco-white: #ffffff;
  --monaco-black: #0a0a0a;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--monaco-black); background: var(--monaco-white); font-family: system-ui, -apple-system, sans-serif; }
a { color: var(--monaco-red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #e5e5e5; }
.site-header .inner { max-width: 1280px; margin: 0 auto; padding: 0 1rem; min-height: 5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.site-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--monaco-black); }
.site-logo:hover { color: var(--monaco-black); text-decoration: none; }
.site-logo .logo-mark { width: 2.5rem; height: 2.5rem; background: var(--monaco-red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.site-logo .site-logo-img { max-height: 2.5rem; width: auto; object-fit: contain; }
.site-logo .logo-text { font-size: 1.125rem; }

/* Menu principal – liste de liens */
.site-nav { display: flex; align-items: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.75rem; align-items: center; }
.nav-list .menu-item { margin: 0; }
.nav-list a { color: #404040; font-size: 0.9375rem; font-weight: 500; padding: 0.25em 0; display: inline-block; }
.nav-list a:hover, .nav-list .current-menu-item a { color: var(--monaco-red); text-decoration: none; }

/* Bouton menu mobile (caché sur desktop) */
.nav-toggle { display: none; width: 2.5rem; height: 2.5rem; padding: 0; border: none; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; color: var(--monaco-black); }
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 1px; transition: transform .2s, opacity .2s; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
	.nav-toggle { display: flex; margin-left: auto; }
	.site-nav { width: 100%; order: 3; }
	.site-nav .nav-list { display: none; flex-direction: column; gap: 0; padding: 0.5rem 0; border-top: 1px solid #e5e5e5; margin-top: 0.25rem; }
	.site-nav .nav-list .menu-item { width: 100%; border-bottom: 1px solid #f0f0f0; list-style: none; margin: 0; }
	.site-nav .nav-list .menu-item:last-child { border-bottom: none; }
	.site-nav .nav-list a { padding: 0.75rem 0; font-size: 1rem; width: 100%; }
	.site-nav.is-open .nav-list { display: flex; }
}

/* Hero – accueil */
.hero { background: var(--monaco-black); color: #fff; min-height: 70vh; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.hero-inner { position: absolute; inset: 0; background: #404040; }
.hero-inner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); }
.hero-content { position: relative; z-index: 1; max-width: 56rem; margin: 0 auto; padding: 2.5rem 1.5rem; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; margin: 0 0 0.25rem; }
.hero-tagline { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: .85; margin: 0 0 1rem; font-weight: 500; }
.hero-subtitle { font-size: 1.25rem; line-height: 1.45; opacity: .95; margin: 0 0 1rem; }
.hero-intro { font-size: 1rem; line-height: 1.6; opacity: .9; margin: 0 0 1.75rem; max-width: 42rem; margin-left: auto; margin-right: auto; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; align-items: center; }
.hero-ctas .cta { display: inline-block; padding: 0.75rem 1.5rem; font-weight: 500; transition: opacity .2s; }
.hero-ctas .cta:hover { text-decoration: none; opacity: .95; }
.hero-ctas .cta-primary { background: var(--monaco-red); color: #fff; }
.hero-ctas .cta-primary:hover { background: #b91c1c; color: #fff; }
.hero-ctas .cta-secondary { border: 2px solid rgba(255,255,255,.8); color: #fff; }
.hero-ctas .cta-secondary:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }
.hero-bar { height: 8px; background: var(--monaco-red); width: 100%; }

/* About – guillemets */
.section-about { max-width: 1280px; margin: 0 auto; padding: 5rem 1rem; }
.section-about .grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .section-about .grid { grid-template-columns: 1fr; } }
.section-about .quote { font-size: clamp(4rem, 12vw, 12rem); line-height: 1; color: var(--monaco-red); font-family: Georgia, serif; }
.section-about h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.section-about .cta { display: inline-block; margin-top: 2rem; padding: 0.75rem 1.5rem; background: var(--monaco-red); color: #fff; font-weight: 500; }
.section-about .cta:hover { background: #b91c1c; color: #fff; text-decoration: none; }

/* CTA bandeau */
.section-cta { background: var(--monaco-red); color: #fff; padding: 4rem 1rem; text-align: center; }
.section-cta h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.section-cta .buttons { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.section-cta .btn { padding: 0.75rem 1.5rem; font-weight: 500; }
.section-cta .btn-white { background: #fff; color: var(--monaco-red); }
.section-cta .btn-outline { border: 2px solid #fff; color: #fff; }
.section-cta .btn:hover { text-decoration: none; opacity: .95; }

/* Home – sections éditoriales */
.home-section { padding: 4rem 1rem; }
.home-section-inner { max-width: 1280px; margin: 0 auto; }
.home-section-title { font-size: 1.75rem; margin: 0 0 1rem; font-weight: 600; }
.home-section-body { max-width: 42rem; line-height: 1.65; }
.home-section-body p { margin: 0 0 1rem; }
.home-section-body p:last-child { margin-bottom: 0; }
.home-section .cta { display: inline-block; padding: 0.75rem 1.5rem; background: var(--monaco-red); color: #fff; font-weight: 500; }
.home-section .cta:hover { background: #b91c1c; color: #fff; text-decoration: none; }
.home-section-cta { margin-top: 2rem; }

.home-section-list { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 42rem; }
.home-section-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; line-height: 1.5; }
.home-section-list li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; background: var(--monaco-red); border-radius: 50%; }

.section-concept { background: #fafafa; }
.section-pourquoi { background: #fff; }
.section-refs { background: #fafafa; }
.section-magazine { background: #fff; }

.section-edition { background: #fafafa; }
.edition-card { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; max-width: 56rem; margin-top: 1.5rem; border: 1px solid #e5e5e5; padding: 1.5rem; background: #fff; }
@media (max-width: 768px) { .edition-card { grid-template-columns: 1fr; } }
.edition-card-image { aspect-ratio: 3/4; overflow: hidden; background: #f5f5f5; }
.edition-card-image img { width: 100%; height: 100%; object-fit: cover; }
.edition-card-body h3 { margin: 0 0 1rem; font-size: 1.25rem; }
.edition-card-body .cta { margin-top: 0.5rem; }

.section-partners { background: #fff; }
.home-partners-grid { margin-top: 1.5rem; }

.section-articles { background: #fafafa; }
.home-posts-grid { margin-top: 1.5rem; }

/* Footer */
.site-footer { background: var(--monaco-red); color: #fff; margin-top: auto; }
.site-footer .inner { max-width: 1280px; margin: 0 auto; padding: 3rem 1rem; }
.site-footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.site-footer .brand { font-weight: 600; font-size: 1.125rem; display: flex; align-items: center; gap: 0.5rem; }
.site-footer .brand .logo-mark { display: inline-flex; width: 2rem; height: 2rem; background: #fff; color: var(--monaco-red); align-items: center; justify-content: center; font-size: 0.875rem; font-weight: bold; }
.site-footer .brand .site-footer-logo-img { max-height: 2rem; width: auto; object-fit: contain; filter: brightness(0) invert(1); }
.site-footer .footer-desc { max-width: 320px; font-size: 0.875rem; opacity: .9; margin: 0; }
.site-footer .footer-nav { display: flex; flex-direction: column; gap: 0.75rem; }
.site-footer .footer-nav-title { font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.95; margin: 0; }
.site-footer .footer-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer .footer-nav-list li { margin: 0; }
.site-footer .footer-nav-list a { color: rgba(255,255,255,.9); font-size: 0.875rem; }
.site-footer .footer-nav-list a:hover { color: #fff; text-decoration: none; }
.site-footer nav a { color: rgba(255,255,255,.9); font-size: 0.875rem; }
.site-footer nav a:hover { color: #fff; text-decoration: none; }
.site-footer .bottom { padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.2); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.875rem; opacity: .8; }
.site-footer .footer-social { display: flex; align-items: center; gap: 1rem; }
.site-footer .footer-social-link { color: rgba(255,255,255,.9); font-size: 0.875rem; display: inline-flex; align-items: center; }
.site-footer .footer-social-link:hover { color: #fff; text-decoration: none; }
.site-footer .footer-social-instagram svg { display: block; }
.site-footer .footer-partner { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.15); font-size: 0.8125rem; opacity: .85; }
.site-footer .footer-partner-link { color: rgba(255,255,255,.9); }
.site-footer .footer-partner-link:hover { color: #fff; text-decoration: none; }

/* Bandeau de page (Galerie, Partenaires, Références, Contact, Blog) */
.page-hero { background: var(--monaco-black); color: #fff; padding: 3rem 1rem 0; position: relative; }
.page-hero-inner { max-width: 1280px; margin: 0 auto; padding-bottom: 2rem; }
.page-hero .page-title-bar { width: 6rem; height: 4px; background: var(--monaco-red); margin-bottom: 1rem; }
.page-hero-title { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; margin: 0 0 0.5rem; }
.page-hero-lead { margin: 0; opacity: .9; font-size: 1.0625rem; line-height: 1.5; }
.page-hero::after { content: ''; display: block; height: 6px; background: var(--monaco-red); width: 100%; }
.page-hero-list { list-style: none; margin: 1rem 0 0; padding: 0; font-size: 0.9375rem; opacity: .9; }
.page-hero-list li { position: relative; padding-left: 1.25rem; margin-bottom: 0.5rem; }
.page-hero-list li::before { content: ''; position: absolute; left: 0; top: 0.45em; width: 5px; height: 5px; background: var(--monaco-red); border-radius: 50%; }

.page-intro-text { margin-bottom: 2rem; line-height: 1.6; color: #404040; max-width: 42rem; }
.page-cta-wrap { margin-bottom: 2rem; }
.page-cta-wrap .cta { display: inline-block; padding: 0.75rem 1.5rem; background: var(--monaco-red); color: #fff; font-weight: 500; }
.page-cta-wrap .cta:hover { background: #b91c1c; color: #fff; text-decoration: none; }
.contact-block-title { font-size: 1.125rem; margin: 0 0 1rem; font-weight: 600; }

/* Pages – contenu sous le bandeau */
.page-content { max-width: 1280px; margin: 0 auto; padding: 3rem 1rem; }
.page-content .page-title-bar { width: 6rem; height: 4px; background: var(--monaco-red); margin-bottom: 1.5rem; }
.page-content h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-content .lead { color: #525252; margin-bottom: 2rem; }

/* Grille galerie (modèle monaco-reference) */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.gallery-item { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #f5f5f5; border: none; cursor: pointer; text-align: left; padding: 0; display: block; width: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem; background: linear-gradient(to top, rgba(0,0,0,.7), transparent); color: #fff; }
.gallery-item-title { margin: 0; font-weight: 500; }
.gallery-item-caption { margin: .25rem 0 0; font-size: .875rem; opacity: .9; }
/* Lightbox */
.refmonaco-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.refmonaco-lightbox.is-open { opacity: 1; visibility: visible; }
.refmonaco-lightbox-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; padding: 0; }
.refmonaco-lightbox-inner { max-width: 90vw; max-height: 90vh; }
.refmonaco-lightbox-inner img { max-width: 100%; max-height: 85vh; object-fit: contain; }
/* Références par groupe */
.references-group { margin-bottom: 2.5rem; }
.references-group-title { font-size: 1.25rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--monaco-red); color: var(--monaco-black); }
.card-desc { font-size: .875rem; color: #525252; margin: .5rem 0; }
.card-link { display: inline-block; margin-top: .75rem; font-weight: 500; }

/* Cartes Références (avec couverture) */
.card-reference { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-reference-cover { aspect-ratio: 3/4; overflow: hidden; background: #f5f5f5; }
.card-reference-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card-reference:hover .card-reference-cover img { transform: scale(1.03); }
.card-reference-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-reference-body h3 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.card-reference-body .cta { margin-top: auto; padding-top: 1rem; }

.page-empty { color: #737373; margin: 2rem 0; }
/* Partenaires – recherche + filtre */
.partenaires-filters { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.5rem; align-items: center; padding: 1.25rem; background: #fafafa; border-radius: 4px; }
.partenaires-search { flex: 1; min-width: 200px; padding: 0.6rem 1rem; border: 1px solid #e5e5e5; border-radius: 4px; font-size: 0.9375rem; }
.partenaires-select { padding: 0.6rem 1rem; border: 1px solid #e5e5e5; border-radius: 4px; font-size: 0.9375rem; }
.partenaires-submit { padding: 0.6rem 1.25rem; background: var(--monaco-red); color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-weight: 500; font-size: 0.9375rem; }
.partenaires-submit:hover { background: #b91c1c; }
.partenaires-grid .card-partenaire-logo { margin-bottom: 1rem; }
.partenaires-grid .card-partenaire-logo img { max-height: 4rem; width: auto; object-fit: contain; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.gallery-filters a { padding: 0.5rem 1rem; background: #f5f5f5; font-size: 0.875rem; color: #404040; border-radius: 4px; }
.gallery-filters a:hover, .gallery-filters a.active { background: var(--monaco-red); color: #fff; text-decoration: none; }

/* Références / Partenaires – cartes */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card { border: 1px solid #e5e5e5; padding: 1.5rem; transition: border-color .2s, box-shadow .2s; border-radius: 4px; background: #fff; }
.card:hover { border-color: var(--monaco-red); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.card h3 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--monaco-red); text-decoration: none; }
.card .meta { font-size: 0.875rem; color: var(--monaco-red); margin-bottom: 0.5rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid h2 { font-size: 1.25rem; margin-top: 0; }
.contact-form label { display: block; font-weight: 500; margin-bottom: 0.25rem; font-size: 0.9375rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.6rem 1rem; border: 1px solid #e5e5e5; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9375rem; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--monaco-red); }
.contact-form button { padding: 0.75rem 1.5rem; background: var(--monaco-red); color: #fff; border: 0; border-radius: 4px; font-weight: 500; cursor: pointer; }
.contact-form button:hover { background: #b91c1c; }
.contact-form .notice-success { padding: 1rem; background: #dcfce7; border: 1px solid #22c55e; color: #166534; border-radius: 4px; }

/* Blog */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.post-card { border: 1px solid #e5e5e5; overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.post-card .content { padding: 1rem; }
.post-card .date { font-size: 0.875rem; color: #737373; }
.post-card h3 { margin: 0.25rem 0 0.5rem; font-size: 1.25rem; }
.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--monaco-red); text-decoration: none; }

/* Utilitaire */
.transition { transition: all .3s ease; }
