/* style.css - Portfolio Alban Sonneville */
/* Empêche le curseur de texte (caret) de s'afficher quand on clique sur du texte non éditable */
* {
  -webkit-user-select: none; /* bloque la sélection sur la plupart des navigateurs */
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  caret-color: transparent; /* cache le curseur clignotant */
}

/* Autorise quand même la sélection dans les champs ou zones de texte */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  caret-color: auto;
}

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: #f9fafb;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

/* Header */
.header {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.header .logo { font-weight: 700; font-size: 1.125rem; }
.header nav { display: flex; gap: 1rem; }
.header nav a { padding: 0.25rem 0.5rem; font-weight: 600; color: #0f172a; }
.controls { display: flex; gap: 0.5rem; align-items: center; }

.lang-toggle, .theme-toggle { border: 1px solid #e2e8f0; padding: 0.45rem 0.65rem; border-radius: 8px; background: #fff; cursor: pointer; }
.lang-dropdown { position: relative; }
.lang-list { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; padding: 0.25rem; width: 120px; box-shadow: 0 6px 20px rgba(2,6,23,0.08); }
.lang-list button { display: block; width: 100%; padding: 0.5rem; border: none; background: transparent; text-align: left; cursor: pointer; border-radius: 6px; }
.lang-list button:hover { background: #f1f5f9; }
.lang-dropdown.open .lang-list { display: block; }

/* Hero */
.hero { display: flex; gap: 1.5rem; align-items: center; padding: 2rem 0; }
.hero-left {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* centre verticalement */
  align-items: center;     /* centre horizontalement */
  text-align: left;
}
.hero-content {max-width: 420px;}
.hero-right { flex: 1; display: flex; align-items: center; justify-content: center; }
.hero h1 { font-size: 2rem; margin: 0 0 0.25rem 0; }
.hero h2 { font-size: 1.125rem; margin: 0 0 1rem 0; color: #475569; font-weight: 600; }
.hero p { color: #64748b; max-width: 640px; line-height: 1.5; }
.social-buttons { margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.social-buttons a { padding: 0.5rem 0.9rem; border-radius: 8px; background: #0f172a; color: #fff; font-weight: 600; }
.cta { display: inline-block; margin-top: 0.75rem; padding: 0.6rem 1rem; background: #0066ff; color: #fff; border-radius: 8px; font-weight:700; }

/* Sections */
section { margin-bottom: 1.5rem; background: #fff; padding: 1.25rem; border-radius: 12px; box-shadow: 0 6px 18px rgba(2,6,23,0.03); }
.section-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.75rem; }

/* Projets - grid of cards */
.projets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #e6e6e6; }
.card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.card-content { padding: 0.9rem; flex: 1; display: flex; flex-direction: column; }
.card-content h3 { margin: 0 0 0.35rem 0; font-size: 1rem; }
.card-content p { margin: 0; color: #475569; font-size: 0.95rem; }
.langages { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.6rem; }
.langage { background: #f1f5f9; padding: 0.35rem 0.6rem; border-radius: 6px; font-size: 0.8rem; }

.card-footer { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem; border-top: 1px solid #eef2ff; }
.card-footer img { width: 20px; height: 20px; }
.card-footer a { color: #0b5fff; font-weight: 700; }
.card-footer a:hover { text-decoration: underline; background: rgba(11,95,255,0.08); border-radius: 4px; padding: 0.08rem 0.22rem; }

/* Outils - filters */
.filters { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.filter-btn { padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid #e6e6e6; cursor: pointer; background: #fff; font-weight: 700; }
.filter-btn.active { background: #0b5fff; color: #fff; border-color: transparent; }

.outils-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
.outil {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  background: #f8fafc;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.outil img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
}


/* CV */
.cv-embed { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.cv-embed iframe { width: 100%; height: 560px; border: 1px solid #e6e6e6; border-radius: 8px; }

.download-center { display: flex; justify-content: center; }

/* ---- FOOTER MODERNE ---- */
.footer {
  background: #fff;
  color: #0f172a;
  margin-top: 2rem;
  border-top: 1px solid #e6e6e6;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-top {
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #4f46e5, #3b82f6, #06b6d4);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 1rem;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1;
  min-width: 220px;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-section h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-section p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
}

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

.footer-section ul li {
  margin-bottom: 0.4rem;
}

.footer-section ul li a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section ul li a:hover {
  color: #3b82f6;
}

.social-icons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.social-icons a img {
  width: 26px;
  height: 26px;
  transition: transform 0.2s;
  filter: grayscale(0%);
}

.social-icons a:hover img {
  transform: scale(1.1);
}

.footer-bottom {
  border-top: 1px solid #e6e6e6;
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #475569;
}

/* ---- dark mode ---- */
body.dark-mode {
  background: #0b1220;
  color: #e6eef8;
}

/* header / nav */
body.dark-mode .header {
  background: #0b1220;
  border-bottom-color: #1f2937;
}
body.dark-mode .header nav a { color: #e6eef8; }

/* sections & cards */
body.dark-mode section,
body.dark-mode .card,
body.dark-mode .outil,
body.dark-mode .footer {
  background: #0f1724;
  color: #e6eef8;
  box-shadow: none;
  border-color: #1f2937;
}

/* accents / small texts */
body.dark-mode .section-title,
body.dark-mode .footer-section h4,
body.dark-mode .footer-section h5 {
  color: #f1f5f9;
}
body.dark-mode p,
body.dark-mode .card-content p,
body.dark-mode .footer-section p {
  color: #cbd5e1;
}

/* badges / langages */
body.dark-mode .langage {
  background: #1f2937;
  color: #e6eef8;
}

/* card footer border */
body.dark-mode .card-footer {
  border-top-color: #1f2937;
}

/* footer specific */
body.dark-mode .footer-top { filter: none; }
body.dark-mode .footer-bottom { border-top-color: #1f2937; color: #9aa8b8; }

/* keep buttons readable */
body.dark-mode .filter-btn,
body.dark-mode .lang-toggle,
body.dark-mode .theme-toggle,
body.dark-mode .cta {
  background: #111827;
  color: #e6eef8;
  border-color: #2b3440;
}
body.dark-mode .filter-btn.active { background: #0b5fff; color: #fff; }


/* Responsive footer */
@media (max-width: 800px) {
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}



/* Responsive */
@media (max-width: 900px) {
  .projets-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { flex-direction: column-reverse; gap: 1rem; text-align: left; }
  .hero-right { width: 100%; }
}
@media (max-width: 600px) {
  .projets-grid { grid-template-columns: 1fr; }
  .header nav { display: none; }
  .hero h1 { font-size: 1.5rem; }
  .hero h2 { font-size: 1rem; }
}
