/* ========================================
   VARIABLES & RÉINITIALISATION
======================================== */
:root{
  --bg1: #eaf6ff;
  --bg2: #f7fbff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #036588;
  --accent: #497099;
  --soft: #bbe6e7;

  --shadow: 0 12px 35px rgba(2, 8, 23, 0.12);
  --shadow2: 0 10px 26px rgba(2, 8, 23, 0.10);

  --radius: 18px;
  --radius2: 16px;
}

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

html{ scroll-behavior: smooth; }

body{
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 15% 15%, #d8f1ff 0%, transparent 60%),
    radial-gradient(900px 600px at 85% 85%, #e7ddff 0%, transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top: 8px;
  background: #111827;
  color:#fff;
  padding: 10px 12px;
  border-radius: 10px;
}
.skip-link:focus{ left: 12px; z-index: 9999; }

/* =========================
   MISE EN PAGE PRINCIPALE
============================ */
.page{
  min-height: 100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 24px;
}

.layout-card{
  width: min(1100px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  overflow: hidden;
  position: relative;
}

/* décor léger */
.layout-card::before{
  content:"";
  position:absolute;
  inset: -120px -120px auto auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--soft) 65%, white 35%);
  filter: blur(0.2px);
  z-index: 0;
}
.layout-card > *{ position: relative; z-index: 1; }

/* ==========================
   NAVIGATION / BARRE DE MENU
============================ */
.topbar{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 12px 12px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.navbar{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content:center;
}

.navbar a{
  text-decoration:none;
  position: relative;
  isolation: isolate;
  color: var(--text);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 12px;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.navbar a::before{
  content: "";
  position: absolute;
  inset: -10px -12px;          /* plus grand que le lien -> effet "en grand" */
  border-radius: 16px;         /* harmonise avec ton style */
  background: rgba(187, 230, 231, 0.55); /* ton bleu actuel */
  z-index: -1;

  transform: scale(0.85);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.navbar a:hover{
  transform: translateY(-1px);

  background: transparent;
  color: var(--primary);
}
.navbar a:hover::before,
.navbar a:focus-visible::before{
  transform: scale(1.05);
  opacity: 1;
}

/* =============
   SECTION HÉRO
============== */
.hero{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  padding: 80px 100px 100px;
  align-items:center;
}

.title{
  /* clamp invalide chez toi -> remplacé par une valeur fixe pour éviter les bugs */
  font-size: 100px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.title-outline{
  color: transparent;
  -webkit-text-stroke: 2px #0f172a;
}

.title-first,
.title-last{
  display: inline-block;
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(.2,.9,.2,1.4),
    text-shadow 220ms ease,
    color 220ms ease,
    -webkit-text-stroke-color 220ms ease;
  transform-origin: left center;
}

@keyframes pop{
  0%   { transform: scale(1); }
  60%  { transform: scale(1.18) rotate(-1deg); }
  100% { transform: scale(1.14) rotate(-1deg); }
}

.title-first:hover,
.title-last:hover{
  transform: scale(1.14) rotate(-1deg);
  text-shadow: 0 10px 22px rgba(3, 101, 136, 0.25);
  color: var(--primary);
  animation: pop 220ms ease-out;
}

.title-last:hover{
  color: transparent;
  -webkit-text-stroke-color: var(--primary);
}

/* Accessibilité clavier */
.title-first:focus-visible,
.title-last:focus-visible{
  outline: 2px solid rgba(3, 101, 136, 0.45);
  border-radius: 8px;
}

.subtitle{
  color: var(--primary);
  font-size: 25px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.hero-cta{ display:flex; gap: 12px; flex-wrap: wrap; }

/* =========
   BOUTONS
============ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #428b8c;
  color: #fff;
  text-decoration:none;
  border: none;
  cursor:pointer;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(3, 101, 136, 0.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(3, 101, 136, 0.22);
  filter: saturate(1.05);
}
.btn:active{ transform: translateY(0px) scale(0.99); }

.btn-cv{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #428b8c;
  color: #ebe9e9;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(3, 101, 136, 0.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-cv:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(3, 101, 136, 0.22);
  filter: saturate(1.05);
}
.btn-cv:active{
  transform: translateY(0px) scale(0.99);
}

.btn-ghost{
  background: transparent;
  color: #428b8c;;
  border: 2px solid rgba(3, 101, 136, 0.30);
  box-shadow: none;
}
.btn-ghost:hover{
  background: rgba(3, 101, 136, 0.07);
  box-shadow: none;
}


/* ====== BOUTONS HERO - RIPPLE (à ajouter) ====== */
.btn.btn-ripple{
  outline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;

  min-width: 200px;
  padding: 16px 20px;

  border: 0;
  border-radius: 14px;
  cursor: pointer;

  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;

  background: #428b8c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
  overflow: hidden;

  transition: opacity .18s ease, transform .18s ease;
}

.btn.btn-ripple:hover{ opacity: .95; transform: translateY(-1px); }
.btn.btn-ripple:active{ transform: translateY(0); }

.btn.btn-ripple .animation{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  animation: ripple 0.6s linear infinite;
}

.btn.btn-ripple span{
  padding: 0 14px;
  white-space: nowrap;
}

@keyframes ripple{
  0%{
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.10),
      0 0 0 20px rgba(255, 255, 255, 0.10),
      0 0 0 40px rgba(255, 255, 255, 0.10),
      0 0 0 60px rgba(255, 255, 255, 0.10);
  }
  100%{
    box-shadow:
      0 0 0 20px rgba(255, 255, 255, 0.10),
      0 0 0 40px rgba(255, 255, 255, 0.10),
      0 0 0 60px rgba(255, 255, 255, 0.10),
      0 0 0 80px rgba(255, 255, 255, 0);
  }
}

/* Bouton Télécharger CV (joli) */
.btn-cv-pretty{
  --g1: color-mix(in srgb, var(--primary) 82%, white 18%);
  --g2: color-mix(in srgb, var(--accent) 70%, white 30%);

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 12px 16px;
  border-radius: 999px;

  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.2px;

  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow:
    0 16px 34px rgba(3, 101, 136, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);

  position: relative;
  overflow: hidden;

  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-cv-pretty::before{
  content: "";
  position: absolute;
  inset: -60% -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 55%);
  transform: translateX(-20%) rotate(10deg);
  opacity: 0.55;
  pointer-events: none;
}

.btn-cv-pretty:hover{
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow:
    0 22px 46px rgba(3, 101, 136, 0.28),
    0 0 0 6px rgba(3, 101, 136, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-cv-pretty:active{
  transform: translateY(0) scale(0.99);
}

.btn-cv-pretty:focus-visible{
  outline: none;
  box-shadow:
    0 22px 46px rgba(3, 101, 136, 0.28),
    0 0 0 4px rgba(255,255,255,0.8),
    0 0 0 8px rgba(3, 101, 136, 0.25);
}

.btn-cv-pretty .btn-cv-icon{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transform: translateX(0);
  transition: transform .18s ease, background-color .18s ease;
}

.btn-cv-pretty:hover .btn-cv-icon{
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.24);
}

.hero-right{ 
  position:relative;
  justify-self: end; 
  margin-right: -30px;
  perspective: 900px;
}
.hero-img{
  width: 320px;      
  height: auto;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow2);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.18s ease;
}
@media (max-width: 900px){
  .hero-right{ margin-right: 0; }
  .hero-img{ width: min(320px, 80vw); }
}

/* ==================
   SECTIONS GÉNÉRALES
===================== */
.section{ padding: 70px 12px 4px; }
.section-head{ margin-bottom: 10px; }

.section-title{
  font-size: clamp(22px, 2.4vw,38px);
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
.section-text{
  color: var(--muted);
  line-height: 1.6;
  max-width: 68ch;
}

/* ==================
   SECTION À PROPOS
=================== */
.about-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tech-ticker{
  margin-top: 14px;
  padding: 10px 0;
  border-radius: var(--radius2);
  background: rgba(247, 251, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.tech-track{
  display: flex;
  width: max-content;
  gap: 18px;
  animation: ticker 24s linear infinite;
}

.tech-group{
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 0 20px;
}

.tech-group img{
  height: 100px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(2, 8, 23, 0.12));
  opacity: 0.95;
}

@keyframes ticker{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce){
  .tech-track{ animation: none; }
  
}

.info-card{
  background: rgba(247, 251, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius2);
  padding: 14px;
  box-shadow: 0 10px 22px rgba(2, 8, 23, 0.06);
}
.info-card h3{ margin-bottom: 6px; font-size: 16px; }
.info-card p{ color: var(--muted); line-height: 1.6; }

/* Curseur “machine à écrire” */
.typewriter{
  position: relative;
  min-height: 1.2em;
}
.typewriter::after{
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 6px;
  background: var(--primary);
  vertical-align: -2px;
  animation: caret 0.8s steps(1) infinite;
}
@keyframes caret{
  50%{ opacity: 0; }
}

/* ================
   SECTION PROJETS
================= */


:root{
  --projects-accent: #428b8c;
}

.projects-accordion{
  display: flex;
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}


.projects-accordion .project-card{
  flex: 1 1 0;
  min-width: 0;
  position: relative;

  background: #fff;
  border-radius: 18px;
  padding: 16px;

  box-shadow: 0 10px 26px rgba(2, 8, 23, 0.09);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;

  transition:
    flex 320ms cubic-bezier(.2,.9,.2,1.15),
    transform 220ms cubic-bezier(.2,.9,.2,1.15),
    box-shadow 220ms ease,
    background-color 220ms ease,
    color 220ms ease,
    opacity 220ms ease;
}

/* effet "les autres deviennent plus petits" */
.projects-accordion:hover .project-card{
  flex: 0.85 1 0;
  opacity: 0.86;
}

/* la carte hover devient plus large (comme Starbucks) */
.projects-accordion .project-card:hover{
  flex: 1.2 1 0;
  opacity: 1;
  transform: translateY(-3px);
  background: var(--projects-accent);
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.16);
}

/* glow léger */
.projects-accordion .project-card::before{
  content:"";
  position:absolute;
  inset:-45%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.40), transparent 55%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.projects-accordion .project-card:hover::before{ opacity: 1; }



.projects-accordion .project-badge{
  display:inline-flex;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(187, 230, 231, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 10px;
}

.projects-accordion .project-card h3{ margin-bottom: 6px; }
.projects-accordion .project-card p{
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.projects-accordion .project-tags{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.projects-accordion .project-tags span{
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  background: rgba(3, 101, 136, 0.07);
  border: 1px solid rgba(3, 101, 136, 0.10);
  padding: 6px 10px;
  border-radius: 999px;
}

.projects-accordion .project-links{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

.projects-accordion .project-links a{
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(3, 101, 136, 0.06);
  border: 1px solid rgba(3, 101, 136, 0.10);
}
.projects-accordion .project-links a:hover{
  background: rgba(3, 101, 136, 0.10);
}

/* hover: tout en blanc + “pill” clairs */
.projects-accordion .project-card:hover h3,
.projects-accordion .project-card:hover p,
.projects-accordion .project-card:hover .project-links a{
  color: #fff;
}
.projects-accordion .project-card:hover p{ opacity: 0.92; }

.projects-accordion .project-card:hover .project-badge{
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.projects-accordion .project-card:hover .project-tags span{
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.projects-accordion .project-card:hover .project-links a{
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}
.projects-accordion .project-card:hover .project-links a:hover{
  background: rgba(255, 255, 255, 0.22);
}


/* ==================
   SECTION COMPÉTENCES
===================== */

#skills .section-title{
  margin-bottom: 30px; 
}

.cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: start;
}
.card {
  width: 300px;
  padding: 10px;
  background: #fff;
  border: 6px solid #000;
  box-shadow: 12px 12px 0 #428b8c;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translate(-5px, -5px);
  box-shadow: 17px 17px 0 #000c;
}

.card__title {
  font-size: 32px;
  font-weight: 900;
  color: #000;
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
  position: relative;
  overflow: hidden;
}


.card__button::before {
  content: "Sure?";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 105%;
  background-color: #5ad641;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.card__content{
  margin: 0;
}
@keyframes glitch {
  0% {
    transform: translate(2px, 2px);
  }
  25% {
    transform: translate(-2px, -2px);
  }
  50% {
    transform: translate(-2px, 2px);
  }
  75% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(2px, 2px);
  }
}

.glitch {
  animation: glitch 0.3s infinite;
}


/* =================
   SECTION CONTACT
==================== */

.contact-grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  margin-top: 50px;
}

.form{
  background: rgba(247, 251, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius2);
  padding: 14px;
  display:grid;
  gap: 10px;
}

.form label{
  display:grid;
  gap: 6px;
  font-weight: 900;
}

.form input,
.form textarea{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 10px 12px;
  outline: none;
  font: inherit;
}

.form input:focus,
.form textarea:focus{
  border-color: rgba(3, 101, 136, 0.45);
  box-shadow: 0 0 0 4px rgba(3, 101, 136, 0.12);
}

.form-note{ color: var(--muted); font-size: 13px; line-height: 1.4; }

.contact-cards{ display:grid; gap: 10px; }

.contact-card{
  text-decoration:none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius2);
  padding: 14px;
  box-shadow: 0 10px 22px rgba(2, 8, 23, 0.06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.contact-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(2, 8, 23, 0.10);
}

.contact-title{ display:block; font-weight: 900; margin-bottom: 6px; }
.contact-value{ color: var(--muted); font-weight: 800; }

/* ===============
   PIED DE PAGE
================= */
.footer{
  margin-top: 18px;
  padding: 16px 12px 10px;
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-weight: 800;
}
.to-top{ color: var(--primary); text-decoration: none; font-weight: 900; }
.to-top:hover{ text-decoration: underline; }

/* ============================
   ANIMATIONS & ACCESSIBILITÉ
=============================== */
.reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal{ transition: none; }
  .btn, .navbar a, .project-card, .contact-card,
  .title-first, .title-last{ transition: none; }
}

/* Responsive */
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
  .hero-right{ justify-self: start; }
  .projects-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
}



/* ================
   LOADER OVERLAY 
   =============== */

.loader-overlay{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center; /* loader au milieu */
  background: linear-gradient(#9ab9cd);
  z-index: 9999;
}

/* Cache le contenu pendant le loading */
body.is-loading #main{
  visibility: hidden;
}

/* Empêche de scroller pendant le loading */
body.is-loading{
  overflow: hidden;
}

/* =============
   TON LOADER 
   ============ */

.loader {
  --ANIMATION-DELAY-MULTIPLIER: 70ms;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.loader span {
  padding: 0;
  margin: 0;
  letter-spacing: -5rem;
  animation-delay: 0s;
  transform: translateY(4rem);
  animation: hideAndSeek 1s alternate infinite cubic-bezier(0.86, 0, 0.07, 1);
}

.loader .l { animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 0); }
.loader .o { animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 1); }
.loader .a { animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 2); }
.loader .d { animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 3); }
.loader .ispan { animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 4); }
.loader .n { animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 5); }
.loader .g { animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 6); }

.letter {
  width: fit-content;
  height: 3rem;
}

.i { margin-inline: 5px; }

@keyframes hideAndSeek {
  0% { transform: translateY(4rem); }
  100% { transform: translateY(0rem); }
}
