/* Thème sombre par défaut, thème clair via [data-theme="light"] sur <html>. */
:root {
  --bg: #011B40;
  --bg-2: #04244F;
  --text: #FFFFFF;
  --text-soft: #C9D3E3;
  --muted: #8D9BB5;
  --line: #2A4470;
  --panel: #FFFFFF;
  --panel-text: #011B40;
  --panel-muted: #4A5872;
  --accent: #F2404F;
  --accent-dark: #D62F3E;
  --pill-bg: #FDE3E5;
  --pill-text: #E0303F;
  --max: 1080px;
}

[data-theme="light"] {
  --bg: #E6EAF0;
  --bg-2: #DCE2EA;
  --text: #011B40;
  --text-soft: #23395D;
  --muted: #5A6A85;
  --line: #9AA8BE;
  --panel: #011B40;
  --panel-text: #FFFFFF;
  --panel-muted: #C9D3E3;
  --pill-bg: rgba(242, 64, 79, .18);
  --pill-text: #FF8A94;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
  letter-spacing: .3px;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- En-tête ---------- */
.nav { padding: 36px 0; position: relative; }
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-size: 17px; font-weight: 500; transition: color .2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.theme-toggle {
  display: block; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid var(--text); background: linear-gradient(90deg, var(--text) 50%, transparent 50%);
}
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 28px; cursor: pointer; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; font-weight: 500; font-size: 16px;
  padding: 10px 18px; border: 0; cursor: pointer; transition: background .2s ease;
}
.btn::after { content: "\2192"; transition: transform .2s ease; }
.btn:hover { background: var(--accent-dark); }
.btn:hover::after { transform: translateX(4px); }
.btn-line {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: 17px; color: var(--panel-text);
}
.btn-line::after { content: "\2192"; transition: transform .2s ease; }
.btn-line:hover::after { transform: translateX(5px); }
.btn-line:hover { color: var(--accent); }
.text-link { color: var(--text); border-bottom: 2px solid var(--accent); font-weight: 500; }
.text-link:hover { color: var(--accent); }

/* ---------- Intro ---------- */
.hero { padding: 70px 0 60px; }
.hero h1 {
  font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; line-height: 1.5; letter-spacing: 1.5px;
  max-width: 760px;
}
.hero h1 .hl { color: var(--accent); }
.hero p { font-size: clamp(18px, 2vw, 22px); color: var(--text-soft); letter-spacing: 1px; max-width: 640px; margin: 30px 0 42px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }

/* ---------- Titres de section ---------- */
section { padding: 70px 0; }
.section-title {
  display: flex; align-items: center; gap: 32px; margin-bottom: 64px;
  font-size: 24px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase;
}
.section-title::before { content: ""; width: 110px; height: 1px; background: var(--line); flex-shrink: 0; }

/* ---------- Projets ---------- */
.work {
  display: grid; grid-template-columns: 37% 63%; min-height: 420px;
  margin-bottom: 80px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.work.shift { margin-left: 5%; margin-right: -5%; }
.work.hidden, .other.hidden { display: none; }

/* Onglets de catégories */
.tabs { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: -24px 0 56px; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: 1px;
  padding: 0 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.others-label { margin: 10px 0 24px; }
.work-info { background: var(--panel); color: var(--panel-text); padding: 56px 40px; display: flex; flex-direction: column; justify-content: center; }
.work-info h3 { font-size: 24px; font-weight: 700; line-height: 1.3; }
.work-info .cat { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin: 14px 0 10px; color: var(--panel-text); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-bottom: 22px; }
.pills li { font-size: 12px; font-weight: 500; background: var(--pill-bg); color: var(--pill-text); padding: 1px 9px; border-radius: 999px; }
.work-info p { font-size: 15.5px; color: var(--panel-muted); margin-bottom: 26px; }
.work-visual { position: relative; overflow: hidden; display: grid; place-items: center; background: #2BB0B7; }
.work-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: absolute; inset: 0; }
.work-visual.contain img { position: static; width: auto; height: 360px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .3)); }

/* Deux captures de téléphone côte à côte */
.work-visual.phones { display: flex; align-items: center; justify-content: center; gap: 26px; padding: 36px 24px; }
.work-visual.phones img {
  position: static; width: auto; height: 400px; max-width: 46%; object-fit: contain;
  border-radius: 18px; box-shadow: 0 18px 36px rgba(0, 0, 0, .3);
}
.work-visual.phones img:nth-child(2) { transform: translateY(22px); }

/* Capture de site dans un cadre de navigateur */
.work-visual.browser { padding: 40px 0 0 40px; place-items: stretch; }
.work-visual.browser img {
  position: static; width: 100%; height: 100%; object-fit: cover; object-position: top left;
  border-radius: 8px 0 0 0; box-shadow: 0 10px 30px rgba(1, 27, 64, .25); border-top: 22px solid #D5DCE6;
}
.links-row { display: flex; flex-wrap: wrap; gap: 26px; }

/* Visuels sans capture : icône et nom sur aplat de couleur */
.mark { text-align: center; color: #fff; padding: 40px; }
.mark .icon {
  width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 28px; display: grid; place-items: center;
  font-size: 56px; background: rgba(255, 255, 255, .18); box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}
.mark strong { display: block; font-size: 34px; font-weight: 700; letter-spacing: 2px; }
.mark span { font-size: 14px; letter-spacing: 3px; text-transform: uppercase; opacity: .85; }
.work-visual.mark::before, .work-visual.mark::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.work-visual.mark::before { width: 320px; height: 320px; top: -110px; right: -90px; }
.work-visual.mark::after { width: 200px; height: 200px; bottom: -80px; left: -60px; }

.v-teal { background: #2BB0B7; }
.v-orange { background: #F7891F; }
.v-red { background: #F2404F; }
.v-blue { background: #3A7DC9; }
.v-purple { background: #6A4FB8; }
.v-light { background: #EEF2F7; }

/* ---------- Autres projets ---------- */
.others { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); padding: 1px 0 0 1px; }
.other { padding: 30px 28px; border: 1px solid var(--line); margin: -1px 0 0 -1px; transition: background .2s ease; }
.other:hover { background: var(--bg-2); }
.other .cat { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.other h3 { font-size: 20px; font-weight: 700; margin: 6px 0 8px; line-height: 1.35; }
.other p { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.other a { font-size: 15px; font-weight: 500; }
.other a::after { content: " \2192"; }
.other a:hover { color: var(--accent); }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; }
.about p { color: var(--text-soft); margin-bottom: 20px; }
.about p strong { color: var(--text); font-weight: 500; }
.label { font-size: 14px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.about-photo { border: 4px solid #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.about-photo img { width: 100%; height: 340px; object-fit: cover; object-position: 50% 35%; }
.facts { list-style: none; margin-top: 28px; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; font-weight: 500; }

/* ---------- Compétences ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 40px; }
.skills ul { list-style: none; }
.skills li { padding: 5px 0; color: var(--text-soft); font-size: 16px; }
.skills li::before { content: "— "; color: var(--accent); }

/* ---------- Expérience ---------- */
.jobs { border-top: 1px solid var(--line); }
.job { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.job .date { color: var(--accent); font-weight: 500; font-size: 15px; letter-spacing: 1px; }
.job h3 { font-size: 21px; font-weight: 700; line-height: 1.35; }
.job .org { color: var(--muted); font-size: 15px; margin: 4px 0 12px; }
.job ul { list-style: none; color: var(--text-soft); font-size: 16px; }
.job li { padding-left: 22px; position: relative; margin-bottom: 6px; }
.job li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Témoignages ---------- */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.quote { border-left: 3px solid var(--accent); padding: 6px 0 6px 28px; }
.quote p { font-size: 19px; font-style: italic; color: var(--text-soft); margin-bottom: 22px; }
.author { display: flex; align-items: center; gap: 14px; }
.author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.author strong { display: block; font-weight: 500; }
.author span { color: var(--muted); font-size: 14px; }

/* ---------- Formation ---------- */
.edu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.edu .year { color: var(--accent); font-size: 14px; font-weight: 500; letter-spacing: 1px; }
.edu h3 { font-size: 17px; font-weight: 700; line-height: 1.4; margin: 6px 0 4px; }
.edu p { color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */
.contact h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: 1.5px; line-height: 1.35; max-width: 720px; }
.contact p { color: var(--text-soft); font-size: 19px; max-width: 620px; margin: 22px 0 40px; }
.contact-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.contact-list span { display: block; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-list a { font-size: 18px; font-weight: 500; word-break: break-word; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Pied de page ---------- */
footer { padding: 40px 0 50px; color: var(--muted); font-size: 15px; }
footer .container > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; border-top: 1px solid var(--line); padding-top: 32px; }
footer a:hover { color: var(--accent); }
footer .links { display: flex; gap: 24px; }

/* ---------- Pages de projet ---------- */
.back { display: inline-block; color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.back:hover { color: var(--accent); }
.page-hero { padding: 40px 0 30px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: 1.5px; line-height: 1.25; }
.page-hero p { color: var(--text-soft); font-size: 20px; max-width: 700px; margin-top: 18px; }
.case { display: grid; grid-template-columns: 1.6fr 1fr; gap: 64px; }
.case h2 { font-size: 15px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.case p { color: var(--text-soft); margin-bottom: 30px; }
.case ul { list-style: none; color: var(--text-soft); margin-bottom: 30px; }
.case li { padding-left: 22px; position: relative; margin-bottom: 6px; }
.case li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent); }
.side-card { background: var(--panel); color: var(--panel-text); padding: 34px 30px; align-self: start; }
.side-card h3 { font-size: 13px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px; }
.side-card p { color: var(--panel-muted); font-size: 15px; margin: 14px 0 22px; }
.side-card .btn { width: 100%; justify-content: center; margin-bottom: 16px; }
.side-card .btn-line { display: flex; justify-content: center; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 70px; }
.gallery figure { background: var(--panel); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.gallery img { width: 100%; height: 300px; object-fit: cover; object-position: top; }
.gallery figcaption { padding: 14px 20px; font-size: 14px; letter-spacing: 1px; color: var(--panel-text); }

/* ---------- Pages ---------- */
.breadcrumb { font-size: 14px; color: var(--muted); letter-spacing: .5px; margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--accent); }
.page-hero .pills { margin-top: 26px; }
.work-info h3 a:hover { color: var(--accent); }

.showcase-wrap { padding-top: 10px; }
.showcase { box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.showcase .work-visual { min-height: 520px; }
.showcase .work-visual.phones img { height: 460px; }
.showcase .work-visual.browser { padding: 50px 0 0 60px; }

.side-card .facts { margin: 6px 0 26px; }
.side-card .facts li { border-bottom-color: rgba(127, 140, 160, .3); }
.side-card .facts li span:first-child { color: var(--panel-muted); }
.side-card .facts li { padding-left: 0; margin: 0; color: var(--panel-text); }
.side-card .facts li::before { content: none; }
.side-actions { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.side-actions .btn { width: auto; margin: 0; }

.next-project {
  display: flex; flex-direction: column; gap: 4px; margin-top: 80px; padding: 36px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.next-project span { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.next-project strong { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: 1px; }
.next-project strong::after { content: " \2192"; color: var(--accent); transition: margin .2s ease; }
.next-project:hover strong { color: var(--accent); }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--bg); padding: 36px 30px; display: flex; flex-direction: column; transition: background .2s ease; }
.service:hover { background: var(--bg-2); }
.service .num { color: var(--accent); font-weight: 500; letter-spacing: 2px; }
.service h3 { font-size: 21px; font-weight: 700; margin: 10px 0; }
.service p { color: var(--text-soft); font-size: 15.5px; margin-bottom: 18px; }
.service .more { margin-top: auto; font-weight: 500; font-size: 15px; }
.service .more::after { content: " \2192"; color: var(--accent); }

.contact h1 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 700; letter-spacing: 1.5px; line-height: 1.3; max-width: 760px; }
.page-contact { padding-top: 50px; }
.works + .btn { margin-top: -20px; }

/* ---------- Accessibilité ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .work, .work.shift { grid-template-columns: 1fr; margin-left: 0; margin-right: 0; }
  .work-visual { min-height: 280px; order: -1; }
  .work-visual.contain img, .work-visual.phones img { height: 260px; }
  .work-visual.browser { padding: 24px 0 0 24px; min-height: 240px; }
  .about, .case { grid-template-columns: 1fr; gap: 40px; }
  .edu { grid-template-columns: 1fr 1fr; }
  .quotes, .contact-list, .services { grid-template-columns: 1fr; }
  .showcase .work-visual { min-height: 320px; }
  .showcase .work-visual.phones img { height: 300px; }
  .showcase .work-visual.browser { padding: 26px 0 0 26px; }
  .job { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  .container { padding: 0 22px; }
  .nav { padding: 24px 0; }
  .avatar { width: 64px; height: 64px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 22px 30px;
    background: var(--bg-2); box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
  }
  .nav-links.open { display: flex; }
  .hero { padding: 40px 0; }
  section { padding: 50px 0; }
  .section-title { gap: 18px; font-size: 19px; margin-bottom: 40px; }
  .section-title::before { width: 48px; }
  .work-info { padding: 36px 26px; }
  .tabs { gap: 6px 22px; margin-top: -10px; }
  .tab { font-size: 15px; }
  .edu { grid-template-columns: 1fr; gap: 28px; }
  .gallery { grid-template-columns: 1fr; }
}
