/* =========================================================
   PORTFOLIO — Maïlys Cammas
   Feuille de style
   ---------------------------------------------------------
   Astuce : les couleurs principales sont regroupées ci-dessous
   dans ":root". Change une valeur ici pour la répercuter partout.
   ========================================================= */

:root {
  --bg:         #F7F4EF;  /* fond général (beige clair) */
  --bg-soft:    #FDFBF7;  /* fond section "À propos" */
  --ink:        #2B2723;  /* texte principal (brun foncé) */
  --ink-soft:   #4A443D;  /* texte secondaire */
  --muted:      #7A7166;  /* texte discret / labels */
  --line:       #E5DED3;  /* lignes de séparation */
  --accent:     #9C6B4A;  /* couleur d'accent (terracotta) */
  --accent-lt:  #C99F78;  /* accent clair (sur fond foncé) */
  --dark:       #2B2723;  /* fond section Contact */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; transition: color .25s; }
a:hover { color: var(--accent); }
::selection { background: #E8DFD3; }

.hidden { display: none; }
[hidden] { display: none !important; }  /* garde bien cachés les éléments masqués (ex. message de confirmation) */
.accent { color: var(--accent-lt); }

/* Petit label numéroté au-dessus des titres de section */
.section__label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section__label--light { color: var(--accent-lt); }

/* =================== NAVIGATION =================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 5vw, 64px);
  background: rgba(247, 244, 239, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav__contact {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* =================== HERO =================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px clamp(20px, 6vw, 64px) 80px;
}
.hero__badge {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 40px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 8vw, 88px);
  line-height: 1.04;
  margin: 0;
  letter-spacing: -0.01em;
}
.hero__subtitle {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 0;
}
.hero__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--ink-soft);
  max-width: 560px;
  margin: 36px 0 0;
  line-height: 1.45;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 48px;
}
.hero__scroll {
  margin-top: 56px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: #B9AE9E;
}

/* Boutons */
.btn {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 32px;
  border-radius: 999px;
  transition: background .25s, color .25s, border-color .25s;
}
.btn--dark { background: var(--ink); color: #FDFBF7; }
.btn--dark:hover { background: var(--accent); color: #FDFBF7; }
.btn--outline { border: 1px solid #C9BFB0; color: var(--ink-soft); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

/* =================== À PROPOS =================== */
.about {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(72px, 10vw, 140px) clamp(20px, 6vw, 64px);
}
.about__grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.about__text { padding-top: clamp(0px, 3vw, 44px); }
.about__text h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 28px;
}
.about__text p { margin: 0 0 28px; color: var(--ink-soft); max-width: 52ch; }
.about__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.about__meta-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.about__meta-value { font-size: 15px; color: var(--ink); line-height: 1.7; }

/* Étiquettes de compétences */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px;
  border: 1px solid #DDD4C6;
  border-radius: 999px;
  padding: 5px 14px;
  color: var(--ink-soft);
  background: var(--bg);
}

/* =================== PROJETS =================== */
.projects {
  padding: clamp(72px, 10vw, 140px) clamp(20px, 6vw, 64px);
  max-width: 1240px;
  margin: 0 auto;
}
.projects__head { margin-bottom: clamp(48px, 6vw, 80px); }
.projects__head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 42px);
  margin: 0;
}
.project { margin-bottom: clamp(64px, 8vw, 112px); }
.project--wide { display: flex; flex-direction: column; gap: 24px; }
.project__thumbs { display: grid; gap: clamp(12px, 2vw, 24px); }
.project__thumbs--3 { grid-template-columns: repeat(3, 1fr); }
.project__thumbs--2 { grid-template-columns: 1fr 1fr; }
.project__caption {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.project__caption h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  margin: 0;
}
.project__caption p { margin: 0; max-width: 46ch; color: var(--ink-soft); font-size: 15px; }
.project__caption--stacked { flex-direction: column; gap: 8px; }
.project__caption--stacked h3 { font-size: 26px; }

.projects__duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 64px);
}
.projects__duo .project { margin-bottom: 0; display: flex; flex-direction: column; gap: 20px; }

/* Emplacements d'image (cadres + vraies images) */
.media {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}
.media--portrait { aspect-ratio: 3 / 4; max-width: 420px; }
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.project__thumbs .media { aspect-ratio: 4 / 3; }

/* Cadre "placeholder" affiché tant qu'aucune image n'est mise */
.img-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #EFE9E0;
  border: 1px dashed #C9BFB0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 12px;
}
.img-slot span { max-width: 80%; }

/* =================== CONTACT =================== */
.contact {
  background: var(--dark);
  color: #F0EAE1;
  padding: clamp(80px, 11vw, 160px) clamp(20px, 6vw, 64px) 0;
}
.contact__inner { max-width: 1080px; margin: 0 auto; }
.contact__head { margin-bottom: clamp(48px, 6vw, 72px); }
.contact__head h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1.05;
  margin: 0;
  max-width: 14ch;
  color: #F7F3EB;
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact__intro { margin: 0 0 28px; color: #B9AE9E; max-width: 42ch; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid #4A443D;
  border-radius: 999px;
  color: #F0EAE1;
  font-size: 14px;
  transition: color .25s, border-color .25s;
}
.contact__link:hover { color: var(--accent-lt); border-color: var(--accent-lt); }
.contact__link .arrow { font-size: 16px; color: var(--accent-lt); }

/* Formulaire */
.form { display: flex; flex-direction: column; gap: 28px; }
.form__label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8A8073;
}
.form input,
.form textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 13px 16px;
  background: #37322C;
  border: 1px solid #4A443D;
  border-radius: 10px;
  color: #F0EAE1;
}
.form textarea { resize: vertical; }
.form input:focus,
.form textarea:focus { outline: none; border-color: var(--accent); }
.form input::placeholder,
.form textarea::placeholder { color: #8A8073; }

.btn--send {
  font-family: inherit;
  padding: 17px 40px;
  background: #F0EAE1;
  color: var(--ink);
  border: none;
  cursor: pointer;
  align-self: flex-start;
}
.btn--send:hover { background: var(--accent-lt); color: var(--ink); }
.form__note { margin: -12px 0 0; font-size: 12px; color: #8A8073; max-width: 46ch; }

.form-success {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #4A443D;
  border-radius: 12px;
  padding: 32px;
}
.form-success__title { font-family: var(--serif); font-size: 26px; color: #F0EAE1; }
.form-success p { margin: 0; color: #B9AE9E; }

/* Pied de page */
.footer {
  margin-top: clamp(64px, 9vw, 120px);
  border-top: 1px solid #453F38;
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #8A8073;
}
.footer__name { font-family: var(--serif); font-size: 16px; color: #F0EAE1; }
.footer__links { display: flex; gap: 24px; letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; }
.footer__links a { color: #8A8073; }
.footer__links a:hover { color: var(--accent-lt); }

/* =================== ADAPTATION MOBILE =================== */
/* Corrige les textes qui se cassaient mal sur petit écran */
@media (max-width: 680px) {

  /* Navigation plus compacte pour éviter que ça se serre */
  .nav { padding: 14px 18px; gap: 12px; }
  .nav__logo { font-size: 16px; }
  .nav__links { gap: 16px; font-size: 11px; letter-spacing: 0.08em; }

  /* Hero : on réduit l'espacement des lettres (les majuscules très
     espacées se coupaient de façon disgracieuse) */
  .hero { padding: 96px 22px 60px; }
  .hero__subtitle { letter-spacing: 0.14em; }
  .hero__badge { letter-spacing: 0.12em; }

  /* Labels de section (01 — À propos, etc.) moins espacés */
  .section__label { letter-spacing: 0.14em; }

  /* Grand projet : titre et description l'un sous l'autre,
     sur toute la largeur (au lieu de se tasser côte à côte) */
  .project__caption { flex-direction: column; align-items: flex-start; gap: 12px; }
  .project__caption p { max-width: 100%; }

  /* Formulaire : le message d'aide sur toute la largeur */
  .form__note { max-width: 100%; }

  /* Pied de page centré et aéré */
  .footer { justify-content: center; text-align: center; gap: 14px; }
}

/* Très petits écrans (anciens téléphones) */
@media (max-width: 380px) {
  .nav__links { gap: 12px; }
  .hero__quote { font-size: 19px; }
}

/* =================== ANIMATION D'APPARITION =================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.65,.2,1), transform .9s cubic-bezier(.2,.65,.2,1);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Respecte les personnes qui réduisent les animations */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
