/* ============================================================
   meilleur-representant-fiscal.com — style.css v01
   Design : bleu marine #1a2744, or #b8860b, mobile-first
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333333;
    background-color: #fafafa;
    line-height: 1.7;
    overflow-x: hidden;
}

/* === TYPOGRAPHIE === */
h1, h2, h3, h4 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a2744;
    line-height: 1.3;
}

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

h2 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #b8860b;
}

h3 {
    font-size: 1.15rem;
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
}

h4 {
    font-size: 1rem;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #2c5282;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

a:hover {
    color: #b8860b;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.3rem;
}

strong {
    color: #1a2744;
}

/* === LAYOUT === */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

/* === SKIP LINK === */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #1a2744;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    text-decoration: none;
}

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

/* === HEADER === */
.site-header {
    background: #1a2744;
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 40px;
    width: auto;
}

/* === MENU HAMBURGER === */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* === NAVIGATION === */
.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a2744;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-menu.open {
    display: block;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list li {
    margin: 0;
}

.nav-list a {
    display: block;
    padding: 0.9rem 1.2rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.nav-list a:hover {
    background: rgba(184,134,11,0.2);
    color: #b8860b;
}

/* === BREADCRUMB === */
.breadcrumb {
    padding: 1rem 0 0.5rem;
    font-size: 0.85rem;
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.breadcrumb-list li:not(:last-child)::after {
    content: "›";
    margin-left: 0.3rem;
    color: #999;
}

.breadcrumb-list a {
    color: #2c5282;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-list li:last-child span {
    color: #666;
}

/* === PAGE HEADER === */
.page-header {
    padding: 1.5rem 0 1rem;
}

.intro-lead {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.7;
    max-width: 760px;
}

/* === TABLE DES MATIÈRES === */
.toc {
    background: #f0f2f5;
    border-left: 4px solid #b8860b;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 4px 4px 0;
}

.toc-title {
    font-family: Georgia, serif;
    font-weight: bold;
    color: #1a2744;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.toc ol {
    margin: 0;
    padding-left: 1.2rem;
}

.toc li {
    margin-bottom: 0.3rem;
}

.toc a {
    color: #2c5282;
    text-decoration: none;
    font-size: 0.93rem;
}

.toc a:hover {
    color: #b8860b;
    text-decoration: underline;
}

/* === CONTENU PRINCIPAL === */
.content {
    padding-bottom: 2rem;
}

.content section {
    margin-bottom: 2rem;
}

.content-narrow {
    max-width: 720px;
}

/* === CARDS PAGES ENFANTS === */
.children-grid {
    margin-top: 2.5rem;
}

.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.card {
    display: block;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 1.2rem;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: #b8860b;
    box-shadow: 0 2px 8px rgba(184,134,11,0.15);
}

.card h3 {
    color: #1a2744;
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.card p {
    color: #555;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* === LISTING PARTENAIRES === */
.listing-partenaires {
    margin: 1.5rem 0;
}

.partenaires-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: none;
}

.partenaire {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
    position: relative;
    cursor: pointer;
}

.partenaire:hover {
    border-color: #2c5282;
}

.partenaire.premium {
    border-color: #b8860b;
    border-width: 2px;
    background: linear-gradient(135deg, #fffdf5 0%, #fff 100%);
}

.rang {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: #1a2744;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.premium .rang {
    background: #b8860b;
}

.partenaire-info {
    flex: 1;
}

.partenaire-info h3 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
}

.partenaire-info h3 a {
    color: #1a2744;
    text-decoration: none;
}

.partenaire-info h3 a:hover {
    color: #2c5282;
}

.badge-premium {
    font-size: 0.8rem;
    color: #b8860b;
    font-weight: normal;
}

.specialites {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.partenaire-info .description {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.listing-disclaimer {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.8rem;
}

/* === BOUTONS CTA === */
.btn-cta {
    display: inline-block;
    background: #2c5282;
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
    align-self: center;
}

/* Étire le lien du bouton sur toute la carte partenaire (stretched link) */
.partenaire .btn-cta::after {
    content: '';
    position: absolute;
    inset: 0;
}

.btn-cta:hover {
    background: #1a2744;
    color: #fff;
}

.btn-cta-primary {
    display: inline-block;
    background: #b8860b;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.1s;
}

.btn-cta-primary:hover {
    background: #9a7209;
    color: #fff;
    transform: translateY(-1px);
}

/* === CTA SECTION === */
.cta-section {
    margin: 3rem 0 2rem;
}

.cta-box {
    background: linear-gradient(135deg, #1a2744 0%, #2c5282 100%);
    color: #fff;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.cta-box h2 {
    color: #fff;
    border: none;
    margin-top: 0;
    font-size: 1.3rem;
}

.cta-box p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

/* === FAQ === */
.faq-section {
    margin-top: 2.5rem;
}

.faq-item {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.faq-item h3 {
    margin: 0;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    background: #f0f2f5;
    transition: background 0.2s;
    position: relative;
    padding-right: 2.5rem;
}

.faq-item h3::after {
    content: "+";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: #b8860b;
    font-weight: bold;
}

.faq-item.open h3::after {
    content: "−";
}

.faq-item h3:hover {
    background: #e8eaee;
}

.faq-item > div {
    display: none;
    padding: 0 1.2rem 1rem;
}

.faq-item.open > div {
    display: block;
}

/* === INFO BOX === */
.info-box {
    background: #fffdf5;
    border-left: 4px solid #b8860b;
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

/* === TABLEAUX === */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background: #1a2744;
    color: #fff;
    padding: 0.7rem 1rem;
    text-align: left;
    font-family: Georgia, serif;
    font-weight: normal;
}

td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #d1d5db;
}

tr:nth-child(even) td {
    background: #f8f9fa;
}

/* === LIENS LIÉS === */
.related-links {
    margin-top: 2rem;
}

.related-links ul {
    list-style: none;
    padding: 0;
}

.related-links li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.related-links li:last-child {
    border-bottom: none;
}

.bridge-link {
    background: #f0f2f5;
    padding: 1rem 1.2rem;
    border-radius: 4px;
    margin: 2rem 0;
    font-style: italic;
}

/* === LISTING SECTION (annuaire) === */
.listing-note {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

/* === FOOTER === */
.site-footer {
    background: #1a2744;
    color: rgba(255,255,255,0.8);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-brand {
    font-family: Georgia, serif;
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

.footer-heading {
    color: #b8860b;
    font-weight: bold;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 0.3rem;
}

.site-footer a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
}

.site-footer a:hover {
    color: #b8860b;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
}

/* ============================================================
   RESPONSIVE — MOBILE (<640px) — listing partenaires
   ============================================================ */
@media (max-width: 639px) {
    .partenaire {
        flex-wrap: wrap;
    }

    .partenaire-info {
        flex: 1 1 calc(100% - 52px);
    }

    .btn-cta {
        width: 100%;
        text-align: center;
        margin-top: 0.3rem;
        box-sizing: border-box;
    }
}

/* ============================================================
   RESPONSIVE — TABLET (640px+)
   ============================================================ */
@media (min-width: 640px) {
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.55rem; }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .partenaire {
        flex-direction: row;
        align-items: center;
    }
}

/* ============================================================
   RESPONSIVE — DESKTOP (900px+)
   ============================================================ */
@media (min-width: 900px) {
    h1 { font-size: 2.3rem; }

    /* Navigation desktop */
    .menu-toggle {
        display: none;
    }

    .nav-menu {
        display: block;
        position: static;
        background: none;
        border: none;
        box-shadow: none;
    }

    .nav-list {
        display: flex;
        gap: 0.2rem;
    }

    .nav-list a {
        padding: 0.5rem 0.8rem;
        border-bottom: none;
        border-radius: 4px;
        font-size: 0.88rem;
    }

    .nav-list a:hover {
        background: rgba(255,255,255,0.1);
    }

    .cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === BODY LOCK WHEN MENU OPEN === */
body.menu-open {
    overflow: hidden;
}
