/* ============================================
   Vincent Bonhomme — Site personnel
   Charte graphique PS, sobre et professionnelle
   ============================================ */

:root {
  --rouge-ps: #E2001A;
  --rouge-ps-dark: #B80015;
  --anthracite: #2D2D2D;
  --sombre: #1A1A2E;
  --gris-clair: #F5F5F5;
  --gris-moyen: #E0E0E0;
  --gris-texte: #666;
  --blanc: #FFFFFF;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --header-height: 72px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font);
  color: var(--anthracite);
  background: var(--blanc);
  line-height: 1.7;
  font-size: 16px;
}

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

a:hover {
  color: var(--rouge-ps-dark);
}

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

/* ---- Typography ---- */

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--sombre);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

/* ---- Layout ---- */

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

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--gris-clair);
}

/* ---- Header ---- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--blanc);
  border-bottom: 1px solid var(--gris-moyen);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sombre);
  letter-spacing: -0.02em;
}

.header__logo span {
  color: var(--rouge-ps);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--anthracite);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rouge-ps);
  transition: width 0.3s;
}

.nav a:hover,
.nav a.active {
  color: var(--rouge-ps);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--anthracite);
  margin: 5px 0;
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero ---- */

.hero {
  margin-top: var(--header-height);
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, var(--sombre) 0%, var(--anthracite) 100%);
  color: var(--blanc);
}

.hero h1 {
  color: var(--blanc);
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.hero h1 strong {
  font-weight: 700;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.hero__tagline {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  line-height: 1.8;
}

.hero__tagline::before {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rouge-ps);
  margin-bottom: 1.5rem;
}

/* Hero grid with photo */
.hero__grid {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero__text {
  flex: 1;
}

.hero__photo {
  flex-shrink: 0;
}

.hero__photo img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
}

/* Content images */
.content__image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* Info box */
.info-box {
  background: var(--gris-clair);
  border: 1px solid var(--gris-moyen);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}

.info-box h4 {
  color: var(--rouge-ps);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
}

.info-box h4:first-child {
  margin-top: 0;
}

.info-box p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0;
}

/* Blockquote */
.quote {
  border-left: 4px solid var(--rouge-ps);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--gris-clair);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--anthracite);
  line-height: 1.7;
}

/* ---- Cards (thématiques) ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--blanc);
  border: 1px solid var(--gris-moyen);
  border-left: 4px solid var(--rouge-ps);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--gris-texte);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card__link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rouge-ps);
}

.card__link {
  cursor: pointer;
}

.card__link::after {
  content: ' \2192';
}

/* ---- Page header (sous-pages) ---- */

.page-header {
  margin-top: var(--header-height);
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--sombre) 0%, var(--anthracite) 100%);
  color: var(--blanc);
}

.page-header h1 {
  color: var(--blanc);
  font-size: 2.2rem;
}

.page-header p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* ---- Content ---- */

.content {
  max-width: 760px;
}

.content p {
  margin-bottom: 1.5rem;
  color: #444;
}

.content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rouge-ps);
}

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

.content li {
  margin-bottom: 0.5rem;
  color: #444;
}

/* ---- Blog / Articles ---- */

.articles {
  display: grid;
  gap: 2rem;
}

.article-preview {
  padding: 2rem 0;
  border-bottom: 1px solid var(--gris-moyen);
}

.article-preview__date {
  font-size: 0.85rem;
  color: var(--gris-texte);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-preview h3 {
  margin: 0.5rem 0;
}

.article-preview p {
  color: var(--gris-texte);
  margin-bottom: 0.75rem;
}

/* ---- About ---- */

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--gris-moyen);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gris-texte);
  font-size: 0.9rem;
}

/* ---- Contact form ---- */

.form {
  max-width: 560px;
}

.form__group {
  margin-bottom: 1.5rem;
}

.form__group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gris-moyen);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--rouge-ps);
}

.form__group textarea {
  min-height: 150px;
  resize: vertical;
}

/* ---- Button ---- */

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--rouge-ps);
  color: var(--blanc);
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--rouge-ps-dark);
  color: var(--blanc);
}

/* ---- Footer ---- */

.footer {
  background: var(--sombre);
  color: rgba(255, 255, 255, 0.6);
  padding: 3rem 0;
  font-size: 0.9rem;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
}

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

.footer__links {
  display: flex;
  gap: 1.5rem;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 4rem 0 3rem; }

  .hero__grid {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero__photo img {
    width: 160px;
    height: 160px;
  }

  .hero__tagline::before {
    margin-left: auto;
    margin-right: auto;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--blanc);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav a {
    font-size: 1.2rem;
  }

  .nav-toggle {
    display: block;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 240px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
