:root {
  --primary: #b8432f;
  --secondary: #e0b27a;
  --accent: #f2c14e;
  --dark: #2a2320;
  --dark-light: #463a34;
  --light-bg: #f8f5f2;
  --white: #ffffff;
  --text: #2b2b2b;
  --muted: #6b625d;
  --radius: 14px;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--light-bg);
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
}

.cv-sheet {
  width: 100%;
  max-width: 900px;
  display: flex;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

/* Sidebar */
.sidebar {
  flex: 0 0 280px;
  background: var(--dark);
  color: var(--white);
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
}

.photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.15);
  border: 3px solid var(--secondary);
  margin-bottom: 1.2rem;
}

.photo img { width: 100%; height: 100%; object-fit: cover; }

/* Grand portrait (page casting) */
.photo-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.2rem;
  background: rgba(255,255,255,0.1);
}

.photo-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sidebar h1 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.role {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.availability {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.6rem;
  width: fit-content;
}

.side-block { margin-bottom: 1.5rem; }

.side-block h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.4rem;
}

.contact-link {
  display: block;
  color: var(--white);
  font-size: 0.88rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  margin-bottom: 0.4rem;
}

a.contact-link:hover { color: var(--secondary); }

.side-note { font-size: 0.8rem; opacity: 0.8; line-height: 1.4; }

.lang-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.lang-list li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
.lang-list .flag { font-size: 1.1rem; }
.lang-list .lang-name { flex: 1; }
.lang-list .lang-level { font-size: 0.72rem; color: var(--secondary); font-weight: 600; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag-list li {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.12);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.print-title { display: none; }

/* Contenu principal */
.content { flex: 1; padding: 2rem 2.2rem; min-width: 0; }

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #9a918c;
  padding: 0.6rem 0.2rem;
  cursor: pointer;
  position: relative;
  margin-right: 1.2rem;
  font-family: inherit;
}

.tab-btn:hover { color: var(--dark-light); }
.tab-btn.active { color: var(--dark); }

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tagline {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--dark-light);
  border-left: 3px solid var(--primary);
  padding-left: 0.9rem;
  margin-bottom: 1.4rem;
  line-height: 1.5;
}

.profile-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 1.5rem;
}

.info-strip {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.info-strip div { display: flex; flex-direction: column; font-size: 0.85rem; }
.info-strip strong {
  color: var(--dark);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

/* Compétences */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.7rem;
}

.skill {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  border-top: 3px solid var(--secondary);
}

.skill h3 { font-size: 0.9rem; color: var(--dark); margin-bottom: 0.2rem; }
.skill p { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* Parcours */
.timeline { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }

.timeline li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  background: var(--light-bg);
}

.timeline li.featured { background: #fbf1e6; border: 1px solid var(--secondary); }

.timeline .date {
  flex: 0 0 100px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

.timeline li.timeline-accordion { display: block; padding: 0; overflow: hidden; }

.timeline-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.timeline-header-text { flex: 1; }

.timeline-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.1rem;
}

.timeline-accordion.open .timeline-body { max-height: 500px; padding: 0 1.1rem 1rem; }

.sub-exp {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.sub-exp:first-child { border-top: none; }

.sub-date {
  flex: 0 0 70px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.sub-date .duration { font-size: 0.75rem; font-weight: 700; color: var(--primary); }

.icon-group { display: flex; align-items: center; gap: 0.4rem; }

.sub-exp .flag { font-size: 1.6rem; line-height: 1; }

.sub-exp .logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--white);
}

.sub-text { flex: 1; }
.sub-exp h4 { font-size: 0.88rem; margin-bottom: 0.15rem; color: var(--dark); }
.sub-exp p { font-size: 0.8rem; color: #555; }

.timeline h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.timeline p { font-size: 0.82rem; color: #666; }

/* Expériences en accordéon */
.exp-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.exp-item { border-radius: var(--radius); overflow: hidden; background: var(--light-bg); }

.exp-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.exp-header .date {
  flex: 0 0 90px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.exp-title { flex: 1; font-size: 0.92rem; font-weight: 600; color: var(--dark); }

.chevron {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  transition: transform 0.2s;
}

.exp-item.open .chevron,
.timeline-accordion.open .chevron { transform: rotate(45deg); }

.exp-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 1.1rem;
}

.exp-item.open .exp-body { max-height: 200px; padding: 0 1.1rem 0.9rem; }
.exp-body p { font-size: 0.85rem; color: #555; line-height: 1.5; }

footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #8a817c;
}

footer a { color: var(--dark); text-decoration: none; }

/* Galerie photos (page casting) */
.gallery-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0.5rem 0 0.8rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.gallery a {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-bg);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gallery a:hover img { transform: scale(1.04); }

/* Page d'accueil */
.home {
  max-width: 640px;
  width: 100%;
  text-align: center;
}

.home .photo { margin: 0 auto 1rem; }
.home h1 { color: var(--dark); font-size: 1.8rem; margin-bottom: 0.3rem; }
.home .subtitle { color: var(--muted); margin-bottom: 2rem; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.choice {
  display: block;
  background: var(--white);
  border-radius: 20px;
  padding: 1.6rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border-top: 4px solid var(--primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.choice:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.choice .choice-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.choice h2 { font-size: 1.1rem; color: var(--dark); margin-bottom: 0.3rem; }
.choice p { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 700px) {
  .page-wrap { padding: 1.5rem 1rem; }
  .cv-sheet { flex-direction: column; }
  .sidebar { flex: none; }
  .photo-portrait { max-width: 260px; }
  .content { padding: 1.5rem 1.2rem; }

  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-btn { flex: 0 0 auto; white-space: nowrap; }

  .timeline .date, .exp-header .date { flex-basis: 72px; }
  .choice-grid { grid-template-columns: 1fr; }
}

/* Impression / export PDF */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: var(--white); }
  .page-wrap { padding: 0; min-height: auto; display: block; }

  .cv-sheet {
    display: block;
    overflow: visible;
    box-shadow: none;
    border-radius: 0;
    max-width: 100%;
  }

  .sidebar { width: 100%; }
  .photo-portrait { max-width: 200px; }
  .tabs, .chevron, footer { display: none; }

  .tab-panel {
    display: block !important;
    page-break-inside: avoid;
    animation: none !important;
  }

  .print-title { display: block; font-size: 1.1rem; margin: 1.2rem 0 0.8rem; color: var(--dark); }

  .timeline-body, .exp-body {
    max-height: none !important;
    padding: 0 1.1rem 0.9rem !important;
  }
}
