/* Page Légalisation - Styles */

/* Hero Section Légalisation */
.hero-legalisation {
  position: relative;
  height: 430px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-legalisation .hero-bg {
  position: absolute;
  inset: 0;
  background: url('/img/legal_image.jpg') center/cover no-repeat;
}

.hero-legalisation .hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(26, 42, 94, 0.85) 0%,
    rgba(26, 42, 94, 0.4) 50%,
    transparent 100%);
}

.hero-legalisation .hero-content {
  position: relative;
  z-index: 2;
  padding: 0 3rem 3rem;
}

.hero-legalisation h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.hero-legalisation h1 span {
  display: block;
  color: #a8b8ff;
}

/* Intro Section */
.intro-section {
  padding: 2.5rem 2rem 3rem;
  background: var(--off-white);
}

.intro-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem 2.4rem;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 4px 22px rgba(26, 42, 94, 0.09);
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
}

.intro-icon {
  font-size: 2.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.intro-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
}


/* Note Section */
.note-section {
    padding: 80px 0;
    background: var(--white);
}

.note-card {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    background: var(--light-bg);
    padding: 50px;
    border-radius: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.note-icon {
    flex-shrink: 0;
    width: 100px;
    color: var(--text-dark);
}

.note-content h2 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.note-content p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 15px;
}

.countries-list {
    color: var(--primary-color) !important;
    font-weight: 500;
}

.important-note {
    background: var(--white);
    padding: 20px;
    border-left: 4px solid var(--accent-color);
    border-radius: 5px;
    margin-top: 20px;
}

/* Documents Section */
.documents-section {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    border-radius: 10px;
}

.documents-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.document-item {
    background: #6b5dd3;
    color: var(--white);
    border: none;
    padding: 20px 30px;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.document-item:hover {
    background: #5a4dc2;
    transform: translateX(5px);
}

.plus-icon {
    background: var(--white);
    color: #6b5dd3;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Document Popup */
.document-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.document-popup.active {
    display: flex;
}

.document-popup .popup-content {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.document-popup .popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 5px 10px;
}

.document-popup .popup-close:hover {
    color: var(--text-dark);
}

.document-popup h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
}

.document-popup p {
    color: var(--text-dark);
    line-height: 1.8;
}

/* CTA Section */
.cta-section {
    padding: 60px 0;
    background: var(--light-bg);
    text-align: center;
}

.cta-button {
    display: inline-block;
    background: #d97846;
    color: var(--white);
    padding: 20px 60px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(217, 120, 70, 0.3);
}

.cta-button:hover {
    background: #c56635;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(217, 120, 70, 0.4);
}
/* Responsive */
@media (max-width: 968px) {
    .steps-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 30px;
    }

    .steps-header {
        grid-column: 1;
        grid-row: 1;
    }

    .step-01 {
        grid-column: 1;
        grid-row: 2;
    }

    .step-02 {
        grid-column: 1;
        grid-row: 3;
    }

    .step-03 {
        grid-column: 1;
        grid-row: 4;
    }

    .step-04 {
        grid-column: 1;
        grid-row: 5;
    }

    .step-05 {
        grid-column: 1;
        grid-row: 6;
    }

    .arrow-01-02,
    .arrow-02-03,
    .arrow-03-04,
    .arrow-04-05 {
        display: none;
    }
}
/* Responsive */
@media (max-width: 968px) {
    .hero-text-overlay h1 {
        font-size: 40px;
    }

    .hero-text-overlay span {
        font-size: 32px;
    }

    .note-card {
        flex-direction: column;
        padding: 30px;
    }

    .steps-header {
        flex-direction: column;
        text-align: center;
    }

    .step-card {
        max-width: 100%;
    }

    .step-left,
    .step-right {
        align-self: center;
    }

    .documents-list {
        padding: 0 20px;
    }
}

@media (max-width: 640px) {
    .hero-image-wrapper {
        height: 300px;
    }

    .hero-text-overlay {
        left: 5%;
    }

    .hero-text-overlay h1 {
        font-size: 32px;
    }

    .hero-text-overlay span {
        font-size: 24px;
    }

    .hero-description p {
        font-size: 16px;
        padding: 0 20px;
    }

    .note-card {
        padding: 20px;
    }

    .note-content h2 {
        font-size: 18px;
    }

    .steps-header h2 {
        font-size: 28px;
    }

    .document-item {
        padding: 15px 20px;
        font-size: 14px;
    }

    .cta-button {
        padding: 15px 40px;
        font-size: 18px;
    }
}
/* ============================================================
   SECTION ÉTAPES CLÉES — 5 étapes (légalisation & apostille)
   Mise en page identique à la notarisation
   ============================================================ */

.steps-section {
  background: var(--white);
  padding: 4rem 2rem;
}

/* Conteneur principal : label à gauche + grille à droite */
.steps-outer {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

/* Colonne gauche : icone + titre */
.steps-label {
  flex-shrink: 0;
  width: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  padding-top: 0.5rem;
}

.steps-label h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-dark, #111827);
  line-height: 1.25;
}

/* ---- Grille 5 étapes en Z ---- */
/*
  Colonnes : [étape gauche] [flèche H] [étape droite]
  Rangées  :
    1 → s1        ah1       s2
    2 → (vide)    (vide)    av2
    3 → (vide)    (vide)    s3
    4 → (vide)    (vide)    av3
    5 → s5        ah4       s4
*/
.steps-flow-5 {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto auto auto auto;
  gap: 1.2rem 1.5rem;
  align-items: start;
}

/* Positionnement des cellules */
.sf5-s1  { grid-column: 1; grid-row: 1; }
.sf5-ah1 { grid-column: 2; grid-row: 1; align-self: center; }
.sf5-s2  { grid-column: 3; grid-row: 1; }
.sf5-av2 { grid-column: 3; grid-row: 2; justify-self: center; }
.sf5-s3  { grid-column: 3; grid-row: 3; }
.sf5-av3 { grid-column: 3; grid-row: 4; justify-self: center; }
.sf5-s4  { grid-column: 3; grid-row: 5; }
.sf5-ah4 { grid-column: 2; grid-row: 5; align-self: center; }
.sf5-s5  { grid-column: 1; grid-row: 5; }

/* ---- Flèches ---- */
.arrow-h,
.arrow-h-left,
.arrow-v,
.arrow-v-long {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Cartes d'étape (style notarisation) ---- */
.step-card {
  background: var(--white, #fff);
  border: 2px solid var(--navy, #1a2a5e);
  border-radius: 10px;
  overflow: hidden;
}

.step-card-header {
  background: var(--navy, #1a2a5e);
  color: #fff;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.step-card-body {
  padding: 1rem 1rem 1.1rem;
}

.step-card-body p {
  font-size: 0.84rem;
  color: var(--text-dark, #374151);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

/* Zone image(s) : 1 ou 2 slots côte à côte */
.step-img-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* Chaque slot est un rectangle réservé pour une image PNG */
.step-img-slot {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--off-white, #f4f5fb);
  border: 1.5px dashed #c0c8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.step-img-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .steps-outer {
    flex-direction: column;
  }

  .steps-label {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }

  /* Sur mobile, tout s'empile en colonne simple */
  .steps-flow-5 {
    grid-template-columns: 1fr;
    grid-template-rows: unset;
    gap: 1rem;
  }

  .sf5-s1, .sf5-ah1, .sf5-s2,
  .sf5-av2, .sf5-s3, .sf5-av3,
  .sf5-s4, .sf5-ah4, .sf5-s5 {
    grid-column: 1;
    grid-row: unset;
  }

  /* Masquer les flèches sur mobile */
  .arrow-h, .arrow-h-left, .arrow-v, .arrow-v-long {
    display: none;
  }
}

@media (max-width: 640px) {
  .steps-label h2 {
    font-size: 1.15rem;
  }

  .step-card-header {
    font-size: 0.82rem;
  }
}
