/* ============================================================
   APTEVIA - Styles spécifiques au site public
   Fichier : aptevia.css
   Version : V3.0 — 2025-12-07
   Rôle : Style éditorial + blocs spécifiques APTEVIA
   NOTE : Le Design System global est dans theme_aptevia.css
============================================================ */


/* ============================================================
   BANNIÈRE / HERO APTEVIA
============================================================ */

.ap-hero {
    background: var(--color-bg-section);
    padding: 70px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
}

.ap-hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.ap-hero p {
    font-size: 1.15rem;
    color: var(--color-text-soft);
}

.ap-hero img {
    max-width: 90%;
    margin-top: 20px;
}


/* ============================================================
   SECTIONS APTEVIA (génériques)
============================================================ */

.ap-section {
    background: var(--color-bg-section);
    padding: 50px 20px;
    margin-bottom: 45px;
    border-radius: 14px;
}

.ap-section h2 {
    margin-bottom: 16px;
}

.ap-section p {
    max-width: 900px;
    margin-bottom: 14px;
}


/* ============================================================
   BLOCS “CENTRES AGRÉÉS”
============================================================ */

.ap-centers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.ap-center-card {
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid #e4e1d8;
    box-shadow: var(--shadow-soft);
}

.ap-center-card h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

.ap-center-card p {
    margin-bottom: 6px;
    color: var(--color-text-soft);
}


/* ============================================================
   BLOC PROCESSUS “COMMENT ÇA SE PASSE ?”
============================================================ */

.ap-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 25px;
}

.ap-process-step {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4e1d8;
    box-shadow: var(--shadow-soft);
}

.ap-process-step .num {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.ap-process-step p {
    color: var(--color-text);
    margin: 0;
}


/* ============================================================
   FAQ IA — BLOC SPÉCIFIQUE
============================================================ */

.ap-faq {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e4e1d8;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-soft);
}

.ap-faq h2 {
    margin-bottom: 15px;
}

.ap-faq-item {
    border-bottom: 1px solid #e4e1d8;
    padding: 12px 0;
    cursor: pointer;
}

.ap-faq-item:last-child {
    border-bottom: none;
}

.ap-faq-item-title {
    font-weight: 600;
    color: var(--color-primary);
}

.ap-faq-item-content {
    margin-top: 8px;
    color: var(--color-text);
    display: none;
}

.ap-faq-item.open .ap-faq-item-content {
    display: block;
}


/* ============================================================
   BLOC LETTRES / DOCUMENTS DILA
============================================================ */

.ap-letter-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 25px 15px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e4e1d8;
}

.ap-letter-container h1 {
    margin-top: 8px;
}

.ap-letter-container h2 {
    margin-top: 28px;
    font-size: 1.4rem;
}

.ap-letter-container p {
    margin-bottom: 12px;
    color: var(--color-text);
}

.ap-letter-container ul {
    margin: 12px 0 12px 25px;
}

/* Séparateur */
.ap-letter-sep {
    width: 60%;
    margin: 30px auto;
    border-top: 2px solid var(--color-accent);
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 800px) {

    .ap-process {
        grid-template-columns: 1fr;
    }

    .ap-centers-grid {
        grid-template-columns: 1fr;
    }

    .ap-letter-container {
        padding: 20px;
    }
}

/* ============================================================
   ACCUEIL – ENVELOPPES (3F, 7, 44, 48SI)
   Restauré après nettoyage CSS – 2025-12-07
============================================================ */

.ap-enveloppes-section {
    padding: 60px 20px;
    background: var(--color-bg-page);
    text-align: center;
}

.ap-enveloppes-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.ap-enveloppes-intro {
    max-width: 720px;
    margin: 0 auto 30px;
    color: var(--color-text-soft);
    font-size: 1rem;
}

.ap-enveloppes-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

/* Enveloppe cliquable */
.ap-envelope {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ============================================================
   APTEVIA - Animation Enveloppes (restaurée)
============================================================ */

/* L'enveloppe générale */
.ap-envelope {
    cursor: pointer;
    transition: transform 0.25s ease;
    transform-style: preserve-3d;
}

/* Au survol : légère élévation du bloc */
.ap-envelope:hover {
    transform: translateY(-4px);
}

/* Gestion du wrap interne pour éviter les déformations */
.ap-env-wrap {
    position: relative;
    width: 160px;        /* même largeur que ton design existant */
    height: 110px;
    margin: 0 auto;
    perspective: 1000px; /* pour la profondeur */
}

/* BASE de l’enveloppe */
.env-base {
    position: absolute;
    inset: 0;
    background: #f7f4ef;
    border: 2px solid #d6cfc4;
    border-radius: 6px;
    z-index: 1;
}

/* Rabat foncé (haut) */
.env-flap-dark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: #a89e8f;
    border-radius: 6px 6px 0 0;
    transform-origin: top center;
    transition: transform 0.35s ease;
    z-index: 3;
}

/* Rabat clair (double épaisseur) */
.env-flap-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: #d6d0c8;
    border-radius: 6px 6px 0 0;
    transform-origin: top center;
    transition: transform 0.35s ease 0.05s; /* très léger délai */
    z-index: 2;
}

/* Contenu (Lettre 3F / 7 / 44 / 48SI) */
.ap-letter {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    color: #002f3f;
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 4;
}

/* ============================================================
   ANIMATION HOVER
============================================================ */

/* Rabat principal se soulève */
.ap-envelope:hover .env-flap-dark {
    transform: rotateX(-28deg);
}

/* Second rabat suit légèrement */
.ap-envelope:hover .env-flap-light {
    transform: rotateX(-18deg);
}

.ap-envelope:hover {
    transform: translateY(-4px);
}

/* Boîte “enveloppe” */
.ap-env-wrap {
    position: relative;
    width: 190px;
    height: 130px;
    margin: 0 auto;
}

/* Partie basse de l’enveloppe */
.env-base {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border: 1px solid var(--color-accent-light);
}

/* Rabat sombre */
.env-flap-dark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--color-primary);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Rabat clair (effet bicolore) */
.env-flap-light {
    position: absolute;
    top: 6px;
    left: 10px;
    right: 10px;
    height: 55px;
    background: var(--color-accent);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    opacity: 0.9;
}

/* Texte au centre de l’enveloppe */
.ap-letter {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
}

/* Bouton “Je n’ai pas reçu de courrier” */
.ap-no-mail {
    margin-top: 30px;
}

.ap-no-mail-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.ap-no-mail-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ============================================================
   ACCUEIL – PROCESSUS (3 cartes)
============================================================ */

.processus-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 30px;
}

.consultant-card {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--shadow-soft);
    padding: 22px 20px;
    text-align: left;
}

.consultant-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.consultant-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-soft);
}

@media (max-width: 768px) {
    .ap-enveloppes-row {
        gap: 20px;
    }
    .ap-env-wrap {
        width: 160px;
        height: 110px;
    }
    .consultant-card {
        flex: 0 0 100%;
    }
}

/* ============================================================
   APTEVIA – Contact : RGPD + toast + bouton
   Ajout minimal (ne modifie pas le reste)
   Date : 2025-12-25
   MAJ  : 2025-12-28 (RGPD alignement unifié)
============================================================ */

/* ✅ RGPD (unifié, alignement stable) */
.rgpd-row{
  margin-top: 12px;
  text-align: left;
}

.rgpd-label{
  display: grid;
  grid-template-columns: 18px 1fr; /* checkbox / texte */
  gap: 10px;
  align-items: start;
  justify-content: start;
  text-align: left;
  max-width: 900px;
  line-height: 1.45;
  cursor: pointer;
}

.rgpd-label input[type="checkbox"]{
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.rgpd-label span{
  display: block;
  color: #556;
}

.rgpd-label a{
  color: #002f3f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#btnSubmitContact, #btnSendContact{
  margin-top: 14px;
  min-width: 160px;
}

/* Toast */
.toast{
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}
.toast.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.toast__inner{
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  border-left: 6px solid #99cf16;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.14);
  position: relative;
}
.toast__title{
  font-weight: 700;
  color:#002f3f;
  margin-bottom: 6px;
}
.toast__text{
  font-size: 14px;
  line-height: 1.4;
  color: rgba(0,47,63,.9);
}
.toast__close{
  position:absolute;
  right: 10px;
  top: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor:pointer;
  font-size: 22px;
  line-height: 30px;
  color: rgba(0,47,63,.7);
}
.toast__close:hover{ background: rgba(0,0,0,.04); }
