/* ==========  VARIABLES  ========== */
:root{
  --bg:#0d0f1c; --surface:#141829; --glass:rgba(255,255,255,0.04);
  --border:rgba(255,255,255,0.08); --text:#f1f5fb; --muted:#8a99b5;
  --accent:#67e8f9; --accent2:#a78bfa;
  --grad:linear-gradient(135deg,var(--accent),var(--accent2));
  --glow:0 0 12px var(--accent),0 0 24px rgba(103,232,249,0.3);
  --radius:16px;
  --font:'Inter',sans-serif;
  --font-title:'Space Grotesk',sans-serif;

  /* CV Theme */
  --cv-accent:#0057b8;
  --cv-accent-light:#e5f1ff;
  --cv-text-dark:#222;
  --cv-text-light:#444;
  --cv-bg:#fff;
  --cv-border:#e5e7eb;
  --focus-ring:0 0 0 4px rgba(103, 232, 249, 0.4);
}
[data-theme="light"]{
  --bg:#f4f6fa; --surface:#ffffff; --glass:rgba(0,0,0,0.03);
  --border:rgba(0,0,0,0.08); --text:#0d0f1c; --muted:#5a6474;
}

/* CV Theme Switcher */
[data-cv-theme="bordeaux"]{
  --cv-accent:#7a0b2a;
  --cv-accent-light:#f8e6eb;
}
[data-cv-theme="vert"]{
  --cv-accent:#006b56;
  --cv-accent-light:#e5f3f0;
}

/* ==========  RESET & TYPO  ========== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  display:flex;
  flex-direction:column;
  line-height:1.5;
  -webkit-font-smoothing:antialiased
}
h1,h2,h3{font-family:var(--font-title);font-weight:700}
a{color:inherit;text-decoration:none}

/* ==========  HEADER  ========== */
header{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--glass);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  padding:12px 48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px;
}
.left-header{display:flex;align-items:center;gap:32px}
.logo{font-size:32px;background:var(--grad);-webkit-background-clip:text;-webkit-text-fill-color:transparent;}
nav.horiz{display:flex;gap:24px}
nav.horiz a{color:var(--muted);font-weight:600;transition:color .2s}
nav.horiz a:hover{color:var(--text)}
.right-header{display:flex;align-items:center;gap:16px}
.btn-global{
  display:inline-flex;align-items:center;gap:10px;
  padding:14px 24px;border-radius:var(--radius);
  font-weight:800;cursor:pointer;border:0;
  transition:transform .2s, box-shadow .2s;
  font-size:14px;
}
.btn-primary-global{background:var(--grad);color:var(--bg);box-shadow:var(--glow);}
.btn-primary-global:hover{transform:translateY(-2px);box-shadow:0 0 20px var(--accent),0 0 40px rgba(103,232,249,0.4);}
.btn-secondary-global{
  background:transparent;
  border:2px solid var(--accent);
  color:var(--accent);
  transition:all .3s ease;
}
.btn-secondary-global:hover{
  background:var(--accent);
  color:var(--bg);
  transform:translateY(-2px);
}
.theme-toggle{
  background:var(--glass);
  border:1px solid var(--border);
  border-radius:50%;
  width:40px;height:40px;
  display:grid;place-items:center;
  cursor:pointer;
}
.mob-toggle{display:none;background:var(--surface);border:1px solid var(--border);border-radius:8px;width:40px;height:40px;place-items:center;font-size:20px;}
@media (max-width:900px){
  header{padding:12px 24px}
  nav.horiz{display:none}
  .mob-toggle{display:grid}
}

/* DRAWER MOBILE */
#drawer{
  position:fixed;
  inset:0 40% 0 0;
  background:var(--surface);
  border-right:1px solid var(--border);
  padding:80px 24px 24px;
  transform:translateX(-100%);
  transition:transform .3s;
  z-index:25;
}
#drawer.open{transform:translateX(0)}
#drawer a{display:block;padding:12px 0;color:var(--muted)}

/* MAIN */
main{
  flex:1;
  padding:64px 48px;
}
@media (max-width:900px){
  main{padding:48px 24px}
}

/* FOOTER */
footer{
  background:var(--surface);
  border-top:1px solid var(--border);
  padding:64px 48px 32px;
}
.footer-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:48px;
  margin-bottom:48px;
}
.footer-grid h4{
  font-size:16px;
  margin-bottom:12px;
}
.footer-grid a{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
  transition:color .2s;
}
.footer-grid a:hover{
  color:var(--text);
}
.footer-desc{
  color:var(--muted);
}
.bottom{
  text-align:center;
  font-size:13px;
  color:var(--muted);
}

/* ==========  CV LAYOUT  ========== */
.wrap{max-width:1040px;margin:0 auto;padding:0 0}
.nav-cv{
  display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap;align-items:center;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:15px 20px;
}
.cv-theme-label{
  margin-left:auto;
  font-size:13px;
  color:var(--muted);
  font-weight:600;
}
.btn{
  padding:10px 16px;border:none;border-radius:9px;cursor:pointer;font-size:14px;font-weight:600;
  transition:transform .2s;
}
.btn-cv-primary{background:var(--cv-accent);color:#fff;}
.btn-cv-primary:hover{opacity:0.9;transform:translateY(-1px);}
.btn-cv-secondary{background:var(--muted);color:var(--bg);}
.btn-cv-secondary:hover{opacity:0.9;transform:translateY(-1px);}

/* FORM STYLES */
select, input[type=text], input[type=email], textarea, input[type=file]{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:9px;
  font-size:14px;
  background:var(--bg);
  color:var(--text);
  transition:border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
input[type=text]:focus,input[type=email]:focus,textarea:focus,select:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:var(--focus-ring);
}
textarea{min-height:90px;resize:vertical}
.help-text{
  display:block;
  margin-top:6px;
  font-size:12px;
  color:var(--muted)!important;
}

/* AJOUT PROFESSIONNEL POUR LES BOUTONS CONTEXTUELS */
.btn-context-example {
    display: block;
    width: fit-content;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent); /* Utilise la couleur d'accentuation principale du thème */
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.btn-context-example:hover {
    opacity: 1;
    text-decoration: none;
}

/* FORM & CARD */
.card{
  background:var(--surface);
  padding:25px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  margin-bottom:18px;
}
.card-title{
  margin-bottom:12px;
}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.full{grid-column:1/3}
label{display:block;font-size:13px;margin-bottom:5px;color:var(--muted)}
.form-actions{text-align:right;margin-top:6px}
.preview-nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}
.preview-title{font-weight:600}

/* CV PREVIEW */
.cv-container{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:0;
  background:var(--cv-bg);
  border:1px solid var(--cv-border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 4px 18px rgba(0,0,0,.15);
}
.left{
  background:var(--cv-accent-light);
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:12px;
  text-align:center;
}
.right{
  padding:20px;
}
.photo{
  width:120px;
  height:120px;
  border-radius:50%;
  object-fit:cover;
  border:4px solid var(--cv-accent);
  margin:0 auto 10px;
}
.cv-container h1{
  font-size:26px;
  font-weight:800;
  margin-bottom:2px;
  color:var(--cv-text-dark);
}
.cv-container h2{
  font-size:14px;
  font-weight:500;
  margin-bottom:10px;
  color:var(--cv-accent);
}
.cv-container h3{
  font-size:15px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.5px;
  margin-bottom:6px;
  color:var(--cv-accent);
  padding-left:10px;
  border-left:4px solid var(--cv-accent);
}
.section-title{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1.2px;
  color:var(--cv-accent);
  font-weight:600;
  margin-bottom:4px;
  text-decoration:underline;
  text-underline-offset:4px;
  text-decoration-thickness:2px;
}
.cv-container ul li{
  font-size:12px;
  margin-bottom:3px;
  color:var(--cv-text-light);
  line-height:1.35;
}
.profile p{
  font-size:13px;
  color:var(--cv-text-light);
  line-height:1.4;
}

/* LEFT SECTION BLOCKS */
.section-block {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
}
.left ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.left li {
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.4;
  color: var(--cv-text-light);
}

/* RIGHT SECTIONS */
.right .profile,
.right .section {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cv-border);
}
.right .section:last-child {
  border-bottom: none;
}

/* PRINT */
@media print {
  body {
    background: white !important;
    color: black !important;
    --bg: white !important;
    --surface: white !important;
    --text: black !important;
    --muted: #555 !important;
    --border: #ddd !important;
  }
  .cv-container {
    display: grid !important;
    grid-template-columns: 220px 1fr !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: white !important;
  }
  .left {
    background: var(--cv-accent) !important;
    color: white !important;
    padding: 20px !important;
  }
  .right {
    padding: 20px !important;
    background: white !important;
    color: black !important;
  }
  .left h1,
  .left h2,
  .left ul li,
  .left .section-title {
    color: white !important;
  }
  .right h3,
  .right p,
  .right ul li {
    color: black !important;
  }
  header, footer, .nav-cv, .preview-nav, .btn, .theme-toggle, .mob-toggle, #drawer {
    display: none !important;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

@media(max-width:900px){
  .cv-container{grid-template-columns:1fr}
  .left{text-align:center}
  .form-grid{grid-template-columns:1fr}
  .cv-theme-label{margin-left:0;margin-top:10px;flex-basis:100%}
}

/* ANIMATIONS */
.reveal{opacity:0;transform:translateY(20px);transition:all .6s cubic-bezier(.2,.8,.2,1)}
.reveal.show{opacity:1;transform:translateY(0)}

/* === TEST VISUEL : colonne droite stylée === */

/* 1. Dates à gauche, titres en couleur */
#cvEducation li,
#cvExperience li {
  margin-bottom: 12px;
  border-left: 3px solid var(--cv-accent);
  padding-left: 10px;
}

#cvEducation li strong,
#cvExperience li strong {
  display: block;
  font-weight: 700;
  color: var(--cv-accent);
  font-size: 13px;
}

#cvEducation li em,
#cvExperience li em {
  font-size: 12px;
  color: var(--cv-text-light);
}

/* 2. Compétences en tags */
#cvSkills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
}

#cvSkills li {
  background: var(--cv-accent);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
}

/* 3. Profil en citation */
.profile {
  background: rgba(0, 0, 0, 0.02);
  border-left: 4px solid var(--cv-accent);
  padding: 12px 16px;
  font-style: italic;
  border-radius: 6px;
}

/* 4. Espacement entre les blocs */
.right .section {
  margin-bottom: 28px;
}

/* ----- Compétences en badges colorés (colonne droite) ----- */
#cvSkills.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
  margin-top: 8px;
}

#cvSkills.tag-list li {
  background: var(--cv-accent);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  line-height: 1.2;
}
/* Fichier : cv.css (Ajouter à la fin) */

/* Styles pour le bouton contextuel */
.btn-context-example {
    display: block;
    width: fit-content;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent); 
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.btn-context-example:hover {
    opacity: 1;
    text-decoration: none;
}

/* NOUVEAU : Notification d'exemple (pour mobile) */
.example-notification {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--surface);
    border-top: 1px solid var(--border);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    padding: 15px 20px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    max-height: 80vh; /* Limiter la hauteur sur mobile */
    overflow-y: auto; /* Permettre le défilement */
}

.example-notification.show {
    transform: translateY(0);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#exampleTitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.close-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

#exampleContent {
    background: var(--bg);
    padding: 10px;
    border-radius: 6px;
    white-space: pre-wrap; /* Gère les retours à la ligne */
    word-break: break-word;
    font-size: 14px;
    color: var(--text);
    margin: 10px 0;
    display: block;
}

#useExampleBtn {
    margin-top: 10px;
    width: 100%; /* Bouton prend toute la largeur */
    display: block;
    text-align: center;
}
