/* VARIABLES */
:root{
  --gold:#ceab5d;
  --olive:#909b25;
  --dark:#45521f;
  --bg:#f5f5f5;
}

/* RESET */
body{
  margin:0;
  font-family:Roboto,sans-serif;
  background:var(--bg);
}


/* ===== HERO ERASMUS ===== */

.hero-small{
  position:relative;
  min-height:55vh;

  background:
    linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.55)),
    url("/assets/photos/photositeinternet/chantiermfr.webp") center/cover no-repeat;

  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:white;
  overflow:hidden;
}

.hero-small-content{
  position:relative;
  z-index:3;
  max-width:850px;
  padding:20px;
}

.hero-small h1{
  font-family:"Roboto Slab", serif;
  font-size:clamp(34px,5vw,54px);
  margin:0 0 15px;
  line-height:1.15;
}

.hero-small p{
  max-width:850px;
  margin:0 auto;
  font-size:18px;
  opacity:0.9;
  line-height:1.45;
}

/* ===== AVION EN ELLIPSE FLUIDE SANS REBOND ===== */

.plane-animation{
  position:absolute;
  left:50%;
  top:50%;

  width:0;
  height:0;

  z-index:10;
  pointer-events:none;
}


/* Avion */
.plane-animation i{
  position:absolute;

  font-size:36px;
  color:#ceab5d;

  filter:drop-shadow(0 8px 12px rgba(0,0,0,0.35));

  offset-path:path("M 500 0 C 500 72 278 130 0 130 C -278 130 -500 72 -500 0 C -500 -72 -278 -130 0 -130 C 278 -130 500 -72 500 0");
offset-distance:0%;
offset-rotate:auto 0deg;

animation:planeEllipseSmooth 18s linear infinite;
}

@keyframes planeEllipseSmooth{
  from{
    offset-distance:0%;
  }

  to{
    offset-distance:100%;
  }
}

/* MOBILE */
@media(max-width:768px){

  .plane-animation{
    left:50%;
    top:50%;
    z-index:2;
  }

  .plane-animation i{
    font-size:24px;

     offset-path:path("M 175 0 C 175 45 98 80 0 80 C -98 80 -175 45 -175 0 C -175 -45 -98 -80 0 -80 C 98 -80 175 -45 175 0");

    animation-duration:13s;
  }
}

/* SECTION */
.section{
  max-width:750px;
  margin:0 auto;
  padding:0 20px;
  box-sizing:border-box;
}

.section p{
  text-align:justify;
  line-height:1.8;
  hyphens:auto;
  text-align-last:left;
}

.citation{
  text-align:center;
  font-size:20px;
  font-style:italic;
  margin-top:20px;
}

.section h2{
  font-family:"Roboto Slab";
  margin-bottom:20px;
}


/* IMAGE */
.erasmus-image{
  text-align:center;
  margin-top:40px;
}

.erasmus-image img{
  width:100%;
  max-width:900px;
  border-radius:15px;
  box-shadow:0 15px 40px rgba(0,0,0,0.15);
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:25px;
}

.card{
  background:white;
  padding:25px;
  border-radius:15px;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
  border-top:4px solid var(--gold);
  transition:0.3s;
}

.card:hover{
  transform:translateY(-6px);
  box-shadow:0 20px 40px rgba(0,0,0,0.15);
}

.card h3{
  margin-bottom:10px;
  color:var(--dark);
}

/* ===== TABS MOBILITÉS ===== */

.tabs{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:30px 0;
  flex-wrap:wrap;
}

.tab{
  padding:10px 18px;
  border:none;
  background:#fff;
  border-radius:30px;
  font-weight:600;
  cursor:pointer;
  border:1px solid rgba(0,0,0,0.08);
  transition:0.3s;
}

.tab.active{
  background:linear-gradient(135deg,var(--gold),var(--olive));
  color:#fff;
}

.tab:hover{
  transform:translateY(-2px);
}

/* ===== CONTENU ONGLET ===== */

.tab-content{
  display:none;
  text-align:center;
}

.tab-content.active{
  display:block;
}

/* ===== ERASMUS DANS LES ONGLES ===== */

.subtitle{
  font-size:18px;
  opacity:0.9;
  margin-top:10px;
}

.erasmus-hero{
  margin:30px 0;
}

.erasmus-hero img{
  width:100%;
  max-width:800px;
  border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
}

/* ===== MOBILE MOBILITÉS ===== */

@media(max-width:768px){

  .tabs{
    gap:8px;
    margin:25px 0;
  }

  .tab{
    padding:9px 14px;
    font-size:14px;
  }

  .prev,
  .next{
    font-size:22px;
    padding:8px 12px;
  }

  .erasmus-hero{
    margin:20px -16px;
  }

  .erasmus-hero img{
    width:100%;
    height:auto;
    max-height:60vh;
    object-fit:contain;
  }
}

/* ===== LIGHTBOX IMAGE MOBILE ===== */

.image-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;

  display:none;
  align-items:center;
  justify-content:center;

  background:rgba(0,0,0,0.92);
  padding:18px;
  box-sizing:border-box;
}

.image-lightbox.active{
  display:flex;
}

.image-lightbox img{
  max-width:100%;
  max-height:92vh;
  object-fit:contain;
  border-radius:12px;
}

.lightbox-close{
  position:absolute;
  top:18px;
  right:18px;

  width:42px;
  height:42px;
  border:none;
  border-radius:50%;

  background:rgba(255,255,255,0.18);
  color:white;

  font-size:32px;
  line-height:1;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;
}

.lightbox-close:hover{
  background:rgba(255,255,255,0.28);
}

/* On indique que les images sont cliquables */
.slide{
  cursor:pointer;
}

/* Option : uniquement utile sur mobile */
@media(min-width:769px){
  .image-lightbox{
    display:none !important;
  }
}

/* ===== FLÈCHES LIGHTBOX MOBILE ===== */

.lightbox-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);

  width:44px;
  height:44px;
  border:none;
  border-radius:50%;

  background:rgba(255,255,255,0.18);
  color:white;

  font-size:34px;
  line-height:1;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  z-index:10001;
}

.lightbox-prev{
  left:14px;
}

.lightbox-next{
  right:14px;
}

.lightbox-nav:hover{
  background:rgba(255,255,255,0.28);
}

@media(max-width:768px){
  .lightbox-nav{
    width:42px;
    height:42px;
    font-size:32px;
  }

  .lightbox-prev{
    left:10px;
  }

  .lightbox-next{
    right:10px;
  }

}

/* =====================================================
   MOBILITÉS - Centrage des titres et commentaires
===================================================== */

.section.mobility{
  text-align: center !important;
}

.section.mobility > h2{
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.section.mobility .tabs{
  justify-content: center !important;
}

.section.mobility .tab-content{
  text-align: center !important;
}

.section.mobility .tab-content h3,
.section.mobility .tab-content h2,
.section.mobility .tab-content p,
.section.mobility .subtitle,
.section.mobility .citation{
  text-align: center !important;
  text-align-last: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.section.mobility .tab-content p{
  max-width: 760px !important;
}

/* =====================================================
   MOBILITÉ - Section Pourquoi partir premium
===================================================== */

.section:has(.grid) {
  max-width: 1180px;
  margin: 90px auto;
  padding: 0 24px;
}

.section:has(.grid) > h2 {
  text-align: center;
  font-family: "Roboto Slab", serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  color: #1f2a1f;
  margin-bottom: 42px;
  position: relative;
}

.section:has(.grid) > h2::after {
  content: "";
  display: block;
  width: 86px;
  height: 4px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--olive));
}

.section:has(.grid) .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.section:has(.grid) .card {
  position: relative;
  overflow: hidden;

  min-height: 150px;
  padding: 28px 28px;

  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(246,244,239,0.96));
  border: 1px solid rgba(0,0,0,0.06);

  box-shadow:
    0 18px 45px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.8);

  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.section:has(.grid) .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--gold), var(--olive));
}

.section:has(.grid) .card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;

  width: 150px;
  height: 150px;
  border-radius: 50%;

  background: radial-gradient(circle, rgba(206,171,93,0.22), transparent 68%);
  pointer-events: none;
}

.section:has(.grid) .card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 26px 65px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.9);
  border-color: rgba(206,171,93,0.35);
}

.section:has(.grid) .card h3 {
  margin: 0 0 12px;
  font-family: "Roboto Slab", serif;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--dark);
}

.section:has(.grid) .card p {
  margin: 0;
  color: #555;
  line-height: 1.7;
  font-size: 1rem;
  text-align: left;
}

/* Variation subtile des cartes */
.section:has(.grid) .card:nth-child(2)::before {
  background: linear-gradient(180deg, var(--olive), #7ca7b9);
}

.section:has(.grid) .card:nth-child(3)::before {
  background: linear-gradient(180deg, #92542a, var(--gold));
}

/* Mobile */
@media(max-width: 900px) {
  .section:has(.grid) .grid {
    grid-template-columns: 1fr;
  }

  .section:has(.grid) {
    margin: 65px auto;
    padding: 0 18px;
  }

  .section:has(.grid) .card {
    min-height: auto;
    padding: 28px 24px;
    border-radius: 24px;
  }

  .section:has(.grid) .card h3 {
    font-size: 1.22rem;
  }
}
