/* ============================================================
   style.css — Feuille de styles du CV Stéphane CHAVAROT (RSX102)
   ============================================================ */

/* --- Variables globales --- */
:root {
  --violet:       #D276F2;   /* même violet que le titre "Pages web" du sujet */
  --violet-clair: #f3e8ff;
  --violet-mid:   #9333ea;
  --gris-fond:    #f8f7fc;
  --gris-texte:   #2d2d2d;
  --gris-doux:    #e5e7eb;
  --blanc:        #ffffff;
  --ombre:        0 2px 12px rgba(106,13,173,.12);
  --radius:       10px;
  --police-corps: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--police-corps);
  background: var(--gris-fond);
  color: var(--gris-texte);
  line-height: 1.7;
}

/* ============================================================
   EN-TÊTE
   ============================================================ */
header {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-mid) 100%);
  color: var(--blanc);
  padding: 3rem 2rem 2.5rem;
}

.header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

#photo-profil {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.5);
  background: var(--blanc);
  flex-shrink: 0;
}

.header-text h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: .3rem;
}

.header-text .tagline {
  font-size: 1.05rem;
  opacity: .85;
  margin-bottom: .8rem;
}

/* ============================================================
   BALISE <address> — STYLE IMPOSÉ PAR LE SUJET :
   - même violet que le titre "Pages web"
   - police Times
   ============================================================ */
address {
  font-style: normal;
  font-family: 'Times New Roman', Times, serif;  /* police Times */
  color: var(--violet-clair);                    /* violet (lisible sur fond violet) */
  font-size: .97rem;
  line-height: 1.8;
  border-left: 3px solid rgba(255,255,255,.4);
  padding-left: .9rem;
}

address a {
  color: var(--violet-clair);
  text-decoration: underline dotted;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  background: var(--blanc);
  border-bottom: 2px solid var(--gris-doux);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--ombre);
}

nav ul {
  max-width: 860px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  gap: 0;
}

nav ul li a {
  display: block;
  padding: .85rem 1.4rem;
  color: var(--gris-texte);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .3px;
  transition: color .2s, background .2s;
}

nav ul li a:hover {
  color: var(--violet);
  background: var(--violet-clair);
}

/* ============================================================
   CONTENU PRINCIPAL
   ============================================================ */
main {
  max-width: 860px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

section {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  box-shadow: var(--ombre);
  scroll-margin-top: 60px; /* compense la hauteur de la nav sticky */
}

/* --- Titres h2 (sections) --- */
h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--violet);
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--violet-clair);
  margin-bottom: 1.4rem;
  letter-spacing: -.2px;
}

/* --- Titres h3 (sous-sections) --- */
h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gris-texte);
  margin-bottom: .3rem;
}

/* --- Paragraphes --- */
p {
  margin-bottom: .7rem;
  font-size: .97rem;
}

/* --- Listes --- */
ul {
  list-style: none;
  padding-left: 0;
}

ul li {
  padding: .2rem 0 .2rem 1.3rem;
  font-size: .93rem;
  position: relative;
}

ul li::before {
  content: "▸";
  color: var(--violet-mid);
  position: absolute;
  left: 0;
}

/* --- Articles (sous-blocs) --- */
article {
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px dashed var(--gris-doux);
}

article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* --- Grille compétences --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}

.skill-block {
  background: var(--violet-clair);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.skill-block h3 {
  color: var(--violet);
  margin-bottom: .6rem;
  font-size: 1rem;
}

/* --- Titres de catégorie dans Expériences --- */
h3.categorie {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--blanc);
  background: var(--violet);
  display: inline-block;
  padding: .3rem .9rem;
  border-radius: 4px;
  margin: 1.4rem 0 .8rem;
}

.lien-ext {
  margin-top: .5rem;
  font-size: .88rem;
}


.contact-form {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  max-width: 480px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--violet);
}

input[type="text"],
input[type="email"],
textarea {
  border: 1.5px solid var(--gris-doux);
  border-radius: 6px;
  padding: .6rem .9rem;
  font-family: var(--police-corps);
  font-size: .95rem;
  transition: border-color .2s;
  resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--violet-mid);
  box-shadow: 0 0 0 3px rgba(147,51,234,.12);
}

#btn-envoyer {
  align-self: flex-start;
  background: var(--violet);
  color: var(--blanc);
  border: none;
  border-radius: 6px;
  padding: .65rem 1.6rem;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

#btn-envoyer:hover {
  background: var(--violet-mid);
  transform: translateY(-1px);
}

#retour-message {
  font-weight: 600;
  color: var(--violet);
  min-height: 1.4em;
}

/* ============================================================
   LIENS
   ============================================================ */
a {
  color: var(--violet-mid);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--violet);
}

/* ============================================================
   PIED DE PAGE
   ============================================================ */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .85rem;
  color: #888;
  border-top: 1px solid var(--gris-doux);
  margin-top: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .header-inner { flex-direction: column; text-align: center; }
  .header-text h1 { font-size: 1.8rem; }
  nav ul { flex-wrap: wrap; }
  nav ul li a { padding: .6rem .9rem; font-size: .85rem; }
  main { padding: 0 1rem; }
}

/* ============================================================
   POPUP MODALE DE CONFIRMATION
   ============================================================ */
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(106, 13, 173, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeInOverlay .25s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#popup-boite {
  background: var(--blanc);
  border-radius: 16px;
  padding: 2.5rem 2.8rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(106,13,173,.3);
  animation: slideUpPopup .3s ease;
}

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

#popup-icone {
  font-size: 3rem;
  font-weight: 900;
  color: var(--blanc);
  background: var(--violet);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  box-shadow: 0 4px 20px rgba(106,13,173,.35);
}

#popup-texte {
  font-size: 1.05rem;
  color: var(--gris-texte);
  line-height: 1.6;
  margin-bottom: 1.6rem;
  font-weight: 500;
}

#popup-btn {
  background: var(--violet);
  color: var(--blanc);
  border: none;
  border-radius: 8px;
  padding: .7rem 2rem;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

#popup-btn:hover {
  background: var(--violet-mid);
  transform: translateY(-1px);
}
