@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;500;600;700&display=swap');

/* =====================
   BASE
   ===================== */

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

html {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    padding: 0;
    color: #0f0f0f;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus {
    outline: none;
}

::selection {
    color: white;
    background: black;
}

/* =====================
   TYPOGRAPHIE
   ===================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 1rem 0;
}

h1 {
    font-weight: 600;
    line-height: 1.25;
    font-size: clamp(1.3rem, 3vw, 2.5rem);
}

h2 {
    font-weight: 600;
    line-height: 1.375;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}

h3 { font-weight: 500; font-size: 1.4rem; }
h4 { font-weight: 500; font-size: 1.2rem; }
h5 { font-weight: 500; font-size: 1rem; }
h6 { font-weight: 500; font-size: 0.85rem; }

p, ul, ol, blockquote {
    margin: 1.25em 0;
}

small {
    font-size: 0.75rem;
}

hr {
    border: none;
    border-bottom: 2px dashed black;
    margin: calc(.75rem + 1.25vw) 0;
}

ul {
    list-style-type: square;
}

/* =====================
   HEADER & NAVIGATION
   ===================== */

.header {
    width: 100%;
    border-bottom: 1px solid black;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    position: relative;
    flex-shrink: 0;
}

.logo {
    font-size: 24px;
    font-weight: 200;
    padding: 22px 26px;
    border-right: 1px solid black;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.logo a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}

.logo a:hover {
    color: #52307c;
    transform: scale(1.04);
    text-shadow: 0 0 18px rgba(82, 48, 124, 0.4);
}

/* Menu desktop */
.menu {
    display: flex;
    align-items: center;
}

.link {
    display: inline-block;
    padding: 15px 0;
    margin: 15px 30px;
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
    color: #0f0f0f;
    font-weight: 200;
    font-size: 18px;
    letter-spacing: 0.05em;
}

.link .bar {
    width: 100%;
    display: inline-block;
    border-bottom: 1px solid black;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: all 300ms;
}

.link:hover .bar,
.link.active .bar {
    opacity: 1;
    bottom: 5px;
}

/* Bouton hamburger — caché sur desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 22px 26px;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: #0f0f0f;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animation croix quand ouvert */
.hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Menu mobile */
@media (max-width: 700px) {
    .hamburger {
        display: flex;
    }

    .logo {
        border-right: none;
    }

    .menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid black;
        z-index: 100;
        padding: 1rem 0;
    }

    .menu.open {
        display: flex;
    }

    .link {
        font-size: 20px;
        margin: 8px 26px;
        padding: 10px 0;
    }
}

/* =====================
   LISTE D'ARTICLES
   ===================== */

#wrapper {
    padding: calc(.75rem + 1.25vw);
    flex: 1;
    overflow-y: auto;
}

#main {
    width: 100%;
}

.article-list {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
}

.article-list:hover > * {
    opacity: 0.075;
}

.article-list .article {
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
    padding: calc(.75rem + 1.25vw);
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    justify-content: space-between;
}

.article-list .article + .article {
    margin-top: calc(.75rem + 1.25vw);
}

.article-list .article:hover {
    overflow: visible;
    z-index: 10;
    opacity: 1;
    background: white;
}

.article-list .article:hover .article-content,
.article-list .article:hover .article-title {
    opacity: 1;
}

/* Image */
.article-list .article-image {
    width: calc((.75rem + 1.25vw) * 4);
    height: auto;
    object-fit: cover;
}

/* Catégories */
.article-list .article-category {
    position: absolute;
    top: calc(.75rem + 1.25vw);
    left: calc((.75rem + 1.25vw) * 6);
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
}

.article-list .article-category li {
    display: inline-block;
    margin-right: 0.5em;
}

.article-list .article-category li + li::before {
    content: "·";
    margin-right: 0.5em;
}

@media (max-width: 640px) {
    .article-list .article-category {
        display: none;
    }
}

/* Titre */
.article-list .article-title {
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    font-weight: 600;
    line-height: 1.25;
    transition: all 0.2s ease;
    margin: 0 0 -0.3em 0;
    align-self: flex-end;
    width: calc(100% - (.75rem + 1.25vw) * 5);
}

@media (min-width: 640px) {
    .article-list .article-title {
        margin-top: calc(1rem + .5em);
    }
}

/* Date */
.article-list .article-date {
    display: block;
    position: absolute;
    top: calc(.75rem + 1.25vw);
    right: calc(.75rem + 1.25vw);
    color: #4a4a4a;
    font-size: 13px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.1em;
    line-height: 1;
}

@media (max-width: 640px) {
    .article-list .article-date {
        display: none;
    }
}

/* Contenu (visible au hover) */
.article-list .article-content {
    opacity: 0;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 0 calc(.75rem + 1.25vw) calc(.75rem + 1.25vw);
    background: white;
    border-bottom: calc(.75rem + 1.25vw) solid rgba(0, 0, 0, 0.02);
    border-left: calc(.75rem + 1.25vw) solid rgba(0, 0, 0, 0.02);
    border-right: calc(.75rem + 1.25vw) solid rgba(0, 0, 0, 0.02);
    transition: opacity 0.2s ease;
    font-size: 0.95rem;
    line-height: 1.7;
}

.article-list .article:hover .article-content {
    opacity: 1;
}

/* =====================
   PAGE À PROPOS
   ===================== */

.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(.75rem + 1.25vw) 0;
}

.page-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.about-section,
.contact-section {
    padding: calc(.75rem + 1.25vw) 0;
}

.about-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: #2a2a2a;
}

/* =====================
   FORMULAIRE CONTACT
   ===================== */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0f0f0f;
}

.form-group input,
.form-group textarea {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: #0f0f0f;
    background: transparent;
    border: none;
    border-bottom: 1px solid #0f0f0f;
    padding: 0.6rem 0;
    outline: none;
    transition: border-color 0.2s ease;
    width: 100%;
    resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
    font-weight: 300;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #000;
    border-bottom-width: 2px;
}

.submit-btn {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
    background: #0f0f0f;
    border: none;
    padding: 1rem 2.5rem;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.2s ease;
}

.submit-btn:hover {
    background: #333;
}

/* =====================
   PAGE ARTICLE
   ===================== */

.post-page {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(1.5rem + 1.25vw) 0 4rem;
}

/* En-tête */
.post-header {
    margin-bottom: 2rem;
}

.post-categories {
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.post-categories li {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #52307c;
}

.post-title {
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 1.25rem 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8rem;
    font-weight: 300;
    color: #4a4a4a;
    font-style: italic;
    letter-spacing: 0.05em;
}

.post-reading-time::before {
    content: "·";
    margin-right: 1.5rem;
}

/* Corps */
.post-body {
    font-size: 1rem;
    line-height: 1.9;
    color: #1a1a1a;
}

.post-body p {
    margin: 1.5em 0;
}

.post-body h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2.5em 0 0.75em;
}

.post-body h3 {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 2em 0 0.5em;
}

/* Image intercalée */
.post-figure {
    margin: 2.5em 0;
}

.post-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.post-figure figcaption {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    font-weight: 300;
    color: #777;
    font-style: italic;
    letter-spacing: 0.03em;
}

/* Blockquote */
.post-body blockquote {
    border-left: 2px solid #52307c;
    margin: 2em 0;
    padding: 0.5em 0 0.5em 1.75em;
    font-size: 1.05rem;
    font-style: italic;
    color: #2a2a2a;
    line-height: 1.7;
}

.post-body blockquote cite {
    display: block;
    margin-top: 0.75em;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 400;
    color: #777;
    letter-spacing: 0.03em;
}

/* Navigation suivant / précédent */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 45%;
    transition: color 0.2s ease;
}

.post-nav-link:hover {
    color: #52307c;
}

.post-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #aaa;
}

.post-nav-link:hover .post-nav-label {
    color: #52307c;
}

.post-nav-title {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

.post-nav-next {
    text-align: right;
    margin-left: auto;
}

@media (max-width: 480px) {
    .post-navigation {
        flex-direction: column;
    }
    .post-nav-link {
        max-width: 100%;
    }
    .post-nav-next {
        text-align: left;
        margin-left: 0;
    }
}

/* =====================
   TAGLINE CACHÉE
   ===================== */

.tagline-cachee {
    display: block;
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: transparent;
    user-select: text;
    margin-top: 2px;
}

/* =====================
   FOOTER
   ===================== */

.footer {
    padding: 0 calc(.75rem + 1.25vw) calc(.75rem + 1.25vw);
    margin-top: 0;
    flex-shrink: 0;
}

.footer-rule {
    border: none;
    border-top: 1px solid black;
    margin-bottom: 1rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #4a4a4a;
}
@media (hover: none) {
    .article-list:hover > * {
        opacity: 1;
    }
    .article-list .article:hover {
        overflow: hidden;
        background: rgba(0, 0, 0, 0.02);
    }
    .article-list .article:hover .article-content {
        opacity: 0;
    }
    .logo a:hover {
        color: inherit;
        transform: none;
        text-shadow: none;
    }
    .link:hover .bar {
        opacity: 0;
    }
    .post-nav-link:hover {
        color: inherit;
    }
    .post-nav-link:hover .post-nav-label {
        color: #aaa;
    }
}
