/* ============================================================
   Blog Voyage — Frontend Styles (Moderne & Minimaliste)
   ============================================================ */

:root {
    --blue:       #2563EB;
    --blue-dark:  #1D4ED8;
    --blue-light: #DBEAFE;
    --text:       #111827;
    --muted:      #6B7280;
    --border:     #E5E7EB;
    --bg:         #FFFFFF;
    --bg-alt:     #F9FAFB;
    --radius:     8px;
    --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --font:       'Inter', system-ui, sans-serif;
    --max-w:      1200px;
    --sidebar-w:  300px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ── Accessibility ── */
.skip-link { position: absolute; left: -9999px; top: 0; padding: .5rem 1rem; background: var(--blue); color: #fff; border-radius: 0 0 var(--radius) 0; z-index: 9999; }
.skip-link:focus { left: 0; }
*:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ── Container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.4rem; border-radius: var(--radius); font-size: .9rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all .2s; text-decoration: none !important; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-white { background: #fff; color: var(--text); border-color: transparent; }
.btn-white:hover { background: var(--bg-alt); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }

/* ── Badges ── */
.badge { display: inline-block; padding: .25rem .75rem; border-radius: 50px; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; text-decoration: none !important; }
.badge:hover { background: var(--blue-dark); }

/* ── Header / Nav ── */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.site-logo { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none !important; flex-shrink: 0; min-width: 0; }
.logo-icon { font-size: 1.3rem; }
.main-nav { flex: 1; }
.nav-list { display: flex; gap: .25rem; }
.nav-list a { padding: .4rem .75rem; border-radius: 6px; font-size: .875rem; font-weight: 500; color: var(--text); transition: background .15s; }
.nav-list a:hover { background: var(--bg-alt); text-decoration: none; }
.header-search { display: flex; align-items: center; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 50px; overflow: hidden; }
.header-search input { border: none; background: transparent; padding: .45rem 1rem; font-size: .875rem; outline: none; width: 200px; font-family: var(--font); }
.header-search button { background: none; border: none; padding: .45rem .75rem; cursor: pointer; color: var(--muted); display: flex; align-items: center; }
.header-search button:hover { color: var(--blue); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .3rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }

/* ── Breadcrumb ── */
.breadcrumb { border-bottom: 1px solid var(--border); background: var(--bg-alt); padding: .6rem 0; }
.breadcrumb-list { display: flex; flex-wrap: wrap; gap: .25rem; font-size: .82rem; color: var(--muted); }
.breadcrumb-list a { color: var(--muted); }
.breadcrumb-list a:hover { color: var(--blue); text-decoration: none; }
.breadcrumb-list [aria-current] { color: var(--text); font-weight: 500; }

/* ── Hero ── */
.hero { position: relative; height: 560px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 8s ease; }
.hero:hover .hero-bg { transform: scale(1.03); }
.hero-bg-gradient { background: linear-gradient(135deg, #1D4ED8 0%, #7C3AED 100%); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 60%, transparent 100%); }
.hero-content { position: relative; padding-bottom: 3rem; max-width: 720px; }
.hero-content h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.25; margin: .75rem 0 1rem; }
.hero-content h1 a { color: inherit; text-decoration: none; }
.hero-content h1 a:hover { text-decoration: underline; }
.hero-excerpt { font-size: 1.05rem; opacity: .9; margin-bottom: 1.25rem; max-width: 600px; }
.hero-meta { display: flex; gap: .75rem; align-items: center; font-size: .85rem; opacity: .8; margin-bottom: 1.5rem; }

/* ── Page header ── */
.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 3rem 0 2.5rem; text-align: center; }
.page-header h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
.page-header p { color: var(--muted); margin-top: .5rem; max-width: 580px; margin-left: auto; margin-right: auto; }
.page-eyebrow { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); margin-bottom: .5rem; }
.page-count { font-size: .85rem; color: var(--muted); margin-top: .5rem; }

/* ── Layout ── */
.layout-grid { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: 2.5rem; }
.layout-full { }

/* ── Article Cards ── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.articles-grid-full { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-img-link { display: block; position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.card-img-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img-link img { transform: scale(1.04); }
.card-badge { position: absolute; top: .75rem; left: .75rem; }
.card-body { padding: 1.25rem; }
.card-meta { display: flex; gap: .5rem; align-items: center; font-size: .78rem; color: var(--muted); margin-bottom: .6rem; }
.card-title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin-bottom: .65rem; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--blue); text-decoration: none; }
.card-excerpt { font-size: .875rem; color: var(--muted); line-height: 1.6; margin-bottom: 1rem; }
.read-more { font-size: .85rem; font-weight: 600; color: var(--blue); }
.read-more:hover { text-decoration: underline; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.widget { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.widget-title { font-size: .95rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--blue); display: inline-block; }
.widget-list { display: flex; flex-direction: column; gap: .25rem; }
.widget-list a { display: flex; justify-content: space-between; align-items: center; padding: .4rem .5rem; border-radius: 5px; font-size: .875rem; color: var(--text); transition: background .15s; }
.widget-list a:hover { background: var(--bg-alt); text-decoration: none; color: var(--blue); }
.badge-count { background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); font-size: .72rem; padding: .1rem .45rem; border-radius: 50px; }
.search-group { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.search-group input { flex: 1; border: none; padding: .55rem .8rem; font-size: .875rem; outline: none; font-family: var(--font); }
.search-group button { background: var(--blue); color: #fff; border: none; padding: .55rem .8rem; cursor: pointer; font-size: 1rem; }
.popular-list { display: flex; flex-direction: column; gap: .75rem; }
.popular-list a { display: flex; gap: .75rem; align-items: center; text-decoration: none; }
.popular-list img { width: 60px; height: 45px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.pop-title { display: block; font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.pop-title:hover { color: var(--blue); }
.pop-views { display: block; font-size: .75rem; color: var(--muted); margin-top: .15rem; }

/* ── Single Article ── */
.article-header { background: var(--bg-alt); }
.article-hero-img { height: 460px; overflow: hidden; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.article-header-content { padding: 2.5rem 0 2rem; }
.article-header-content h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; line-height: 1.2; margin: .75rem 0 1rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); }
.meta-author strong { color: var(--text); }
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; margin-top: 2.5rem; margin-bottom: 4rem; align-items: start; }
.article-lead { font-size: 1.15rem; font-weight: 500; color: var(--muted); border-left: 4px solid var(--blue); padding-left: 1.25rem; margin-bottom: 2rem; line-height: 1.7; }
.article-body { font-size: 1rem; line-height: 1.8; }
.article-body h2 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .75rem; }
.article-body p  { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-body li { margin-bottom: .4rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body blockquote { border-left: 4px solid var(--blue); padding: 1rem 1.5rem; background: var(--blue-light); border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; font-style: italic; }
.article-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-body a { color: var(--blue); font-weight: 500; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: .6rem .9rem; text-align: left; }
.article-body th { background: var(--bg-alt); font-weight: 600; }

/* Tags & Share */
.article-tags { margin: 2.5rem 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .875rem; }
.tag-link { background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); padding: .25rem .75rem; border-radius: 50px; font-size: .8rem; transition: all .15s; }
.tag-link:hover { background: var(--blue-light); color: var(--blue); border-color: var(--blue); text-decoration: none; }
.share-box { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: 1.25rem; background: var(--bg-alt); border-radius: var(--radius); margin-top: 2rem; }
.share-box span { font-size: .875rem; font-weight: 600; }
.share-btn { padding: .4rem 1rem; border-radius: 50px; font-size: .8rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .15s; text-decoration: none !important; }
.share-fb { background: #1877F2; color: #fff; }
.share-tw { background: #000; color: #fff; }
.share-pin { background: #E60023; color: #fff; }
.share-copy { background: var(--bg); border-color: var(--border); color: var(--text); }
.share-copy:hover, .share-btn:hover { opacity: .85; }

/* Article sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 80px; }
.widget-author { text-align: center; }
.author-avatar { width: 60px; height: 60px; background: var(--blue-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto .75rem; }
.widget-author strong { display: block; font-size: .95rem; margin-bottom: .4rem; }
.widget-author p { font-size: .82rem; color: var(--muted); }
.related-list { display: flex; flex-direction: column; gap: .75rem; }
.related-list a { display: flex; gap: .65rem; align-items: center; text-decoration: none; }
.related-list img { width: 70px; height: 50px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.related-list span { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.related-list a:hover span { color: var(--blue); }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; padding: 1.5rem 0 3rem; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; font-weight: 500; color: var(--text); transition: all .15s; text-decoration: none !important; }
.page-btn:hover { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Footer ── */
.site-footer { background: var(--text); color: #9CA3AF; padding: 3.5rem 0 0; margin-top: 4rem; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand .site-logo { color: #fff; margin-bottom: .75rem; }
.footer-brand p { font-size: .875rem; }
.footer-nav h3, .footer-social h3 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; margin-bottom: 1rem; }
.footer-nav ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-nav a { font-size: .875rem; color: #9CA3AF; transition: color .15s; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.social-links { display: flex; gap: .75rem; }
.social-links a { color: #9CA3AF; transition: color .15s; }
.social-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #374151; padding: 1.25rem 0; font-size: .82rem; }

/* ── Error page ── */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-code { font-size: 7rem; font-weight: 800; color: var(--blue-light); line-height: 1; }
.error-page h1 { font-size: 2rem; margin: 1rem 0 .75rem; }
.error-page p { color: var(--muted); margin-bottom: 2rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); font-size: 1.05rem; }

/* ── Search form big ── */
.search-form-big { display: flex; gap: .5rem; justify-content: center; margin-top: 1.25rem; flex-wrap: wrap; }
.search-form-big input { padding: .7rem 1.25rem; border: 2px solid var(--border); border-radius: var(--radius); font-size: 1rem; font-family: var(--font); min-width: 280px; outline: none; }
.search-form-big input:focus { border-color: var(--blue); }

/* ── Tables overflow (toutes tailles) ── */
.article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.article-body pre, .article-body code { overflow-x: auto; max-width: 100%; }

/* ── Mobile search ── */
.search-icon-btn {
    display: none; background: none; border: none; cursor: pointer;
    color: var(--muted); padding: .3rem; border-radius: 6px;
    transition: color .15s;
}
.search-icon-btn:hover { color: var(--blue); }
.mobile-search-bar {
    display: none; padding: .65rem 1rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
}
.mobile-search-bar.open { display: block; }
.mobile-search-bar form { display: flex; gap: .5rem; }
.mobile-search-bar input {
    flex: 1; padding: .6rem 1rem; border: 1.5px solid var(--border);
    border-radius: var(--radius); font-size: .9rem; outline: none;
    font-family: var(--font);
}
.mobile-search-bar input:focus { border-color: var(--blue); }
.mobile-search-bar button {
    background: var(--blue); color: #fff; border: none;
    border-radius: var(--radius); padding: .6rem 1rem; cursor: pointer;
    display: flex; align-items: center;
}

/* ── Tablet 1024px ── */
@media (max-width: 1024px) {
    .layout-grid          { grid-template-columns: 1fr; }
    .sidebar              { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
    .article-layout       { grid-template-columns: 1fr; gap: 2rem; margin-top: 1.75rem; }
    .article-sidebar      { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
    .footer-inner         { grid-template-columns: 1fr 1fr; }
    .article-hero-img     { height: 380px; }
}

/* ── Tablette portrait 900px ── */
@media (max-width: 900px) {
    .header-search        { display: none; }
    .search-icon-btn      { display: flex; align-items: center; }
    .nav-list             { gap: 0; }
    .nav-list a           { padding: .35rem .55rem; font-size: .82rem; }
}

/* ── Mobile 768px ── */
@media (max-width: 768px) {
    :root { --sidebar-w: 100%; }

    /* Header : logo flexible, boutons fixes à droite */
    .header-inner         { gap: .5rem; }
    .site-logo            { flex: 1 1 0; min-width: 0; flex-shrink: 1; font-size: .95rem; }
    .logo-text            { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .search-icon-btn      { display: flex; align-items: center; flex-shrink: 0; }
    .nav-toggle           { display: flex; flex-shrink: 0; }
    .main-nav             { display: none; }
    .main-nav.open        {
        display: block; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
        background: rgba(255,255,255,.98); backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.25rem; z-index: 99; overflow-y: auto;
    }
    .main-nav.open .nav-list   { flex-direction: column; gap: .25rem; }
    .main-nav.open .nav-list a { padding: .75rem 1rem; font-size: 1rem; border-radius: var(--radius); display: block; }
    .header-search        { display: none; }

    /* Hero */
    .hero                 { height: 380px; }
    .hero-content         { padding-bottom: 2rem; }

    /* Article */
    .article-hero-img     { height: 240px; }
    .article-header-content { padding: 1.5rem 0 1.25rem; }
    .article-layout       { margin-bottom: 2.5rem; }
    .article-sidebar      { grid-template-columns: 1fr; }
    .article-lead         { font-size: 1rem; }
    .article-body h2      { font-size: 1.3rem; }
    .article-body h3      { font-size: 1.1rem; }

    /* Cards */
    .articles-grid        { grid-template-columns: 1fr; }
    .articles-grid-full   { grid-template-columns: 1fr; }

    /* Sidebar public */
    .sidebar              { grid-template-columns: 1fr; }

    /* Share */
    .share-box            { padding: 1rem; }
    .share-btn            { padding: .4rem .75rem; }

    /* Footer */
    .footer-inner         { grid-template-columns: 1fr; gap: 2rem; }

    /* Search form big */
    .search-form-big      { flex-direction: column; align-items: center; }
    .search-form-big input { min-width: 0; width: 100%; max-width: 400px; }

    /* Page header */
    .page-header          { padding: 2rem 0 1.75rem; }
}

/* ── Mobile XS 480px ── */
@media (max-width: 480px) {
    .container            { padding: 0 1rem; }
    .hero                 { height: 300px; }
    .hero-excerpt         { display: none; }
    .article-hero-img     { height: 200px; }
    .article-meta         { font-size: .78rem; gap: .35rem; }
    .share-box            { flex-direction: column; align-items: flex-start; gap: .4rem; }
    .card-body            { padding: 1rem; }
    .pagination           { gap: .25rem; padding: 1.25rem 0 2rem; }
    .page-btn             { min-width: 36px; height: 36px; font-size: .82rem; }
    .site-logo            { font-size: .85rem; }
    /* Destination boxes on article page */
    .dest-boxes           { grid-template-columns: 1fr !important; }
    /* Itinerary timeline */
    .itineraire-timeline  { padding-left: 2rem; }
    .timeline-dot         { left: -2rem; width: 26px; height: 26px; font-size: .65rem; }
}

/* ── Mobile XXS 360px : cache le texte du logo, garde juste l'icône ✈ ── */
@media (max-width: 360px) {
    .logo-text            { display: none; }
}

/* ── Page carte — mobile ── */
@media (max-width: 640px) {
    .carte-grid           { grid-template-columns: 1fr !important; }
}

/* ── Page auteur — mobile ── */
@media (max-width: 600px) {
    .auteur-header-inner  { flex-direction: column; gap: 1.25rem; text-align: center; }
    .auteur-avatar        { margin: 0 auto; }
    .auteur-meta-badges   { justify-content: center; }
}

/* ── Bloc texte accueil ────────────────────────────────────────── */
.accueil-bloc         { margin: 2.5rem 0 0; }
.accueil-bloc-content { background: var(--blue-light); border-left: 4px solid var(--blue);
                        border-radius: 0 12px 12px 0; padding: 1.5rem 2rem;
                        font-size: 1rem; line-height: 1.75; color: var(--text); }
.accueil-bloc-content h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.accueil-bloc-content h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
.accueil-bloc-content p  { margin: 0 0 .75rem; }
.accueil-bloc-content p:last-child { margin-bottom: 0; }
.accueil-bloc-content a  { color: var(--blue); text-decoration: underline; }
.accueil-bloc-content ul, .accueil-bloc-content ol { padding-left: 1.5rem; margin: .5rem 0; }
@media (max-width: 600px) {
    .accueil-bloc-content { padding: 1rem 1.25rem; }
}
