/* ============================================================
   🌸 PORTFOLIO — JULIETTE MOUILLAC
   style.css
   ============================================================
   TABLE DES MATIÈRES

   1.  RESET & BASE
   2.  CURSEURS FLEUR PERSONNALISÉS
   3.  VARIABLES CSS (couleurs, polices)
   4.  DARK MODE
   5.  BODY
   6.  NAVIGATION
   7.  BANNIÈRE HERO
   8.  BOUTONS GÉNÉRIQUES
   9.  EN-TÊTES DE SECTIONS
   10. SÉPARATEUR BRODERIE
   11. PROJETS
   12. À PROPOS
   13. FOOTER
   14. MODAL
   15. ANIMATIONS KEYFRAMES
   16. RESPONSIVE
   ============================================================ */


/* ============================================================
   🌸 1. RESET & BASE
   ============================================================ */

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

html { scroll-behavior: smooth; }


/* ============================================================
   🌸 2. CURSEURS FLEUR PERSONNALISÉS
   ============================================================ */

:root {
  /* fleur terracotta — fond clair */
  --cursor-flower: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 50 50'%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(0 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(45 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(90 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(135 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(180 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(225 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(270 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23D4713A' transform='rotate(315 25 25)'/%3E%3Ccircle cx='25' cy='25' r='7' fill='%23F5EFE4'/%3E%3C/svg%3E") 14 14, pointer;

  /* fleur crème — fond orange/sombre */
  --cursor-flower-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 50 50'%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(0 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(45 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(90 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(135 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(180 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(225 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(270 25 25)'/%3E%3Cellipse cx='25' cy='9' rx='6' ry='10' fill='%23F5EFE4' transform='rotate(315 25 25)'/%3E%3Ccircle cx='25' cy='25' r='7' fill='%23D4713A'/%3E%3C/svg%3E") 14 14, pointer;
}

/* fleur terracotta sur tous les éléments cliquables */
a, button, .project-card, [role="button"] {
  cursor: var(--cursor-flower) !important;
}

/* fleur crème sur surfaces oranges */
nav a,
nav button,
#lang-toggle,
#theme-toggle,
.project-card:hover a,
.project-card:hover button,
.btn-primary,
.btn-primary:hover,
footer a {
  cursor: var(--cursor-flower-light) !important;
}


/* ============================================================
   🌸 3. VARIABLES CSS
   ============================================================ */

:root {
  --bg:      #EDE5D8;
  --main:    #C15A30;
  --accent:  #F08378;
  --surface: #F5EFE4;
  --leaf:    #7A9E6E;
  --blush:   #d68f63;
  --text:    #3B3A41;
  --muted:   #8A7F76;
  --font-display: 'Abril Fatface', serif;
  --font-banner:  'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}


/* ============================================================
   🌸 4. DARK MODE
   ↳ Activé via la classe .dark-mode sur <html> (js/theme.js)
   ============================================================ */

.dark-mode {
  --bg:      #22201D;
  --surface: #2A2723;
  --main:    #C97C4E;
  --accent:  #F08378;
  --text:    #E6E1D9;
  --muted:   #A8A39B;
}


/* ============================================================
   🌸 5. BODY
   ============================================================ */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}


/* ============================================================
   🌸 6. NAVIGATION
   ============================================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 2rem;
  background: var(--main);
  border-bottom: 2px solid var(--accent);
}

/* stitch border under nav */
nav::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0; right: 0;
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--blush) 0px, var(--blush) 8px,
    transparent 8px, transparent 14px
  );
  opacity: 0.7;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
  position: absolute; /* centré indépendamment du flex parent */
  left: 50%;
  transform: translateX(-50%);
}

/* séparateurs ✿ entre les liens */
nav ul li.sep {
  color: var(--bg);
  font-size: 0.8rem;
  opacity: 0.8;
  user-select: none;
}

.nav-toggles {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-left: auto;
}

nav a {
  text-decoration: none;
  color: var(--surface);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
  padding: 0 0.5rem;
}

/* soulignement animé au hover */
nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0.5rem; right: 0.5rem;
  height: 1px;
  background: var(--surface);
  transform: scaleX(0);
  transition: transform 0.25s;
}
nav ul li a:hover { color: var(--surface); }
nav ul li a:hover::after { transform: scaleX(1); }

#theme-toggle,
#lang-toggle {
  position: static;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--main);
  text-decoration: none;
  overflow: hidden;
  flex-shrink: 0;
}

#lang-toggle svg {
  width: 100%;
  height: 100%;
}

/* burger — caché sur desktop, affiché via @media 600px */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: var(--cursor-flower-light);
  padding: 4px;
  z-index: 110;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--surface);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* les 3 barres se transforment en ✕ quand .is-open */
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   🌸 7. BANNIÈRE HERO
   ============================================================ */

#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem 8vw 5rem;
  position: relative;
  overflow: hidden;
}

/* fleur SVG positionnée à droite, tourne au scroll via JS */
.banner-flower {
  position: absolute;
  right: 8vw;
  top: 65%;
  transform: translateY(-50%);
  width: clamp(160px, 22vw, 300px);
  opacity: 0;
  animation: fadeIn 1s 0.9s forwards;
  pointer-events: none;
}

/* transform-origin centré pour la rotation scroll */
.flower-spin {
  transform-box: fill-box;
  transform-origin: center;
}

/* textes en fadeUp avec délai croissant */
.banner-label {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--main);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.banner-name {
  font-family: var(--font-banner);
  font-size: clamp(5rem, 13vw, 12rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--main);
  opacity: 0;
  animation: fadeUp 0.7s 0.35s forwards;
}

.banner-sub {
  margin-top: 2rem;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  color: var(--muted);
  max-width: 460px;
  opacity: 0;
  animation: fadeUp 0.7s 0.55s forwards;
}

.banner-cta {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s 0.75s forwards;
}


/* ============================================================
   🌸 8. BOUTONS GÉNÉRIQUES
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.22s;
  cursor: pointer;
}

.btn-primary { background: var(--main); color: var(--surface); border: 1px solid var(--main); }
.btn-primary:hover { background: transparent; color: var(--main); }

.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--accent); }
.btn-outline:hover { border-color: var(--main); color: var(--main); }


/* ============================================================
   🌸 9. EN-TÊTES DE SECTIONS
   ============================================================ */

section { padding: 7rem 8vw; }

.section-header { display: flex; align-items: baseline; gap: 1.5rem; margin-bottom: 4rem; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--main);
}
.section-line { flex: 1; height: 1px; background: var(--accent); max-width: 200px; opacity: 0.5; }
.section-num { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--main); text-transform: uppercase; }


/* ============================================================
   🌸 10. SÉPARATEUR BRODERIE
   ↳ Deux lignes pointillées superposées via background-image
   ============================================================ */

.stitch-divider {
  width: 100%;
  padding: 0.6rem 0;
  background: var(--bg);
  overflow: hidden;
  background-image:
    repeating-linear-gradient(90deg, var(--main)   0, var(--main)   8px, transparent 8px, transparent 14px),
    repeating-linear-gradient(90deg, var(--accent)  0, var(--accent)  8px, transparent 8px, transparent 14px);
  background-size: auto 1px, auto 1px;
  background-position: 0 6px, 0 14px;
  background-repeat: repeat-x, repeat-x;
  min-height: 20px;
  opacity: 0.55;
}


/* ============================================================
   🌸 11. PROJETS
   ============================================================ */

#projects { background: var(--surface); position: relative; }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }

.project-card {
  background: var(--bg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* remplissage terracotta depuis le bas au hover */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--main);
  transform: translateY(100%); /* caché sous la carte par défaut */
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.project-card:hover::before { transform: translateY(0); }

.project-card * { position: relative; z-index: 1; transition: color 0.3s; }
.project-card:hover .project-num,
.project-card:hover .project-title,
.project-card:hover .project-desc,
.project-card:hover .project-tags span { color: var(--surface); }
.project-card:hover .project-tags span { border-color: rgba(245,239,228,0.4); }

/* icône broderie SVG en haut à droite */
.card-emb {
  position: absolute !important;
  top: 1.2rem; right: 1.2rem;
  width: 32px; height: 32px;
  opacity: 0.2;
  transition: opacity 0.3s, filter 0.3s !important;
  z-index: 2 !important;
}
.project-card:hover .card-emb { opacity: 0.6; filter: brightness(10); }

.project-num   { font-family: var(--font-display); font-size: 3.5rem; color: var(--blush); line-height: 1; margin-bottom: auto; }
.project-title { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: 0.04em; color: var(--main); margin-bottom: 0.5rem; }
.project-desc  { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; line-height: 1.55; }

.project-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.project-tags span { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--accent); padding: 0.2rem 0.75rem; border-radius: 1px; color: var(--muted); }


/* ============================================================
   🌸 12. À PROPOS
   ============================================================ */

#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.about-left .section-header { margin-bottom: 2rem; }
.about-text { font-size: 1.05rem; color: var(--muted); line-height: 1.85; margin-bottom: 2.5rem; }
.about-right { padding-top: 1rem; }

.photo-moi {
  padding-bottom: 2em;
  display: flex;
  justify-content: center;
}

.photo-moi img {
  max-width: 13em;
  border-radius: 50%;
  border: 3px solid var(--bg);
  display: block;
}

.photo-stitch {
  border-radius: 50%;
  padding: 6px;
  border: 2px dashed var(--main);
  outline: 2px dashed var(--accent); /* deuxième anneau extérieur */
  outline-offset: 6px;
}

.skills-block { margin-bottom: 2.5rem; }
.skills-label { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--main); margin-bottom: 1rem; }
.skills-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill-tag { font-size: 0.8rem; padding: 0.4rem 1rem; border: 1px solid var(--accent); border-radius: 2px; color: var(--text); transition: border-color 0.2s, color 0.2s; }
.skill-tag:hover { border-color: var(--main); color: var(--main); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--accent); }
.stat-num  { font-family: var(--font-display); font-size: 3rem; color: var(--main); line-height: 1; }
.stat-desc { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 0.3rem; line-height: 1.4; }


/* ============================================================
   🌸 13. FOOTER
   ============================================================ */

footer {
  background: var(--surface);
  padding: 4rem 8vw;
  border-top: 2px solid var(--accent);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  position: relative;
}

/* même broderie pointillée que sous le nav */
footer::before {
  content: '';
  position: absolute;
  top: 6px; left: 0; right: 0;
  height: 5px;
  background-image: repeating-linear-gradient(
    90deg, var(--blush) 0px, var(--blush) 8px,
    transparent 8px, transparent 14px
  );
  opacity: 0.55;
}

.footer-name { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 4rem); letter-spacing: 0.04em; color: var(--main); margin-bottom: 1.5rem; }

.contact-links { display: flex; flex-direction: column; gap: 0.6rem; }
.contact-links a { text-decoration: none; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; transition: color 0.2s; display: flex; align-items: center; gap: 0.8rem; }
.contact-links a:hover { color: var(--main); }
.contact-links .link-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); min-width: 60px; }

.footer-right { text-align: right; }
.footer-right p { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* point vert animé "Disponible" */
.availability { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #5fde8a; margin-bottom: 1rem; }
.availability::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #5fde8a; animation: pulse 2s infinite; }


/* ============================================================
   🌸 14. MODAL
   ↳ S'ouvre au clic sur une .project-card
   ↳ Données via attributs data-* — logique dans js/modal.js
   ============================================================ */

/* overlay flouté */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 15, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

/* boîte modale */
.modal {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 4px;
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  transform: translateY(24px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.is-open .modal { transform: translateY(0); }

/* colonne gauche — preview scrollable */
.modal-preview {
  height: 88vh;
  overflow-y: auto;
  border-right: 1px solid var(--accent);
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--main) transparent;
}

.modal-preview img { width: 100%; height: auto; display: block; }

/* placeholder si pas d'image */
.modal-preview-placeholder {
  width: 100%; height: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.25;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--main);
}

/* colonne droite — contenu texte */
.modal-content {
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--main) transparent;
}

.modal-num   { font-family: var(--font-display); font-size: 2.5rem; color: var(--blush); line-height: 1; margin-bottom: 0.5rem; }
.modal-title { font-family: var(--font-display); font-size: 2rem; color: var(--main); line-height: 1.1; margin-bottom: 1.5rem; }

.modal-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.modal-tags span { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--accent); padding: 0.2rem 0.75rem; border-radius: 1px; color: var(--muted); }

.modal-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.75; flex: 1; }
.modal-desc p + p { margin-top: 0.8rem; }

.modal-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--accent); display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* boutons visiter / PDF */
.modal-btn { display: inline-block; padding: 0.7rem 1.8rem; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; border-radius: 2px; transition: all 0.22s; cursor: pointer; background: var(--main); color: var(--surface); border: 1px solid var(--main); }
.modal-btn:hover { background: transparent; color: var(--main); }
.modal-btn.outline { background: transparent; color: var(--text); border: 1px solid var(--accent); }
.modal-btn.outline:hover { border-color: var(--main); color: var(--main); }

/* bouton fermer */
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 32px; height: 32px; border: 1px solid var(--accent); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1; z-index: 10; transition: background 0.2s, color 0.2s; }
.modal-close:hover { background: var(--main); color: var(--surface); }

/* broderie en haut de la modal */
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--main) 0px, var(--main) 8px,
    transparent 8px, transparent 14px
  );
  opacity: 0.7;
  z-index: 5;
}


/* ============================================================
   🌸 15. ANIMATIONS KEYFRAMES
   ============================================================ */

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse  { 0% { box-shadow: 0 0 0 0 rgba(95,222,138,0.6); } 70% { box-shadow: 0 0 0 8px rgba(95,222,138,0); } 100% { box-shadow: 0 0 0 0 rgba(95,222,138,0); } }


/* ============================================================
   🌸 16. RESPONSIVE
   ============================================================ */

/* 900px — masquer la fleur décorative */
@media (max-width: 900px) {
  .banner-flower { display: none; }
}

/* 768px — mise en page mobile générale */
@media (max-width: 768px) {
  #about { grid-template-columns: 1fr; gap: 3rem; }
  .projects-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
  .footer-right { text-align: left; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* 640px — modal en colonne unique */
@media (max-width: 640px) {
  .modal { grid-template-columns: 1fr; max-height: 92vh; }
  .modal-preview { height: 220px; border-right: none; border-bottom: 1px solid var(--accent); }
}

/* 600px — burger menu mobile */
@media (max-width: 600px) {
  .burger { display: flex; }

  nav ul       { display: none; }
  .nav-toggles { display: none; }

  /* overlay plein écran quand ouvert */
  nav ul.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--main);
    z-index: 105;
    transform: none; /* annule le translateX(-50%) du desktop */
  }

  /* toggles en ligne, fixés en bas de l'overlay */
  .nav-toggles.is-open {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 106;
  }

  nav ul li a { font-size: 1.4rem; letter-spacing: 0.2em; }
}